Hi Guys,
And i want ask about settings.py, if we make the settings become a folder and put dev.py, prod.py, any step to make manage.py know which one to load. Seems there is no info about it in the blog.
I often create a settings module like above:
settings
-->__init__.py
------>base.py
------>custom.py
The __init__ file imports everything from base and custom, custom imports everything from base and can replace any base settings. This way I can put the __init__ and base files in the repo but keep custom not tracked, since it is environment specific.
What are you doing about the project name? I am using the project folder as the trunk root, so, doesn't matter what will be his name. The default app generally is the project name but we prefer to call it main, so every project have the same layout, with the same default app... What do you think about it?
Best regards,
Michel Sabchuk
-- settings
-->__init__.py
------>base.py
------>custom.py
The __init__ file imports everything from base and custom, custom imports everything from base and can replace any base settings. This way I can put the __init__ and base files in the repo but keep custom not tracked, since it is environment specific.
What are you doing about the project name? I am using the project folder as the trunk root, so, doesn't matter what will be his name. The default app generally is the project name but we prefer to call it main, so every project have the same layout, with the same default app... What do you think about it?
Best regards,
Michel Sabchuk
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/mXjdt7lOt4wJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment