Re: Why using Generic Views?

2012-04-07 Thread Phang Mulianto
HI,

i understand why need to use generic views after i code some of my function
like showing list of data, and the view is the same and i end up copy paste
it , not type it (smarter huh?) , just change my db object and pass to my
template.

well , generic view is come in the rescue and we can produce faster result
with less code, just call the generic function  in the url.py files and
point to your template to render.

hope help..

Mulianto

On Wed, Apr 4, 2012 at 10:36 PM, Dan Gentry  wrote:

> I use generic views - either function or class based - for the common
> functionality in my apps.  As Serge mentioned, a list works pretty
> much the same in every application, so I just provide a few parameters
> to a generic view.  More complicated forms still require custom code.
>
> On Apr 3, 1:07 am, abisson  wrote:
> > Good evening,
> >
> > I just finished the Django 1.4 Tutorial, and I really don't understand
> > the point of Generic Views in Django? As far as I can see, we wrote
> > more code than before, and what other example would make the Generic
> > Views better than normal views?
> >
> > Thanks for the clarifications!
>
> --
> 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.
>
>

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



Re: Why using Generic Views?

2012-04-04 Thread Dan Gentry
I use generic views - either function or class based - for the common
functionality in my apps.  As Serge mentioned, a list works pretty
much the same in every application, so I just provide a few parameters
to a generic view.  More complicated forms still require custom code.

On Apr 3, 1:07 am, abisson  wrote:
> Good evening,
>
> I just finished the Django 1.4 Tutorial, and I really don't understand
> the point of Generic Views in Django? As far as I can see, we wrote
> more code than before, and what other example would make the Generic
> Views better than normal views?
>
> Thanks for the clarifications!

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



Re: Why using Generic Views?

2012-04-03 Thread Sergiy Khohlov
Generic views helps  to avoid writting some part of the trivial code.
 For example :
you are writing a shop with goods and  a lot of the pages contains
list of the items.  You should  about sorting orders,  page selecting
etc.  If you are using generic views then you might not spend time at
this. Also if you are novice then you might avoid bugs in your code.
(less code , less bugs).
Disadvantages of this is next :
django is moving  from  function based generic view to  class based.
Unfortunately   class based does not have a lot documentation at this
moment.


 thanks, Serge


2012/4/3 abisson :
> Good evening,
>
> I just finished the Django 1.4 Tutorial, and I really don't understand
> the point of Generic Views in Django? As far as I can see, we wrote
> more code than before, and what other example would make the Generic
> Views better than normal views?
>
> Thanks for the clarifications!
>
> --
> 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.
>

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



Why using Generic Views?

2012-04-03 Thread abisson
Good evening,

I just finished the Django 1.4 Tutorial, and I really don't understand
the point of Generic Views in Django? As far as I can see, we wrote
more code than before, and what other example would make the Generic
Views better than normal views?

Thanks for the clarifications!

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