When to create a new app

27 views
Skip to first unread message

Cictani

unread,
Mar 9, 2018, 1:06:29 PM3/9/18
to Django users
Hello,

I have problem to figure out when I should create a new app in my Django project. Can you give me some Tipps?

Best regards

Andreas

Andréas Kühne

unread,
Mar 10, 2018, 5:31:31 AM3/10/18
to django...@googlegroups.com
Hi Andreas,

I would say that this depends on your use case. I try to group functionality or domains in my apps. So for example I have all of the invoicing views and models in one app, all of the user models and views in another app. There are some models that have relationships to other models in other apps but thats the way I do it. So I try to group all of the functionality that is the same in one app.

If you want to create a reusable app however (for posting on pypi), you should not add any dependencies on other apps - but that is a different conversation. 

Hope that helps!

Regards,

Andréas

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django...@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/be81b68a-8a0a-436a-8115-c97166348e9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Cictani

unread,
Mar 10, 2018, 11:10:25 AM3/10/18
to Django users

Hi Andréas,

thank you. Currently I am working on a db app for ant species (https://github.com/Cictani/antkeeping_info). Each ant species can be native to several countries and other regions (states for example). I created a separate regions up which contains the models for Country and Region .
It also contains views to query ants native to a specific regions. However now I am thinking if it actually all belonged into the ants app... Since in the ants it is all too related.

ansh srivastav

unread,
Mar 10, 2018, 2:02:10 PM3/10/18
to django...@googlegroups.com
Most amazing part about django is every stuff related to a new app!
Suppose you may want to create a game and in that first the user have to intimate the move, so for that an app is created !


--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
Reply all
Reply to author
Forward
0 new messages