Re: How to split up views into different files...

2007-08-06 Thread Doug B

You can make a 'views' subfolder in your app folder, and make sure it
contains an __init__.py file (can be empty).

My personal opinion is that going overboard trying to make your python
file structure 'neater' will eventually bite you in the ass. It wasn't
too bad for views, but became import hell with models and utility
files.   I spent the better part of a day a few weeks ago getting rid
of most of my subfolders because they were nothing but a hassle.


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: How to split up views into different files...

2007-08-06 Thread oggie rob

There are no restrictions at all on this. Remember that the view is
called via urls.py, so you define your different views & files there.

Just a point of interest, though - models don't always match up with
views. In fact, most of my views contain at least two or three models.
Rather than break them up by model, I choose to break them into
separate files by function (e.g. calendar-like function, wizard-like
views, etc). This has let me keep my view files at a manageable size
and imports/references/conflicts to a minimum.

 -rob

On Aug 6, 8:40 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I'd like to have a separate view files for each model just to make
> everything a little neater. What's the best way to do this?


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



How to split up views into different files...

2007-08-06 Thread [EMAIL PROTECTED]

I'd like to have a separate view files for each model just to make
everything a little neater. What's the best way to do this?


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---