Re: Projects vs. apps
django.contrib.admin is an example of an app. You can use it in multiple projects by specifying it in INSTALLED_APPS. apps that can be used in multiple projects are typically pip-installable. Regards, Antonis Antonis Christofides http://djangodeployment.com On 01/17/2017 12:44 AM, Thufir Hawat wrote: > Not sure that I follow: > > What’s the difference between a project and an app? An app is a Web > application that does something – e.g., a Weblog system, a database of public > records or a simple poll app. A project is a collection of configuration and > apps for a particular website. A project can contain multiple apps. An app can > be in multiple projects. > > > How can an app be in multiple projects? If someone would make that sentence > more concrete that would be appreciated. > > > thanks, > > Thufir > -- 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/1f4d9b14-7f57-4b4f-2ba6-1774aa5e1522%40djangodeployment.com. For more options, visit https://groups.google.com/d/optout.
Re: Projects vs. apps
On 17/01/2017 9:44 AM, Thufir Hawat wrote: Not sure that I follow: What’s the difference between a project and an app? An app is a Web application that does something – e.g., a Weblog system, a database of public records or a simple poll app. A project is a collection of configuration and apps for a particular website. A project can contain multiple apps. An app can be in multiple projects. How can an app be in multiple projects? If someone would make that sentence more concrete that would be appreciated. A Django "app" is just part of a project. A simple project must have at least one app to contain the models, views and templates. More complex projects would get unwieldy (code-wise) if you couldn't split them into multiple apps. Think of these as multiple directories containing separate sets of models, views templates - but which can connect to each other by using the ordinary Python "import" mechanism. Those multiple directories have names equal to the app names. So from app.models import Classname becomes an easy way of simplifying your project into multiple directories.. er apps. In the settings, you need to name all the apps (dirs) in the project so Django knows where to find all the models and so on. If you know you will use a particular part of one project (an app - say for inserting note records into a table) in another project you can copy/paste and adjust the edge bits so it works in that other project. On the other hand, if you are disciplined and careful you can use object oriented programming techniques (and the Django docs) to write those edge bits in a non-specific way so it can slot unchanged into other projects which are expecting it. That app can be in multiple projects. If you are really disciplined and part-guru you can make such apps public for us lesser mortals to install and save us from re-inventing that particular wheel. But that's another story :) Cheers Mike thanks, Thufir -- 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/d0542aff-2079-3d87-99ba-66f160c7eb91%40dewhirst.com.au. For more options, visit https://groups.google.com/d/optout.
Projects vs. apps
Not sure that I follow: What’s the difference between a project and an app? An app is a Web application that does something – e.g., a Weblog system, a database of public records or a simple poll app. A project is a collection of configuration and apps for a particular website. A project can contain multiple apps. An app can be in multiple projects. How can an app be in multiple projects? If someone would make that sentence more concrete that would be appreciated. thanks, Thufir -- 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/alpine.DEB.2.20.1701161442530.1694%40qbtr.obhaprzr.arg. For more options, visit https://groups.google.com/d/optout.
Re: modular django site: projects vs. apps
I believe that's I choose the first option. thx for your answer!! On May 12, 5:06 pm, George Songwrote: > On 5/12/2009 3:27 AM, mabuse wrote: > > > I am developing a django site and my aim is to obtain a site with a > > core application that would be the site basis and above it addons > > that would upgrade the standard application ( like firefox and its > > extensions). > > > My question is, how can I achieve that? My idea is to create two > > projects: > > 1. One project would be the "core project": with all basic apps. > > 2. The other would be the "addons site project": including the addons > > configured as apps. > > > Is it the best solution? Or it would be nicer to have only one project > > and the addons configured as separate apps? > > It depends on if these "add-ons" are truly independent apps or not. If > they can't be used outside of the context of your core project, then > there's no need to separate them, really. > > If they are meant to be independent, then you'll need to take care that > they have no dependences on *any* project whatsoever. And preferably not > on other apps as well (except maybe django.contrib ones). > > -- > George --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: modular django site: projects vs. apps
On 5/12/2009 3:27 AM, mabuse wrote: > I am developing a django site and my aim is to obtain a site with a > core application that would be the site basis and above it addons > that would upgrade the standard application ( like firefox and its > extensions). > > My question is, how can I achieve that? My idea is to create two > projects: > 1. One project would be the "core project": with all basic apps. > 2. The other would be the "addons site project": including the addons > configured as apps. > > Is it the best solution? Or it would be nicer to have only one project > and the addons configured as separate apps? It depends on if these "add-ons" are truly independent apps or not. If they can't be used outside of the context of your core project, then there's no need to separate them, really. If they are meant to be independent, then you'll need to take care that they have no dependences on *any* project whatsoever. And preferably not on other apps as well (except maybe django.contrib ones). -- George --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
modular django site: projects vs. apps
I am developing a django site and my aim is to obtain a site with a core application that would be the site basis and above it addons that would upgrade the standard application ( like firefox and its extensions). My question is, how can I achieve that? My idea is to create two projects: 1. One project would be the "core project": with all basic apps. 2. The other would be the "addons site project": including the addons configured as apps. Is it the best solution? Or it would be nicer to have only one project and the addons configured as separate apps? thanks in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---