Hallöchen!

MattR writes:

> [...]
>
> Should the view code be in a file called views.py?  It seems like
> this file could get rather large and hard to manage, is there some
> suggested way to break it up?

I have a subdir "views", with roughly one module per model, each
typically containing "show" and "edit".  "edit" covers editing and
creating of an object.  Additionally, the views subdir contains
modules with common view code in order to avoid code dublication.
This works very well.

> Should the files with views even be called views.py, or should the
> filename indicate the functionality of the view?

I call them after the respective model.

Since Django supports the explicit way, you are rather free in your
naming conventions.

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus
                   Jabber ID: torsten.bron...@jabber.rwth-aachen.de
                                  or http://bronger-jmp.appspot.com


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to