On Jul 15, 3:20 pm, "Waylan Limberg" <[EMAIL PROTECTED]> wrote:
> Vicvicvic,
>
> I think your on to something here. However, we need to remember that
> one of the great things about Django views is that they are just
> python functions. You can do pretty much anything you want. So, if
> someone wants to build up a complete html page in python code without
> any templates, they can. It will be a maintenance headache, so it's
> not recommended, but its not wrong.
>
> If you want to build up a library of decorators that simplify your
> views (and, no doubt, speed up your work), then you are free to do so.
> And if you want to share that library with others, that's even better.
> In fact, if you search through djangosnippets.com, I believe you'll
> find a few snippets that do some of the same things your talking
> about.

When I feel confident that my code is clean enough, I will absolutely
share it. :)

> However, I don't expect that the Django core will take on your
> approach as the "preffered" way to do things. The flexibility of the
> views to allow various coding styles is one of Django's greatest
> strengths. You can do what works for you and I can do what works for
> me.
>
> So keep it up. Share your work and make Django a better place for
> others who like that style of coding. Just don't expect the entire
> community to embrace it as the "only way".

Point taken :) Nevertheless, having a decorator described above would
not change anything, it would just add flexibility (in my mind). The
decorator would obviously only apply to whichever views you decorate,
so it only forces it behavior on the views you want to use.

The talk about redefining HttpRequest etc., however, is on a
considerably different level. THAT would probably not go in the core
until someone says "Hey, let's bring the goodness of Django to the
desktop!" and I'm not even interested in doing it myself. The thought
just popped up in my head.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to