Re: Using Tag Filters in a generic view

2012-08-23 Thread Carlos Palol
Hi, please share your view class. Cheers On Thursday, 23 August 2012 18:56:37 UTC+2, miked wrote: > > I have create a generic view and in that view I have specified > context_object_name of errata_id_list in this case. This generic view is > tied to a query set of a model and in the view I s

Re: Django: How to get American date format in a form?

2012-08-13 Thread Carlos Palol
Try configuring your form field directly, like this: class CallsForm(ModelForm): contact_date = forms.DateField( localize=True, input_formats=['%m/%d/%Y'], widget=forms.DateInput(attrs={ 'placeholder'='Format is m/d/...', }) ) class

Re: Checkbox checking

2012-08-01 Thread Carlos Palol
It seems in this particular case you don't need the boolean field in the model. As the behaviour you want has to do only with the form, you just have to add an additional required checkbox in this model form. class MyModelForm(forms.ModelForm): involved = forms.BooleanField(required=True) clas

Re: Difficulties using generic views (Tutorial 4, Django 1.4)

2012-07-23 Thread Carlos Palol
I'm glad. Not very prone to randomness, actually. Make sure the web server is restarting after your changes, and that the browser cache is not lying to you. Also, if you are changing module (file) names, better delete the .pyc files. Cheers, Carlos Palol On 23 Jul 2012, at

Re: Difficulties using generic views (Tutorial 4, Django 1.4)

2012-07-23 Thread Carlos Palol
Let's see the whole error page. On Sunday, 22 July 2012 23:43:59 UTC+2, Ricardo Cardoso wrote: > > Thank you for your input guys. > > Sadly, i had already checked it Carlos and have my templates for polls > under: > /home/my_user/Webdev/Templates/polls > > In this case my template dir is set up

Re: Difficulties using generic views (Tutorial 4, Django 1.4)

2012-07-19 Thread Carlos Palol
> > url(r'^$', > ListView.as_view( > queryset=Poll.objects.order_by('-pub_date')[:5], > context_object_name='latest_poll_list', > template_name='polls/index.html')), > > Here you are setting template_name='polls/index.html' > > TemplateDoesNotExis

Re: Can a method call inside save() display its return on template?

2012-07-19 Thread Carlos Palol
> > Is it now possible what get_direction_descr() and get_vrd_code() return to > be displayed on the template on the fly just after the user selects nod_id1 > and nod_id2 from a dropdown list? > Or how I could accomplish sth like this? > > Hello, the Model save() method is not connected like t