OK
As I have said I'm coming from java so it's not so easy to change my
mind to a totally different approach.

But I'm still curious if there is any before or after interceptor in django.
Or how to implement one using a django style.

Thank you
Daniel




On Mon, Jun 29, 2009 at 12:05 PM, James Gregory<james....@gmail.com> wrote:
>
>
>
> On Jun 29, 10:59 am, Daniel Guryca <dun...@gmail.com> wrote:
>> Hi,
>>
>> I'm very new to django and python .. coming from java world.
>>
>> I really like django structure (apps, ...) but I do not understand how
>> one can create some base class where all general methods same for all
>> views could be put.
>> You know I can see that views.py is only a module I would rather
>> expect class in it and all methods part of this class. Then this class
>> could extend my BaseViewClass.
>>
>> Is something like before and after interceptors possible in django ?
>> Then I would not need any base class.
>>
>> Thank you.
>> Cheers
>> Daniel
>
> A class is just a collection of methods and data. In Django views do
> not have any data, because that is fetched from the model. So where is
> the advantage of having your methods part of a class rather than just
> functions which are part of the module? It would just mean you would
> have to add one extra layer of indentation to everything. If you want,
> think of the views.py module as being a class with no data members.
>
> James
>
>
> >
>

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