Thank you Mike, I have a project related question also on this group, maybe 
you have time and take a look, please see the link below: 

Django Related Project Section 
<https://groups.google.com/forum/#!searchin/django-users/Django$201.9$20-$20Create$20an$20app$20that$20use$20the$20models$20from$20another$20app$20and$20dynamic$20CBV/django-users/c8fKKiHTvAM/d3YMyk0DBgAJ>

On Thursday, June 2, 2016 at 2:42:43 AM UTC+3, Mike Dewhirst wrote:
>
> On 2/06/2016 12:54 AM, sevenr...@gmail.com <javascript:> wrote: 
> > I seen multiple project structure for Django, but they didn't discuss in 
> > detail about structuring mixins. 
> > 
> > I see that some people use mixins.py , others utils folder. 
> > 
> > Taking in consideration that I have many mixins for views(generic 
> > login,authorization and more specific for the project) and for models 
> > and I don't know if using only 1 file mixins.py is the best solutions. 
> > 
> > So, I'm looking for recommendations, from projects with many mixins 
> > (views and models) ? 
>
> What works for me may not work for you. Just organise things the way you 
> feel comfortable. The bottom line is that if you use mixins they have to 
> be imported into the module where they are used. 
>
> That means ... 
>
> from overthere.mixins import thismixin 
>
> If you share mixins across a number of apps in the same project make an 
> extra app called "common" and make a directory mixins so ... 
>
> from common.mixins import thismixin 
>
> If you want to keep view and model mixins separate then ... 
>
> from common.views.mixins import thismixin 
>
> or 
>
> from app.views.mixins import thismixin 
>
> or 
>
> from . import thisviewmixin 
> from . import thismodelmixin 
>
> And so on. Make up a structure which suits your brain productivity-wise 
> so you don't have to think about where you are importing from and you 
> can go straight there without thinking when you want to edit them. 
>
> Practicality beats purity 
>
> > 
> > -- 
> > 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 <javascript:> 
> > <mailto:django-users+unsubscr...@googlegroups.com <javascript:>>. 
> > To post to this group, send email to django...@googlegroups.com 
> <javascript:> 
> > <mailto:django...@googlegroups.com <javascript:>>. 
> > Visit this group at https://groups.google.com/group/django-users. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/django-users/0f1259db-17e2-4d5a-96cb-cf28e97fed96%40googlegroups.com
>  
> > <
> https://groups.google.com/d/msgid/django-users/0f1259db-17e2-4d5a-96cb-cf28e97fed96%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/69aa069a-68d1-4d7a-afa6-f2cfc61ffee9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to