Questions tagged [django-1.4]

Django 1.4 is a version of the Django framework, released in March 2012, with enhanced time zones support and various other improvements. Please only use this tag if your question relates specifically to this version.

Django 1.4 is a version of the Django framework, released in March 2012, with enhanced time zones support and various other improvements. Please only use this tag if your question relates specifically to this version.

See the release notes for more details.

227 questions
0
votes
0 answers

local variable 'trip' referenced before assignment

I have this snippet form = TripManagementForm(request.POST) alert=dict() if form.is_valid(): trip_id = form.cleaned_data['trip_id'] trip = Trip.objects.get(pk=trip_id) trip.name = form.cleaned_data['name'] trip.advance_payed =…
hammergun
  • 448
  • 3
  • 8
0
votes
1 answer

django.template.base.TemplateSyntaxError: 'block' tag with name 'bottom_js' appears more than once

I have this error : django.template.base.TemplateSyntaxError: 'block' tag with name 'bottom_js' appears more than once But I have no clue which template is at fault, how do I find this out ? Traceback (most recent call last): File "./manage.py",…
maazza
  • 7,016
  • 15
  • 63
  • 96
0
votes
1 answer

Django-dilla "Unknown command: 'dilla'"

I'm unable to make django-dilla work with my django1.4 project. I've installed django-dilla through pip and I can import it properly from shell. >>import…
misterte
  • 977
  • 1
  • 11
  • 21
0
votes
1 answer

django haystack not returning results according to expectations

I have configured Django haystack with Elasticsearch Search Engine using QueuedSignalProcessor with redis Queue backend. Everything working except now I have some issue. I have two objects in db whose title is code fixes and code fixess (with extra…
Aamir Rind
  • 38,793
  • 23
  • 126
  • 164
0
votes
1 answer

How don't call clean_ method in 'required=False' field?

How don't call clean_ method in 'required=False' field? forms.py from django import forms class userRegistrationForm(forms.Form): username = forms.CharField( max_length=30, ) password1 = forms.CharField( …
chobo
  • 4,830
  • 5
  • 23
  • 36
0
votes
2 answers

Queryset only get one (any) record for each foreign key

Say I have the following models: class Manufacturer(Model): name = models.CharField(max_length=255) origin = models.CharField(max_length=255) class Car(Model): model = models.CharField(max_length=255) manf =…
DanH
  • 5,498
  • 4
  • 49
  • 72
0
votes
1 answer

How to use only form validation of ModelForm?

How to use only form validation of ModelForm? Please see my code! models.py from django.db import models class IPAddr(models.Model): ip = models.GenericIPAddressField(unique=True,) class myModel(models.Model): ip =…
chobo
  • 4,830
  • 5
  • 23
  • 36
0
votes
1 answer

How to pass DetailView over the 'slug' in url?

How to pass DetailView over the 'slug' in url? First, let's look at my code. urls.py from django.conf.urls import patterns, include, url urlpatterns = patterns('', url(r'^customer/(?P[^/]+)/$',…
chobo
  • 4,830
  • 5
  • 23
  • 36
0
votes
1 answer

Django: Can't find template files. / App works without template files?

Yesterday I tried to edit a template in my django app and noticed that the template-file isn't even used (anymore). Even if I delete it the app will continue to work and changes I make in the file wont appear online. I couldn't find any other…
0
votes
1 answer

Django 1.4 Pagination with a query

I'm trying to get pagination working following the example in https://docs.djangoproject.com/en/dev/topics/pagination/. I'm using query and can't seem to pass the query data to successive pages. The first page returns my query limited to 10 results…
JasonK
  • 3
  • 1
0
votes
1 answer

Error updating django 1.5 - u "'admin' is not a registered namespace

I am upgrading django from 1.4 to 1.5 in the front and all goes well, but admin side when I try to enter the url I get this particular error, and not how to fix it, any ideas? error: NoReverseMatch at /admin/ u"'admin" is not a registered…
user987055
  • 1,039
  • 4
  • 14
  • 25
0
votes
1 answer

How can I filter queryset by type of a field

I use mezzanine. It has model: class AssignedKeyword(Orderable): """ A ``Keyword`` assigned to a model instance. """ keyword = models.ForeignKey("Keyword", related_name="assignments") content_type =…
Dmitry Belaventsev
  • 6,347
  • 12
  • 52
  • 75
0
votes
1 answer

Django social auth for facebook giving an error

I am using: django-social-auth v 0.7.19 django 1.4.3 models.py: class UserProfile(models.Model): user = models.ForeignKey(User) username = models.CharField(max_length = 64, blank = True, null = True) last_login =…
Zain Khan
  • 3,753
  • 3
  • 31
  • 54
0
votes
2 answers

If I don't want to call clean_() method, can I do it?

Django: If I don't want to call clean_() method, can I do it? class myForm(forms.Form): userId = forms.CharField(max_length=30, required=False,) email = forms.EmailField(required=False,) def clean_userId(self): if 'userId' in…
chobo
  • 4,830
  • 5
  • 23
  • 36
0
votes
1 answer

I don't know when to use class GenericForeignKey in django.contrib.contenttypes module

I don't know when to use class GenericForeignKey in django.contrib.contenttypes module https://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#django.contrib.contenttypes.generic.GenericForeignKey I just read above link, but I don't…
chobo
  • 4,830
  • 5
  • 23
  • 36