On Wed, May 8, 2013 at 10:01 AM, Tim Johnson <t...@akwebsoft.com> wrote:

> FYI1: 'Old' pythonist, but CGI and cli utilities only. django noob.
> I'm playing with django (~1.3) and using "Django 1.0 Website
> development" by Hourieh as a a tutorial.
>
> FYI2: I have developed and used my own MVC'ish framework for some
> time now.
>
> It would be my preference to locate an app under an apps directory.
> I.E. where Hourieh would have one create an app, one would would
> create an 'apps' directory at the next level below the project root,
> then create the application below that level.
>
> Example
> cd my/shiny/new/django/project
> django-admin.py startproject myproj
> mkdir apps
> cd apps
> manage.py startapp myapp1
>
> I can't imagine any issues with that, but if anyone were to, please
> let me know your opinion.
>

As long as you can set up the PYTHONPATH so that the modules can be
imported, there's no issues with this approach. A Django "App" is just a
Python module. As long as it can be imported, you can use it. In fact,
you'll find some people who advocate for keeping your "apps" directory
completely separate from your project directory, to emphasise the fact that
in order to maximise reusability, the app should be completely independent
of your project.

The only real restriction is a django-related namespace issue -- you can't
have two apps with the same name, even if they have different fully
qualified module paths (i.e., you can't have my.little.admin and
django.contrib.admin in the same project because they both have an app name
of "admin").

Yours,
Russ Magee %-)

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to