Re: prevent from backward in form

2014-05-31 Thread Ali hallaji
Hi Russ, thank you so much for reply. But I tested ago the form with HTTPResponseRedirect and this don't work for me. I decide to save csrf token in my models and check it in view and this solution work for me. Best Regards, Hallaji On Sun, Jun 1, 2014 at 5:24 AM, Russell Keith-Magee wrote: >

Re: prevent from backward in form

2014-05-31 Thread Russell Keith-Magee
Hi Ali, If you follow the pattern laid out in Django's documentation, you'll avoid the problem: https://docs.djangoproject.com/en/dev/topics/forms/#using-a-form-in-a-view The key part is that on success, the form processing issues a HTTPResponseRedirect. This prevents the back button from repopu

Re: Seems to be a bug in makemessages management command

2014-05-31 Thread Russell Keith-Magee
Hi Андрей, Unless you can reproduce this with Django's own template language -- which *doesn't* support multiline content, it's not a bug. However, Jinja2 use is common in the community, so if we can apply a patch that improves Jinja2 support, then we'd certainly consider that patch. Yours, Russ

Save django queries for reuse

2014-05-31 Thread lovesh harchandani
In my application a user can generate reports on multiple models using multiple criteria. I want to let the user save the queries(with the criteria). What is a good approach? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Re: Django auth customing error

2014-05-31 Thread Kelvin Wong
In your helpdesk app you have leftover references to auth.User. Replace all of them with something like this: user = models.ForeignKey(settings.AUTH_USER_MODEL) K On Saturday, May 31, 2014 6:25:28 AM UTC-7, Jackie wrote: > > I want to custom the django auth app, since the default auth app can

UnboundLocalError - How do I convert my pandas DataFrame into a list that Django can work with?

2014-05-31 Thread Pepsodent Cola
Exception Type: UnboundLocalError Exception Value: local variable 'list' referenced before assignment Hi, I'm trying to convert my pandas DataFrame into a simple list in Views.py and send it to template. But Django complains and I don't know how to make it happy. Because when I do *"globa

Re: Enumerating objects in foreign key in the admin

2014-05-31 Thread Christophe Pettus
Brilliant, thank you! On May 30, 2014, at 10:23 PM, Russell Keith-Magee wrote: > Hi Christophe, > > The built-in way to handle this is to add a `raw_id_fields` declaration to > your ModelAdmin or Inline definition. This will replace the pulldown select > widget (populated with every possible

Re: Django Template - problema

2014-05-31 Thread Erick Brockes
It worked. Thank you very much 2014-05-31 4:33 GMT-03:00 Kelvin Wong : > At the very top of the models.py file add: > > # -*- coding: utf-8 -*- > from __future__ import unicode_literals > > I'm not sure this will work, but it might. > > K > > > > On Friday, May 30, 2014 8:35:58 PM UTC-7, ebrocke

UpdateView, ModelForm - form not redirecting problem

2014-05-31 Thread Erick Brockes
Hello, I have the following situation. If I don't refernce a ModelForm in my UpdateView class, the update process works correctly. When I reference the ModelForm in order to customize the fields, the form do not works correctly (do not redirect to the address specified). forms.py class PessoaFo

prevent from backward in form

2014-05-31 Thread Ali hallaji
I submit the form and when I resend or backward the my webpage, my form dose appear again and save data in duplicate. please help me for solving this issue. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Django Wrong OUTER JOIN

2014-05-31 Thread Yannick Morin
Hi everyone, I'm just starting with Django and I created the following queryset but I can't seem to make the JOIN connect to the one I've defined in my queryset values(..., '*user__uservote__event'*, ...) *My model declaration:* > class UserVote(TimeStampedModel): > event = models.Foreign

Re: Seems to be a bug in makemessages management command

2014-05-31 Thread Андрей Меньков
I'm using Jinja2. There _() construct is equivalent to ugettext(). I tried 'blocktrans' tag - it really works, that right). But what to do with Jinja2 templates? Or may be this is not a bug but some sort of improvement for compatibility with Jinja2? On 31 May 2014 15:20, Ramiro Morales wrote:

Django auth customing error

2014-05-31 Thread Jackie
I want to custom the django auth app, since the default auth app can not meet our project's requierment. Then I figure it out on my own by checking the django document at here. https://docs.djangoproject.com/en/1.6/topics/auth/customizing/#a-full-example. I tried to do that example exactly. Fina

Re: TDD

2014-05-31 Thread Jorge Andrés Vergara Ebratt
You can red online for free this one http://chimera.labs.oreilly.com/books/123400754 2014-05-31 7:56 GMT-05:00 Jonathan Querubina : > Guys, > > Could anyone send me a link for a good tutorial on django TDD? > > Thanks! > > -- > You received this message because you are subscribed to the Goog

TDD

2014-05-31 Thread Jonathan Querubina
Guys, Could anyone send me a link for a good tutorial on django TDD? Thanks! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegro

Re: Seems to be a bug in makemessages management command

2014-05-31 Thread Ramiro Morales
On Sat, May 31, 2014 at 7:50 AM, Андрей Меньков wrote: > > I thing the problem is in function django.utils.translation.templatize. It's > implementation could be found in django.utils.translation.trans_real module. > > From docstring for it: > > Turns a Django template into something that is under

django models

2014-05-31 Thread ngangsia akumbo
please i need some legit answer please we have in the models forexaple class Book(): name = InputTextField Autho = Please are there not more parmaters that can hel you to better define your model. Are there no library for models? -- You received this message because you are subscribed to t

Re: Seems to be a bug in makemessages management command

2014-05-31 Thread Андрей Меньков
Hi, Russ. Thank you for such a detailed response. I think I have ever found the place where this really occurs. I was posted this message more for knowing if this really a bug or not (maybe I don't know something about template translation and multiline strings in them). I have used Jinja2 for

Re: check_password in contrib auth tries to update the database

2014-05-31 Thread Erik Romijn
Hello Suhrid, On 30 May 2014, at 15:58, suhridsat...@proteus-tech.com wrote: > check_password method of AbstractBaseUser in django.contrib.auth.models tries > to update the database. > This causes problems when this code executes on a read-only slave database. > >def check_password(self, ra

Re: Need help my first Django app

2014-05-31 Thread Kelvin Wong
https://docs.djangoproject.com/en/1.6/intro/tutorial01/ K On Saturday, May 31, 2014 12:06:20 AM UTC-7, Mamdou Attallah wrote: > > Since I have never delveoped any Django app before I need to find an easy > tutorial to kick start my first app > I am using free trial of py charm > thanks > -- Yo

Need help my first Django app

2014-05-31 Thread Mamdou Attallah
Since I have never delveoped any Django app before I need to find an easy tutorial to kick start my first app I am using free trial of py charm thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop recei

Re: Django Template - problema

2014-05-31 Thread Kelvin Wong
At the very top of the models.py file add: # -*- coding: utf-8 -*- from __future__ import unicode_literals I'm not sure this will work, but it might. K On Friday, May 30, 2014 8:35:58 PM UTC-7, ebrockes wrote: > > Problem solved by replacing on models.py: > > TIPO_CONJUGE = ( > ('CA',