placing views and models in configuration root

27 views
Skip to first unread message

Andreas Bloch

unread,
Apr 28, 2014, 2:27:05 AM4/28/14
to django...@googlegroups.com
is it bad practice to create a views.py and models.py file and place it in the configuration root? (the folder that is created when you run "startproject <project_name>" which contains the settings, urls, and uwsgi file")

Venkatraman S

unread,
Apr 28, 2014, 2:46:19 AM4/28/14
to django...@googlegroups.com
On Mon, Apr 28, 2014 at 11:57 AM, Andreas Bloch <abl...@gmail.com> wrote:
is it bad practice to create a views.py and models.py file and place it in the configuration root? (the folder that is created when you run "startproject <project_name>" which contains the settings, urls, and uwsgi file")

An unequivocal 'Yes' :) 


-V

Andreas Bloch

unread,
Apr 28, 2014, 2:54:32 AM4/28/14
to django...@googlegroups.com
aaaalrighty then - I will create an app then...

Andreas Bloch

unread,
Apr 29, 2014, 2:36:27 AM4/29/14
to django...@googlegroups.com
so what do you when you're making trivial sites, that don't have any database models, like about-page, landing-page and so on?
would you make a separate app for those and stuff them all in there or just use templateviews and route them from the configuration root urls.py?

Venkatraman S

unread,
Apr 29, 2014, 3:08:34 AM4/29/14
to django...@googlegroups.com
Use nginx and serve static content . Why use django?

-V


On Tue, Apr 29, 2014 at 12:06 PM, Andreas Bloch <abl...@gmail.com> wrote:
so what do you when you're making trivial sites, that don't have any database models, like about-page, landing-page and so on?
would you make a separate app for those and stuff them all in there or just use templateviews and route them from the configuration root urls.py?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6399b238-222a-42f5-9786-b416e01234fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andreas Bloch

unread,
Apr 29, 2014, 3:11:31 AM4/29/14
to django...@googlegroups.com
because they are sites in a bigger django project with multiple apps...

Venkatraman S

unread,
Apr 29, 2014, 4:48:34 AM4/29/14
to django...@googlegroups.com
On Tue, Apr 29, 2014 at 12:41 PM, Andreas Bloch <abl...@gmail.com> wrote:
because they are sites in a bigger django project with multiple apps...

I think you are referring to something like a company website along with a SaaS solution. 
If yes, there are multiple ways could be done. But a quick solution is obviously to do TemplateViews - in which case you are routing purely from your urls.py.
Reply all
Reply to author
Forward
0 new messages