User Tools

Site Tools


python:django

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
python:django [2015/05/13 23:43] – [Những module mà opensource có và cách sử dụng trong django] adminpython:django [2022/10/29 16:15] (current) – external edit 127.0.0.1
Line 51: Line 51:
 </code> </code>
 ==== Create virtual environment and run django ==== ==== Create virtual environment and run django ====
 +Why create virtual environment?Because with each django source, they compatible with each other version of django, so you must create the virtual enviornment for that version of django and not affect the other django source which run other django version
   - Step1: Install virtualenv:<code bat>   - Step1: Install virtualenv:<code bat>
 pip install virtualenv pip install virtualenv
Line 122: Line 123:
 admin.site.register(Question) admin.site.register(Question)
 </code>   </code>  
-==== write routing urls and view for poll ====+==== write routing urls(URL Dispatcher) and view for poll ====
 refer: https://docs.djangoproject.com/en/1.7/intro/tutorial03/ refer: https://docs.djangoproject.com/en/1.7/intro/tutorial03/
   - Step1: Open the file **polls/views.py** and put the following Python code in it:<code python>   - Step1: Open the file **polls/views.py** and put the following Python code in it:<code python>
Line 635: Line 636:
 Kinh nghiệm sử dụng lại những module đã được phát triển bởi cộng đồng django: django là framework được thiết kế với chuẩn DRY, vì thế những module mà cộng đồng phát triển có thể sử dụng lại và được tích hợp vào ứng dụng của mình một cách dễ dàng. Thông thường khi cộng đồng phát triển module như thế, ngoài việc đưa module đó vào **INSTALLED_APPS cho việc load module và install những table cần thiết liên quan đến module**, cần cung cấp một **đối tượng dạng Manager, hoặc file cấu hình của module để giúp module đó tương tác với module khác** Kinh nghiệm sử dụng lại những module đã được phát triển bởi cộng đồng django: django là framework được thiết kế với chuẩn DRY, vì thế những module mà cộng đồng phát triển có thể sử dụng lại và được tích hợp vào ứng dụng của mình một cách dễ dàng. Thông thường khi cộng đồng phát triển module như thế, ngoài việc đưa module đó vào **INSTALLED_APPS cho việc load module và install những table cần thiết liên quan đến module**, cần cung cấp một **đối tượng dạng Manager, hoặc file cấu hình của module để giúp module đó tương tác với module khác**
 ==== Django themes ==== ==== Django themes ====
 +Admin themes:
 +  * https://github.com/django-admin-bootstrapped/django-admin-bootstrapped
 +  * https://github.com/darklow/django-suit
 +  * https://github.com/django-admin-bootstrap/django-admin-bootstrap
 +Front-End themes:
 +  * https://github.com/MegaMark16/django-cms-themes
 +  * https://github.com/no-dice/django-bootstrap-themes
 +  * https://github.com/django-blog-zinnia/zinnia-theme-bootstrap
 +  * https://github.com/zgohr/mezzanine-foundation
python/django.1431560584.txt.gz · Last modified: 2022/10/29 16:15 (external edit)