Re: Changing a form field's value during cleaning

2015-05-26 Thread Gergely Polonkai
Because it is possible that user A will load the page, and user B will approve the field. On 27 May 2015 03:38, "Vijay Khemlani" wrote: > If some of the fields are "already approved" and thus they can't be > edited, why are you rendering those as editable form fields in the first > place? > > On

Re: Django-Taggit and the ListView

2015-05-26 Thread James Schneider
>From a brief glance at the RTD (and assuming you are using CBV's), it looks like you should create a standard ListView and then override get_queryset() with the extra filter to narrow down the list of models retrieved: http://django-taggit.readthedocs.org/en/latest/api.html#filtering You can use

Django-Taggit and the ListView

2015-05-26 Thread Lachlan Musicman
Hola, I was planning on using Django taggit for tagging models. http://django-taggit.readthedocs.org https://github.com/alex/django-taggit I am trying to get some sort of CBV (eg lListView of model's with tag x) happening but it doesn't seem able to do this. The app's views.py https://github.co

Re: Changing a form field's value during cleaning

2015-05-26 Thread Vijay Khemlani
If some of the fields are "already approved" and thus they can't be edited, why are you rendering those as editable form fields in the first place? On Tue, May 26, 2015 at 9:55 PM, Gergely Polonkai wrote: > Hello, > > I'm currently having hard times changing a form field's value from within > th

Changing a form field's value during cleaning

2015-05-26 Thread Gergely Polonkai
Hello, I'm currently having hard times changing a form field's value from within the form's clean() method. I have already tried setting self.initial[field_id] and manipulating the cleaned data by calling super's clean method, change the required field (cleaned_data[field_id]) and returning the mo

Re: How to pass a queryset for each different field Admin Inlines

2015-05-26 Thread Felipe
Someone can help me ?, he took days trying to fix this and nothing to get it, if I could just iterate a QuerySet each model choice of the form. The only thing achieved is that a queryset applies to all forms inline, but I need a different one for each inline. def formfield_for_foreignkey(sel

Get Call Stacks for Classes in Models

2015-05-26 Thread Utkarsh
Hi! So, there is a huge Django app with multiple classes in Model. I am interested in getting call stacks of some classes. I have few questions in the approach and few questions regarding the implementation. I am using Django 1.4.20 and python 2.7 1. What if we decide to write a decorator for

Re: Gmail oAUTH application for Django

2015-05-26 Thread Luis Zárate
Why don't you use django-allauth? http://www.intenct.nl/projects/django-allauth/ 2015-05-26 7:48 GMT-06:00 Great Avenger Singh : > Hello Django-People, > > I am writing a Gmail oAuth2 application with Django so one can login to > Gmail. (I have Desktop Python script ready with me) > > After

Re: datepicker

2015-05-26 Thread Peith Vergil
Actually, use the DateField instead of the CharField so you get server side validation of the date input. It should just render as a text input on the front-end. On May 27, 2015 01:40, "Peith Vergil" wrote: > I don't think you do it with models. You do it with form fields. An easy > way is to sim

Re: datepicker

2015-05-26 Thread Peith Vergil
I don't think you do it with models. You do it with form fields. An easy way is to simply create a regular CharField, render it like usual. Then, on the front-end, you simply target that specific char field and initialize the datepicker on it. On May 27, 2015 01:31, "sum abiut" wrote: > Hi, > Is

datepicker

2015-05-26 Thread sum abiut
Hi, Is there a way to implement jquery datepicker with Django models. I am looking at http://jqueryui.com/datepicker/ but i am finding very difficult to apply it to django models. any help will be very much appreciated. Cheers -- You received this message because you are subscribed to the Google

How to pass a queryset for each different field Admin Inlines

2015-05-26 Thread Felipe
Pretend to have in the Django admin, 4 forms inlines, Each with a pair of fields choices, "Attributes" and "Value Option". We have the first pair, which initialize the field one with a value, for example color and other field you must have a queryset the choices.

Gmail oAUTH application for Django

2015-05-26 Thread Great Avenger Singh
Hello Django-People, I am writing a Gmail oAuth2 application with Django so one can login to Gmail. (I have Desktop Python script ready with me) After doing some Google I am able to find following Tutorial: http://www.artandlogic.com/blog/2014/04/tutorial-adding-facebooktwittergoogle-authent

Re: Django-admin.py Error

2015-05-26 Thread Adailton (Dhelbegor)
This the error: ImportError: cannot import name _compare_digest if this is one class, verify the import. example: in models.py: class One(...) your code here and admin.py: from .models import One > -- You received this message because you are subscribed to the Google Grou

Re: Avoiding Keyboard Input for Removing Stale Content Types Automatically (migrations and automatic deployment)

2015-05-26 Thread Greg Shikhman
Thanks for documenting your trouble, I ran into the same problem today. The kludge solution that I came up with was: 'yes yes | python manage.py migrate' in my deployment script -- decidedly suboptimal. My preference would be for the yes/no decision of dropping stale models to be recorded withi

Re: how to do a django data migration on a massive Postgres data table (solved)

2015-05-26 Thread aRkadeFR
Thanks for the email on the django-user ML. I don't see the gist though, is the problem from me? On 05/22/2015 09:09 PM, Vernon D. Cole wrote: Django migrations are run in a single transaction (if your database is capable of doing a rollback of DDL, as PostgreSQL is) so data migrations of larg