Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
python_wiki:django_configuration [2018/08/03 16:36] billdozor [URLs] |
python_wiki:django_configuration [2019/05/25 23:50] (current) |
||
---|---|---|---|
Line 3: | Line 3: | ||
**General Information** | **General Information** | ||
- | Configuring the Django Web Framework and its dependencies. | + | Configuring the Django Web Framework and its dependencies. |
+ | \\ | ||
+ | The **EXAMPLE** sections of code end up building an inventory website. | ||
+ | |||
+ | \\ | ||
**Checklist** | **Checklist** | ||
* [[python_wiki: | * [[python_wiki: | ||
Line 24: | Line 28: | ||
* Run secure setup< | * Run secure setup< | ||
* Prompts for the following: | * Prompts for the following: | ||
+ | * Current password for root (should be none, just press enter) | ||
* Set database root password | * Set database root password | ||
* Remove anonymous users | * Remove anonymous users | ||
Line 46: | Line 51: | ||
Configuring Django. | Configuring Django. | ||
- | * Verify django works< | + | * Verify django works< |
>>> | >>> | ||
>>> | >>> | ||
Line 231: | Line 236: | ||
* Create logging directory and setup ownership/ | * Create logging directory and setup ownership/ | ||
chown :apache / | chown :apache / | ||
- | chmod g+rwx / | + | chmod g+rwxs / |
===== Admin Interface ===== | ===== Admin Interface ===== | ||
Line 237: | Line 242: | ||
* Create an admin user< | * Create an admin user< | ||
- | * Make your models/ | + | * Make your models/ |
from __future__ import unicode_literals | from __future__ import unicode_literals | ||
Line 902: | Line 907: | ||
< | < | ||
<tr class=" | <tr class=" | ||
- | <th class=" | + | <th class=" |
<th class=" | <th class=" | ||
<th class=" | <th class=" | ||
<th class=" | <th class=" | ||
<th class=" | <th class=" | ||
- | <th class=" | + | <th class=" |
</tr> | </tr> | ||
</ | </ | ||
Line 1546: | Line 1551: | ||
<a href="#" | <a href="#" | ||
+ | ---- | ||
+ | |||
+ | ====== Django: Static Files ====== | ||
+ | |||
+ | No matter which steps from above you skip, you absolutely need to collect static files to copy them into the location Apache expects them to be. | ||
+ | |||
+ | This is for Apache' | ||
* Collect static files< | * Collect static files< | ||
python manage.py collectstatic</ | python manage.py collectstatic</ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== DEBUG: TURN OFF ====== | ||
+ | |||
+ | Lastly, when you are not developing/ | ||
+ | |||
+ | \\ | ||
+ | Edit the project settings (/ | ||
+ | DEBUG = False</ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== Next Steps ======= | ||
+ | |||
+ | [[python_wiki: | ||
---- | ---- | ||