Re: What's your opinion about nested apps?

79 views
Skip to first unread message

Sergiy Khohlov

unread,
Jan 11, 2013, 10:00:37 AM1/11/13
to django...@googlegroups.com
keep in mind comas

INSTALLED_APPS = (

'incidences',
'problems',
)
2013/1/11 David Medina <davidm...@gmail.com>:
> INSTALLED_APPS = (
> 'trouble_ticketer',
> 'trouble_ticketer.incidences'
> 'trouble_ticketer.problems'
> )



Many thanks,

Serge


+380 636150445
skype: skhohlov

David Medina

unread,
Jan 12, 2013, 9:37:14 AM1/12/13
to django...@googlegroups.com
It's only a email typo, never mind. I wanted to explain the "nested" concept with code.

The main question could be: Has it any side effects?, Third apps maybe?. I haven't found nothing about it in official doc and so on.

Fernando Rocha

unread,
Jan 12, 2013, 11:36:18 AM1/12/13
to Django users


On Jan 12, 11:37 am, David Medina <davidmedi...@gmail.com> wrote:
> It's only a email typo, never mind. I wanted to explain the "nested"
> concept with code.
>
> The main question could be: *Has it any side effects?*, Third apps maybe?.

I had some issues with commands with an app that uses a similar
structure.

More about it here::
https://code.djangoproject.com/ticket/14087
https://github.com/kylemacfarlane/django-cuddlybuddly-storage-s3/issues/4

> I haven't found nothing about it in official doc and so on.
>
> El viernes, 11 de enero de 2013 16:00:37 UTC+1, Sergiy Khohlov escribió:
>
>
>
>
>
>
>
>
>
> > keep in mind comas
>
> > INSTALLED_APPS = (
>
> >     'incidences',
> >     'problems',
> > )
> > 2013/1/11 David Medina <davidm...@gmail.com <javascript:>>:

Sam Solomon

unread,
Jan 12, 2013, 4:02:12 PM1/12/13
to django...@googlegroups.com
We've not had any trouble and we have a very nested structure:

project/main_app/sub_apps/

project has manage.py, main_app has main urls.py, etc.

sub_apps have models/views/urls, etc.

We also have:

project/main_app/utils/other_apps/ with no issues (and utils and other_apps both have models, even though utils/models.py may not have been the best decision).

Also note that many third party apps do stuff like this too (django-allauth is one that comes to mind).

Sithembewena Lloyd Dube

unread,
Jan 12, 2013, 7:37:01 PM1/12/13
to django...@googlegroups.com
Why does this sort of nesting even occur? Why not use the generic Django project/ app structure, where you have a project and apps under a project, instead of apps under other apps? Why would it ever be necessary to 'nest' apps in other apps?

--
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/-/XOwYE_Yj9vQJ.

To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Regards,
Sithu Lloyd Dube

Sithembewena Lloyd Dube

unread,
Jan 12, 2013, 7:38:02 PM1/12/13
to django...@googlegroups.com
I also suspect that this sort of nesting will affect plugability of apps - what is wrong with a simple approach?

On Sat, Jan 12, 2013 at 11:02 PM, Sam Solomon <sss...@gmail.com> wrote:

--
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/-/XOwYE_Yj9vQJ.

To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Sam Solomon

unread,
Jan 12, 2013, 7:45:56 PM1/12/13
to django...@googlegroups.com
I agree, the simple approach may be good for some things, but we have a highly complex tightly coupled main app that for us, we believe it's easiest to keep bundled together. If we add/write new, more generic apps to our site, we would obviously consider adding it as an app in the "project/" folder.

Thinking back, we may have gone too far in this direction from our last site where we were using pre-1.4 directory structure where everything was flat and we had 40 apps in one directory, which starts getting a bit unwieldy (sort annoying for auto-completes and also doesn't allow you to show how different "apps" are related at all)

Nikolas Stevenson-Molnar

unread,
Jan 12, 2013, 7:47:21 PM1/12/13
to django...@googlegroups.com
The same reason you'd nest Python modules: the scope of the app is broad or complex enough to justify separating into more discrete components, yet those components are not independent from each other or from the top-level app.

_Nik
Sithu Lloyd Dube --
You received this message because you are subscribed to the Google Groups "Django users" group.

David Medina

unread,
Jan 14, 2013, 5:18:08 AM1/14/13
to django...@googlegroups.com
I suspect that too, but I don't know how and when.

In fact, I prefer the simple approach of all apps in the same scope, but I'd to know how this "feature" works because it seems to work like usual top-apps, and why it isn't documented.

I open this discussion because I want to know if there are some real cases with side effects documented

Thanks for answers and support

Best regards
Reply all
Reply to author
Forward
0 new messages