Am Donnerstag, 19. November 2015 15:12:16 UTC+1 schrieb Collin Anderson:
>
> What's a sitecustomize.py? :)
>


This module is automatically imported during initialization if the 
interpreter.

We use it to:

 - sort sys.path.
 - monkey patching. During the Update from Django 1.6 to 1.7 we added an 
empty django.setup() to make code work on 1.6 and 1.7

See https://docs.python.org/2/library/site.html



 

> I think apps _can_/_may_ be reusable. I have plenty of non-reusable apps. 
> Why should they be reusable?
>

Yes, you are right. In my context we focus on re-usablity. We create 
software which gets used by
several customers (each running in their intranet). If you have only one 
plattform, then the
"should" is too strong. 
 

> I think apps _should_ not depend on a project.
>
>
If an app depends on the project there is a circular dependency. This 
should be avoided.
See https://en.wikipedia.org/wiki/Circular_dependency

That's why I vote for "An app must not depend on a project".

Thank you Collin for your feedback. I still hope some other people join 
this thread.

Regards,
  Thomas 

 

>
> On Thu, Nov 19, 2015 at 4:54 AM, guettli <guet...@thomas-guettler.de 
> <javascript:>> wrote:
>
>> I created a ticket to find a better definition of "Project" vs "App"
>>
>> https://code.djangoproject.com/ticket/25748
>>
>> I am happy since Tim Graham accepted it.
>>
>> Here are the current docs: 
>> https://docs.djangoproject.com/en/1.8/ref/applications/#projects-and-applications
>>
>> Here is my view of Project" vs "App". It would be nice to find a 
>> consensus and update the docs.
>>
>> Project
>> ======
>> A project is a container for apps.
>> It contains only settings, no database models.
>> Since it contains no database models it does not contain database schema 
>> migrations.
>> It can contain migrations which fill a database with project specific 
>> data.
>> It is common that there is only one production installation of one 
>> project.
>> It is common to have several stages (dev, test, prod) for one project.
>> A project might contain a sitecustomize.py
>>
>> App
>> ===
>> An app can have models, views and code.
>> It should be re-usable.
>> An app can depend on other apps.
>> It must not depend on a project.
>> An app can contain a settings.py for testing, but it contains no settings 
>> on its own.
>> It should have instructions which settings are needed to get the app 
>> running in a project.
>> A app must not contain a sitecustomize.py.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django developers (Contributions to Django itself)" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-develop...@googlegroups.com <javascript:>.
>> To post to this group, send email to django-d...@googlegroups.com 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/django-developers.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-developers/1a7e8d69-1970-4b07-b820-90c4d652486b%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-developers/1a7e8d69-1970-4b07-b820-90c4d652486b%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 developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/188ce7e0-73a3-45f4-81d6-3acaa7bea7ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to