RE: Dumb newbie question
I kind of like that suggestion. I just finished refactoring that way. It has the effect of putting the admin and browse stuff with the data model which makes sense to me. Cheers, Bob -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Tom Evans Sent: Friday, February 17, 2012 10:12 To: django-users@googlegroups.com Subject: Re: Dumb newbie question On Fri, Feb 17, 2012 at 4:15 PM, Babatunde Akinyanmi <tundeba...@gmail.com> wrote: > I'm also a noob. If I had code that would use the same models then I > would keep everything inside one app but divide them into modules > I would say that is slightly sub optimal. There is nothing wrong with an app that consists solely of models, and another app which provides views, templates and forms which uses models from the first app and has no models of its own. Cheers Tom -- 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. -- 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: Dumb newbie question
On Fri, Feb 17, 2012 at 4:15 PM, Babatunde Akinyanmiwrote: > I'm also a noob. If I had code that would use the same models then I > would keep everything inside one app but divide them into modules > I would say that is slightly sub optimal. There is nothing wrong with an app that consists solely of models, and another app which provides views, templates and forms which uses models from the first app and has no models of its own. Cheers Tom -- 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: Dumb newbie question
I'm also a noob. If I had code that would use the same models then I would keep everything inside one app but divide them into modules On 2/17/12, Bob Carlsonwrote: > I'm well into beginning building my actual app after going through the > tutorial, > but I have no feel yet for the answer to this question. > > > > Can apps share a set of models? My application neatly divides into three > pieces, > but all the pieces share the same data. Should these be 3 apps or 1? Can > apps > freely share access to data models? > > > > Cheers, Bob > > > > -- > 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. > > -- Sent from my mobile device -- 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: Dumb newbie question
I'm also a noob. If I had code that would use the same models then I would keep everything inside one app but divide them into modules On 2/17/12, Bob Carlsonwrote: > I'm well into beginning building my actual app after going through the > tutorial, > but I have no feel yet for the answer to this question. > > > > Can apps share a set of models? My application neatly divides into three > pieces, > but all the pieces share the same data. Should these be 3 apps or 1? Can > apps > freely share access to data models? > > > > Cheers, Bob > > > > -- > 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. > > -- Sent from my mobile device -- 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: Dumb newbie question
Yes, they just need to import the models from the module that they need. Be aware, of circular imports, though. That is when one module imports from another which also imports from the first one. Check the imports at the top to make sure the module from which you are importing classes, modles, defs, constants, does not import anything from the module that you are importing into. Funny things happen, when you have circular imports, and when you are beginning out they can be hard to troubleshoot. Furbee On Fri, Feb 17, 2012 at 7:43 AM, Bob Carlsonwrote: > I’m well into beginning building my actual app after going through the > tutorial, but I have no feel yet for the answer to this question. > > ** ** > > Can apps share a set of models? My application neatly divides into three > pieces, but all the pieces share the same data. Should these be 3 apps or > 1? Can apps freely share access to data models? > > ** ** > > Cheers, Bob > > ** ** > > -- > 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. > -- 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.
Dumb newbie question
I'm well into beginning building my actual app after going through the tutorial, but I have no feel yet for the answer to this question. Can apps share a set of models? My application neatly divides into three pieces, but all the pieces share the same data. Should these be 3 apps or 1? Can apps freely share access to data models? Cheers, Bob -- 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.