Re: docstrings for inherited models not showing in Admin Docs

2012-11-11 Thread David Simmons
Mike thanks for the quick response. I'll take a look at the source. cheers Dave -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/isD2JdKwX5YJ. To post to

Re: AttributeError for unique field during ModelForm validation

2012-11-11 Thread Andrejus
Unfortunately I haven't got experience with abstarct models, one thing I clearly carried out form docs - abstract model has only one clear purpose - to avoid duplicating the same fields and methods when writing code for models. Abstract model is never transformed to database table, so may not

Re: AttributeError for unique field during ModelForm validation

2012-11-11 Thread Rohit Banga
Thanks Andrejus. Looks like you understand my usecase. I have to use multiple tables with the same schema which is why I am using inheritance. I am using abstract base models as each model should get its own table. If I use multi-table inheritance data from all these tables ends up in one table whi

Re: Admin, m2m relationship and custom save method: is save_related of any help?

2012-11-11 Thread Fabio Natali
On 02/11/12 08:00, Fabio Natali wrote: Hi! Snippet: http://dpaste.com/822354/ In the admin I make use of a tabular inline to possibly create Product and Component objects at the same time. [...] I ended up using signals, which looks like an obvious solution now. Whenever I save or delete a

Re: CBV for Nested Formesets

2012-11-11 Thread Kevin
This example code and example is based on the tutorial provided in your URL. Formsets do not have a save_all() function by default. The provided save_all() does not return back any object, so you should provide a success_url or override the function get_success_url() in your class. You'll need

How many developers have moved to class-based views?

2012-11-11 Thread Kevin
Hello! I am curious of how many existing Django developers have moved over to class-based views or are still using the function-based ones. I tend to use a mix depending on what I am trying to do. I try to stick with class-based views, but fallback to function-based ones for process-based

custom User model and login()

2012-11-11 Thread Anil Jangity
I am trying to build a User model with a dedicated LDAP backend. I have no SQL database. def login(request): ... login(request, user) request.user.is_authenticated() ---> return True return HttpResponseRedirect("/manage") def manage(request): print request.user.is_authenticated(

Re: How many developers have moved to class-based views?

2012-11-11 Thread Lachlan Musicman
I'm about to start transferring a few function based views, but like you am using a mix as needed as it stands. Re documentation, the docs on the dev stream have significantly more useful and comprehensive info for class based views. I think that there will always be a use for function based view

Re: How many developers have moved to class-based views?

2012-11-11 Thread Arnold Krille
On Sun, 11 Nov 2012 09:57:16 -0800 (PST) Kevin wrote: > Hello! > > I am curious of how many existing Django developers have moved over > to class-based views or are still using the function-based ones. I > tend to use a mix depending on what I am trying to do. I try to > stick with class-base

Re: How many developers have moved to class-based views?

2012-11-11 Thread Lee Hinde
The dev docs are much more informative. On Sun, Nov 11, 2012 at 10:45 AM, Arnold Krille wrote: > > Docs on CBV in django1.4 are a bit sparse to say the least. > > > Have fun, > > Arnold > -- You received this message because you are subscribed to the Google Groups "Django users" group. To p

Re: How many developers have moved to class-based views?

2012-11-11 Thread Kevin
Wow, the dev docs are much more informative and actually explains the best way to alter a form before saving it. I was using a different method, but the method mentioned in the dev docs are much more cleaner than what I was doing. Many thanks for this. On Sunday, 11 November 2012 12:54:45 UTC

django mogilefs file backend?

2012-11-11 Thread DK
Is there any working django 1.4 file backend for MogileFS? I've tried django-storages but it doesn't seem to work properly (stores a filename instead of content!?) and it does not implement open() method on stored file. -- You received this message because you are subscribed to the Google Grou

Re: Queries to multiple tables

2012-11-11 Thread Matt Schinckel
Following up: if it affects a single instance of an object, then it belongs as a model method. If it affects any number of them, then it should perhaps go on the manager (or even the queryset: I use django-model-utils PassThroughManager for this a lot). Matt. On Sunday, November 11, 2012 3:53

Exporting tuple/dictionary within django html template

2012-11-11 Thread Hemanshu Ahuja
Hi Folks, I want to export data from my named tuple within my django html template. Can someone please point me to an example or let me know how to accomplish this? I know how to get this done within my python script but this time I want to get this done inside of my html template page. Basically

Re: custom User model and login()

2012-11-11 Thread Russell Keith-Magee
On Mon, Nov 12, 2012 at 2:08 AM, Anil Jangity wrote: > I am trying to build a User model with a dedicated LDAP backend. I have no > SQL database. > > def login(request): >... >login(request, user) >request.user.is_authenticated() ---> return True >return HttpResponseRedirect("/m

Re: How many developers have moved to class-based views?

2012-11-11 Thread Kurtis Mullins
I use them! On Sun, Nov 11, 2012 at 2:05 PM, Kevin wrote: > Wow, the dev docs are much more informative and actually explains the best > way to alter a form before saving it. I was using a different method, but > the method mentioned in the dev docs are much more cleaner than what I was > doin

Re: Digest for django-users@googlegroups.com - 12 Messages in 7 Topics

2012-11-11 Thread muhammed riyas
thank you guyz...:) On Sat, Nov 10, 2012 at 7:46 PM, wrote: > Today's Topic Summary > > Group: http://groups.google.com/group/django-users/topics > >- Queries to multiple tables <#13aeaadf926b84cb_group_thread_0> [2 >Updates] >- google app engine suggestion <#13aeaadf926b84cb_grou

Exception Type: TypeError Exception Value: individual() takes exactly 2 arguments (1 given)

2012-11-11 Thread muhammed riyas
Request Method:GET Request URL:http://localhost:9744/employee/1/ Exception Type:TypeError Exception Value:individual() takes exactly 2 arguments (1 given) Exception Location:/home/user/google_appengine/lib/django_0_96/django/core/handlers/base.py in get_response, line 77 url is (r'^employee/

Re: Exception Type: TypeError Exception Value: individual() takes exactly 2 arguments (1 given)

2012-11-11 Thread Jonathan D. Baker
You need to capture the id parameter in your URL by wrapping it in parentheses: ([0-9]) Sent from my iPhone On Nov 12, 2012, at 12:49 AM, muhammed riyas wrote: > Request Method:GET > Request URL:http://localhost:9744/employee/1/ > Exception Type:TypeError > Exception Value:individual() takes