Re: django 1.8 , makemigrations throwing errors

2015-09-14 Thread ernando
Hey John, Agree with James. makemigrations command doesn't create models.py file - it's on your plate. But after creating models.py file and filling it with your models - you have to create migration file with makemigrations command and run migrate one to create all required tables, fk, etc. -

Re: Seperate fields for SelectDateWidget in template

2014-01-21 Thread ernando
Hi, You have to look on MultiWidget and use it as base to create your own one. - Dmitry On Monday, January 6, 2014 7:22:07 PM UTC+3, Voyager wrote: > > I have Googled a lot but I can't find an answer. I want to use > SelectDateWidget in one of my forms but I want the select boxes in > separat

Re: session modification question

2014-01-20 Thread ernando
Hi, I agree with Daniel that your case of using session is incorrect. You have to think about session as a simple dictionary that stores data through requests. And it doesn't keep track about protecting data from changing - you should think about it yourself. Believe, you have to think about so

Re: Question about Django X_FRAME_OPTIONS setting

2014-01-08 Thread ernando
Hi Chen, Do you really need to set it via Django? Usually it's done via web-server (nginx/apache/etc) What about Django - I think you can use HttpResponse object and update header in default way: response['X_FRAME_OPTIONS'] = "value" See additional examples here: https://docs.djangoproject.co

Re: blocktrans inside a with tag

2012-08-15 Thread ernando
Sorry, didn't catch it :) I just checked provided code - and it works ok (1.4 Django). Are u using the latest version or 1.3 one? -Dmitry -- 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

Re: blocktrans inside a with tag

2012-08-15 Thread ernando
I really didn't try to use blocktrans and with tags together but why do use val variable value with $ sign? Try just {{val}} one - it works ok for me. - Dmitry On Tuesday, August 14, 2012 2:41:16 AM UTC+3, Jason Buckner wrote: > > I would like to use a blocktrans tag inside a with tag so I can

Re: saving several models with one save() call

2011-08-24 Thread ernando
. BR, Dmitry On Aug 24, 6:39 pm, Tundebabzy wrote: > On Aug 24, 3:36 pm, Tom Evans wrote: > > > > > > > > > > > On Tue, Aug 23, 2011 at 11:28 PM, ernando wrote: > > > Hi all, > > > > maybe it's newbie question but I wasn't abl

Re: saving several models with one save() call

2011-08-24 Thread ernando
hat should work just fine. > I haven't tried it but I believe it would work. I'm an accountant and > there's a lot of work on my table right now but I could find time > during break to try algorithm and tell you if it works > > On 8/23/11, ernando wrote: > >

saving several models with one save() call

2011-08-23 Thread ernando
Hi all, maybe it's newbie question but I wasn't able to find clear answer/ solution on it. For example, we have the following models: class A(models.Model): id = models.AutoField(primary_key=True) title = models.CharField(max_length=30) class B(models.Model): id = models.AutoField(p