Re: How to login different user each on different pages using class based views

2017-02-14 Thread ludovic coues
2017-02-14 12:00 GMT+01:00 JJEMBA KENNETH : > Hello guys, > I started using django a month back and I have been using class based views. > they are pretty good. Then am wondering how i can use them to implement > different categories of user where each is redirected to a different page.

How to login different user each on different pages using class based views

2017-02-14 Thread JJEMBA KENNETH
Hello guys, I started using django a month back and I have been using class based views. they are pretty good. Then am wondering how i can use them to implement different categories of user where each is redirected to a different page. Can anyone please help me with that. -- Jjemba Kenneth

Re: Using class based views.

2015-02-24 Thread Javier Guerra Giraldez
On Tue, Feb 24, 2015 at 1:51 AM, James Schneider wrote: > However, if you have working view functions, what is the"need" to switch to > CBV's? this. the switch to CBV, wasn't "modern Django views are classes instead of functions; Get rid of your functions!, FBV are dead!". Instead it's just t

Re: Using class based views.

2015-02-23 Thread James Schneider
Sure, you would just override the get() and post() and possibly dispatch() methods in your classes as needed. I always recommend the classy CBV inspector, helps immensely with understanding the available methods and inheritance in the CBV's. http://ccbv.co.uk/ Also check out the source code of D

Using class based views.

2015-02-23 Thread Ajay M
Hi all, I'm on a Django project, and I have written the following functions in my views.py. def my_view_function_1(request): #Some code return HttpResponse(--) def my_view_function_2(request): #Some code return HttpResponse(--) def my_view_function_3(request): #Som

Re: Looking for a round trip example of adding/editing/saving a record using class-based views

2012-03-19 Thread Lee Hinde
On Sun, Mar 18, 2012 at 4:11 PM, Lee Hinde wrote: > I'm looking for something like the vote function in step 4 of the tutorial, > but using class-based views.py. Any pointers would be appreciated. > > Thanks. Specifically, what's the equivalent of this block: def vote(request, poll_id): p

Looking for a round trip example of adding/editing/saving a record using class-based views

2012-03-18 Thread Lee Hinde
I'm looking for something like the vote function in step 4 of the tutorial, but using class-based views.py. Any pointers would be appreciated. Thanks. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit ht

Using class based views to autoassign certain values?

2011-01-17 Thread Sontek
When I try to add new Attendee with a class based view I get the error matriculation_attendee.event_id may not be NULL with this code: class Event(models.Model): """ Model representing an event """ place = models.ForeignKey(Place, blank=True, null=True) slug = AutoSlugField(populate_fr