Charles,
I've always seen a Project as a Site. Although there are situations that that may not be true, for most of us, it probably is.
I've seen an App as a grouping of functionality. Examples would be Blog, Forums, News, Gallery, etc.
Good design practices should keep as much internal within each App as possible, so you can use the app with other projects. That is why you would have a urls.py and a views.py in each App directory.
Each App is linked into the main project by: INSTALLED_APPS in settings.py and configuring a base url (eg. /blog ) that then references the App's urls.py.
For authentication, you can use the contrib.auth. They don't have access to the admin unless they are a member of staff.
Hope that helps,
Corey On Aug 29, 2006, at 12:16 PM, charles sibbald wrote: Hi Guillermo,Thanks for the help.I have been on your SVN, but how do i tell Django that each little app has its own urls.py? is putting it in the directory enough to automatically let django know that each little app has its own urls.py?Also for authenticating users, do i use django.contrib.auth, which is the same as the admin system.
I dont want users to have access to my backend system.
Regards
Charles
----- Original Message ----From: Guillermo Fernandez Castellanos <[EMAIL PROTECTED]>To: django-users@googlegroups.comSent: Tuesday, August 29, 2006 3:47:51 PMSubject: Re: Creating new appsHi,I did my own homepage (www.haruki.eu) where I have several"applications" done together.As I understood after asking in the list and looking at severalproject svn trees, the 2nd way seems to be prefered for a sizableapplication. It allows modularity and reusability.What I do is have a name for the general project and all the appsthere. Each app has its own urls.py, and I let users define their ownurls.py that will include the urls.py of each application depending ofthe ones they want to add or use.You can have a look at the code here:http://www.guindilla.eu:8000/guindilla/trunk/Hope it helps.GOn 8/29/06, casibbald <[EMAIL PROTECTED]> wrote:>> I have been through the Django tutorial, but there is something it does> not clearly outline.>> After creating a project, I have to create my first App, which in the> tutorial it was Polls.>> I now want to start working on my own Application and wonder what the> best structure is for a sizable application which I hope it will grow> to as I learn more.>> So option 1.>> Project --- App -- Views (multiple views for my whole project)>> Option 2.>> Project --- App1 -- Views> Project --- App2 -- Views> Project --- App3 -- Views> Project --- App4 -- Views>> Multiple component apps to the whole project?>> and if option 2 is the better route to go, then for example would the> following be a good example.>>> Project --- Auth -- Views - Registration> Login> Pass-Reminder> Project --- Dashboard -- Views - Welcome> Report 1 + n> Project --- Account -- Views> Address> Credit Details> Project --- App + n -- Views>>> The issue I have been having is this, how best to then setup my URLs?,> as the tutorial does not explain how to have many apps in the same> urls.py file>>> >>
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---
|