Monday, April 21, 2014

Re: Interesting Django project folder structure.

Hi,

Cool. But I see it'd work pretty nicely when you have many custom apps and libs.

When you do "./manage.py startapp newapp", Django create the "newapp" as the layout I'm using.
AndI have a Django site which contains four Custom apps. The layout I'm using works fine. Just wonder is there
any other benefits to change to the suggested layout?

Cheers 

On Monday, 21 April 2014 15:04:42 UTC+1, Mrinmoy Das wrote:

Hi,

The suggested folder structure is the standard stuff that is generally used. I personally and all the teams I have worked with uses this particular structure.

sent form mobile, apologies for the brevity

On Apr 21, 2014 7:30 PM, "Tianyi Wang" <wty5...@gmail.com> wrote:
Today I was reading through http://www.deploydjango.com/django_project_structure (great resource)

The suggested folder structure for a Django project from this site is like below:
(I'm only interested in layout for Django apps, not requirements files or settings files)

myproject      |-- manage.py
    |-- requriements.txt      |-- myproject          |-- __init__.py
        |-- settings.py          |-- urls.py          |-- wsgi.py
        |          `-- apps
            |-- __init__.py
            |-- app_one
            |   |-- __init__.py              |   |-- models.py              |   |-- views.py              |   `-- urls.py              `-- app_two                  |-- __init__.py                  |-- models.py                  |-- views.py                  `-- urls.py

My current setup is like below:

myproject      |-- manage.py
    |-- requirements.txt      |-- myproject      |   |-- __init__.py      |   |-- settings.py      |   |-- urls.py      |   `-- wsgi.py      `-- app_one      |   |-- __init__.py      |   |-- models.py      |   |-- views.py      |   `-- urls.py      `-- app_two          |-- __init__.py          |-- models.py          |-- views.py          `-- urls.py

The reason for the first layout is to categorise the apps, 
so one can have a "apps" folder contains all the custom apps;
"libs" folder contains all the lib/helper apps and such.

Do you guys think it's a good idea? 

Cheers

Tianyi  

--
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/37ecd6cb-6dcc-431e-ae39-3814dbf647de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@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/39310e7b-cf6b-492f-a043-66a8f2204a36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment