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
1
vote
0 answers

Programmatically set the model on a class based view in Django 1.3

I'm trying to implement a more generic version of the Django class based detail view, which can operate on different models when required. The idea was to set the model using a parameter in the URL, like…
Jharwood
  • 1,046
  • 2
  • 11
  • 28
1
vote
1 answer

Error : Invalid block tag: 'else', expected 'empty' or 'endfor'

I'm currently doing some starting stuff on Django 1.3.1 and following error struck me for 2 hours. Help me in figuring out the error. I have included my code on bitbucket. Error:- TemplateSyntaxError at /events/archive/ Invalid block tag: 'else',…
nKandel
  • 2,543
  • 1
  • 29
  • 47
1
vote
1 answer

django Error : Caught ImportError while rendering: No module named comments

I am currently porting over some django 0.97 code to django 1.3.1 code. I keep getting the following django error: TemplateSyntaxError at /dir1/dir2/ Caught ImportError while rendering: No module named comments The error keeps pointing to the…
PythonRunner
  • 1,531
  • 2
  • 12
  • 11
1
vote
1 answer

How to get user's Timezone in Django 1.3 Http Request

I have read that there is a lot of timezone support available in Django 1.4, but how does one obtain user's timezone in Django 1.3? Once I have the timezone i.e. something like 'Europe\London' or 'GMT+4:00', it is easy to use a middleware to set it…
Optimus
  • 2,716
  • 4
  • 29
  • 49
1
vote
2 answers

South won't migrate my custom field

I have a model which has a nullable foreign key relation with itself (this 'self' can be any model which has this foreign key). This foreign key is a custom class which prevents cyclic relationships. The call to super() in the __init__ contains…
Cornelis
  • 909
  • 1
  • 9
  • 16
1
vote
1 answer

Deliver cached page to anonymous user and non-cache to authorized

I'm using django 1.3 in my app. I need to organize caching, which satisfies following rules: using memcached as cache backend using @cache_page decorator in views, which I want to cache each non-authorized (anonymous) user sees cached version of…
Dmitry Belaventsev
  • 6,347
  • 12
  • 52
  • 75
1
vote
2 answers

Set new `path` value for ImageField

I have the following situation. Project files was stored in ~/django-apps/app-old/app. For some reasons I move files to ~/django-apps/app . Application have some images, stored with use of ImageField. In database images have paths like…
Dmitry Belaventsev
  • 6,347
  • 12
  • 52
  • 75
1
vote
0 answers

Middleware not catching exceptions

I want to use middleware to handle some special exceptions through all project. But the middleware is almost never called when an exception is raised and I don't understand a reason of this behavior. Middleware class: import logging log =…
Adin
  • 101
  • 1
  • 4
0
votes
1 answer

Django-crispy upload forms

Yesterday I asked this question. I then found this snippet: models.py from django.db import models from app.extra import ContentTypeRestrictedFileField class upload(models.Model): """ upload """ name = models.CharField(max_length=100) …
user
  • 973
  • 4
  • 14
  • 29
0
votes
1 answer

Django Admin actions select issue

I am using Django 1.3 and have the following issue: In the Admin list page, if you have enough objects to result in pagination (more than 100 if you haven't changed ModelAdmin.list_per_page) there is an issue with the actions links, and none of them…
Mbuso
  • 318
  • 2
  • 7
0
votes
1 answer

Once and for all, static files vs Django 1.3

I've been trying to follow every single tutorial and thread there is, i jast cant get it togheter. Sorry, but please exlpain it to me as if i was three years old.. What i have: a CSS that i'd like use, styling a template. How to get there: MD:…
BSG
  • 1,382
  • 4
  • 14
  • 25
0
votes
1 answer

stuck at URL patterns of django

Hi I am using following URL patterns in django and I am wondering that where is problem and why it is not able to find it. Following screenshot shows my URL as well as expected URLs. Please tell that where I am making mistake. Please tell if some…
Hafiz
  • 4,187
  • 12
  • 58
  • 111
0
votes
1 answer

A pythonic way to fetch the data in the users system

The schema diagram of my project can be viewed HERE. I have an Employee who's parent is django User. The Employee is related to a Company. A Company can have many employees. An Employee can have certain Tasks, and each Task has many Employees…
Zain Khan
  • 3,753
  • 3
  • 31
  • 54
0
votes
2 answers

string formatting error in python

This is a time critical bug otherwise I wouldn't have posted here and it's also my very first try with django and python so consider accordingly . I am getting error %o format: a number is required, not str in my django app . The place where it…
rtcoms
  • 783
  • 1
  • 8
  • 19
0
votes
1 answer

Django redirecting to another view with a bound form

I am using Python 2.7, Django 1.3.1. I am trying to implement a sign in functionality that can be called from arbitrary page and redirects to the same page without any code duplication. The current way that I have is that I have two views: one for…
saurabh
  • 137
  • 2
  • 9
1 2 3
8 9