Change widgets in ModelFormSet

2009-01-30 Thread juanefren
I am using modelformset_factory, to show forms and is working good, my question now is, how can I modify widgets created ? (I want to change the size of the html text elements). This is the documentation about model formsets. http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#id1 Than

Re: Change widgets in ModelFormSet

2009-02-03 Thread juanefren
Yes, I missed that possible solution, It worked, Thankyou! On Jan 30, 6:46 pm, Antoni Aloy wrote: > 2009/1/31juanefren: > > > I am using modelformset_factory, to show forms and is working good, my > > question now is, how can I modify widgets created ? (I want to change > > the size of the html

TemplateSyntaxError on unicode strings

2009-03-07 Thread juanefren
I am using django 1.1 and MYSQL 5.0 with collation utf8_unicode_ci I have no problems storing unicode strings to database, but when I try to render a template using any of these chars ñáéíóúÑÁÉÍÓÚ from database, it throws a TemplateSyntaxError, what should I do ? --~--~-~--~~-

Re: TemplateSyntaxError on unicode strings

2009-03-08 Thread juanefren
ect to use __str__ method ? Thanks On Mar 7, 2:05 pm, Karen Tracey wrote: > On Sat, Mar 7, 2009 at 3:07 PM, juanefren wrote: > > > I am using django 1.1  and  MYSQL 5.0 with collation utf8_unicode_ci > > Django 1.1 doesn't exist yet, so I guess you are either running 1.1

Re: TemplateSyntaxError on unicode strings

2009-03-09 Thread juanefren
Thanks for your replies, It worked. On Mar 8, 6:16 pm, Malcolm Tredinnick wrote: > On Sun, 2009-03-08 at 18:01 -0700, juanefren wrote: > > Right I would mean 1.1 alpha. Looking with more details I found that > > error only appears when I use my class __str__ method, for ex

login_required

2009-03-11 Thread juanefren
Few times when I open any page in my site this error appears. Caught an exception while rendering: name 'login_required' is not defined. Reloading page solves the problem, and rarely occurs again. I am using @login_required() over all my functions and imported from django.contrib.auth.decorators.l

Model ineritance problem

2009-08-20 Thread juanefren
Having these Models... class Parent(models.Model): date = models.DateField() n = models.IntegerField(default = 0) class Kind1(Parent): def total(self): return cantidad * 3 class Kind2(Parent): def total(self): return cantidad * 2 How can I do this ? for p in Par

Re: login_required

2009-03-27 Thread juanefren
Thanks, that corrected the problem, (I was missing import in my ajax views). On Mar 12, 6:35 pm, Jacob Kaplan-Moss wrote: > On Wed, Mar 11, 2009 at 7:10 PM, juanefren wrote: > > Few times when I open any page in my site this error appears. > > Caught an exception while

TemplateSyntaxError

2009-05-28 Thread juanefren
I have created a custom tag to generate select inputs from my database models it is registered as a simple tag. Everything is fine, except that I should do this to avoid my problem is that calling my tag of this way {% combo "model" instance.property.id %} raises TemplateSyntaxError when object i

PDF response using wkhtmltopdf.

2011-02-16 Thread juanefren
I am using wkhtmltopdf to create PDF files, how ever I don't know how to return them properly, docs says using a single dash instead of output file name will write that to stdout. But I don't realize how to return that content. I have been trying using subprocess.Popen this way: r = HttpResponse(