It's mostly preference, use what suits you.  I prefer having all of my apps 
in an 'apps' directory for organization's sake.  I may not have an issue 
keeping track of them now, but if a project gets large it could get unruly. 
 Anyone else that wants to contribute to any of my projects may benefit 
from the clarity as well. To create a new app in a subdirectory, all you 
need to do is specify the path with startapp. Simple example from your 
project root:

mkdir -p ./apps/new_app

./manage.py startapp new_app ./apps/new_app

 


On Monday, April 21, 2014 9:33:48 AM UTC-7, Tianyi Wang wrote:
>
> 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<https://groups.google.com/d/msgid/django-users/37ecd6cb-6dcc-431e-ae39-3814dbf647de%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> 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+unsubscr...@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/96443218-bc40-4202-a816-b196897be832%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to