Questions tagged [django-1.3]

Django 1.3 is a version of the Django framework, released in March 2011. Please only use this tag if your question relates specifically to this version.

Django 1.3 is a version of Django framework, released in March 2011. Please only use this tag if your question relates specifically to this version.

See the release notes for more details.

135 questions
2
votes
1 answer

apache 500 internal error when updating from django 1.3 to 1.4

Originally when I installed Django 1.3 with wsgi on my ubuntu server I used the included setup.py file and so when I wanted to update followed the Remove any old versions of Django section of the install guide by renaming the "django" folder in my…
Finglish
  • 9,692
  • 14
  • 70
  • 114
2
votes
2 answers

Executing raw SQL against SQLite with Django results in `DatabaseError: near "?": syntax error`

For example, when I use cursor.execute() as documented: >>> from django.db import connection >>> cur = connection.cursor() >>> cur.execute("DROP TABLE %s", ["my_table"]) django.db.utils.DatabaseError: near "?": syntax error When Django's argument…
David Wolever
  • 148,955
  • 89
  • 346
  • 502
1
vote
1 answer

django-userena views.py and user registration issues

django-userena does not have a views.py file. It uses instead html files, i would like to use this views.py instead of the html files, because i want to add some other features, like a file uploader. I'm having a hard time implementing apps like…
user
  • 973
  • 4
  • 14
  • 29
1
vote
1 answer

how to enable /static/css URL enable in django

When I use MEDIA_URL or STATIC_URL to point to /static/ currently set MEDIA_URL to /static/ and using it in a path to CSS file like: It points to /static/css.css, but trying…
Hafiz
  • 4,187
  • 12
  • 58
  • 111
1
vote
0 answers

versatile database connection with django and mysql

I have an issue with my deployed application on an apache2 with mod_wsgi. The connection process to the database is exactly successful only once out of 2! I've named the database 'CKP' and for some reason have to change to 'ckp'. So when I request a…
renard
  • 1,368
  • 6
  • 20
  • 40
1
vote
1 answer

Django using model of one app into other app's model

Salam and hi, I am using django and breaking two parts of project in two apps. However there is a reference field of one table as foreign key of other in terms of db. So how can I use one app's model primary key as foreign key of another app's…
Hafiz
  • 4,187
  • 12
  • 58
  • 111
1
vote
1 answer

display json dictionary values in templates

I am doing ajax using jquery in django1.3,well its works fine. Am using jquery load method to fill a in a template. I get a json object asychrosily when user cliks in a button.I pass it to another template(which i loading inside the div of first…
Jisson
  • 3,566
  • 8
  • 38
  • 71
1
vote
3 answers

How to add parameters to Django class based generic view decorators?

I have written a decorator to display success message on object creation: from django.contrib import messages def success_message(klass): def form_valid(self, form): response = super(klass, self).form_valid(form) …
Dan Abramov
  • 264,556
  • 84
  • 409
  • 511
1
vote
3 answers

In Django, can I exclude a field in ModelForm sub-subclass?

I have a “generic” InternForm that inherits from ModelForm and defines common messages, widgets, etc. I defined a subclass called ApplyInternForm for application form that is accessible to everyone and I want to hide some of the “advanced”…
Dan Abramov
  • 264,556
  • 84
  • 409
  • 511
1
vote
1 answer

Django form.is_valid keeps throwing KeyError

I have this code in my view: def add_intern(request): if request.method == 'POST': form = InternApplicationForm(request.POST) if form.is_valid(): form.save() form = InternApplicationForm() else: …
Dan Abramov
  • 264,556
  • 84
  • 409
  • 511
1
vote
1 answer

how to display images in django template

sorry my question is very basic ,I want to display an image in template page,I am working hours for it,The image is not displaying I create a new project SecondPrjt ,there is only one view function named 'index' and one template named test.html ,…
Jisson
  • 3,566
  • 8
  • 38
  • 71
1
vote
1 answer

Missing datepicker in Django 1.3 admin

Using Django 1.3, I am unable to see a datepicker for a Date or DateTime field in admin. Model Class xxxx: departure_date = models.DateTimeField(verbose_name = 'Departure Date') Admin from django.forms import…
1
vote
1 answer

django count annotation field

Django 1.3, Python 2.7 I have the following models (some irrelevant fields omitted): class Encounter(models.Model): subject = models.ForeignKey('Subject', to_field='uuid') uuid = models.SlugField(max_length=36, unique=True, default=make_uuid,…
user2592232
  • 145
  • 1
  • 1
  • 8
1
vote
1 answer

'Meta' object has no attribute 'abstract'

I have this error : **'Meta' object has no attribute 'abstract'** It happened after I installed a new django app, it updated django version to 1.5, I changed it back to 1.3 but I still have the same issue! Now none of my projects is working…
Armance
  • 5,350
  • 14
  • 57
  • 80
1
vote
1 answer

Queryset in ModelForm is properly limited initially, but not when form is submitted with errors

I want to limit a queryset for a form based on the user sending the request. I am having some trouble getting a ModelForm to properly limit the queryset of a field when the form is submitted but invalid. The form gets redisplayed with the error…
Peacemaker636
  • 97
  • 1
  • 1
  • 8
1 2 3
8 9