Answer the question
In order to leave comments, you need to log in
Why does django startproject create such a strange project structure?
A Django project consists of one or more applications. Startproject creates a project so that the settings (settings.py) are inside one of the applications. Moreover, no solution is proposed for separating settings into dev and production.
As far as I remember, in the first versions of Django, settings were taken out of applications and lay next to manage.py. Why were they added to the application directory?
Answer the question
In order to leave comments, you need to log in
1. in db.conn.php
<?
<?php
is a typo or is it true?
2. remove the closing ?> in all files, if there is at least some character after them, you will get this error
Try the following:
- turn off the display of errors on the page. At the very beginning of the script, specify ini_set('display_errors', '0'), or configure the PHP configuration on the server, or configure it in .htaccess
- Check the file encoding. Must be the same for all files. If UTF-8, then convert to UTF-8 without BOM
for normal operation and debugging, write error output to a log file and analyze it
To separate into dev and production, you can do
projectdir/projectdir/settings/__init__.py
projectdir/projectdir/settings/dev.py
projectdir/projectdir/settings/prod.py
projectdir/projectdir/settings/common.py
And patch manage.py accordingly and wsgi.py or even frontend settings.
But in 1.7, a new config system for individual applications, it's not a fact that it will work with this approach.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question