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
Filter by
Sorted by
Tagged with
1 vote
1 answer
3k views

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() ...
Dan Abramov's user avatar
3 votes
1 answer
3k views

Django testing with assertRaises fails to realise that exception raised is the one expected

I have the following test code snippet with self.assertRaises(models.NotEnoughInventorySpace): self.inv2.add_item(self.item2, 1) The test fails: Creating test database for alias 'default'... E. ...
QasimK's user avatar
  • 440
1 vote
1 answer
3k views

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 ...
Jisson's user avatar
  • 3,666
0 votes
1 answer
905 views

user authentication problem in django

I am new in python and django.I am trying for a secure user authentication using django framework.I create a login.html page in [templates/user].And if login success user leads to user/ContactSuccess....
Jisson's user avatar
  • 3,666
1 vote
1 answer
570 views

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 ...
George Middlecote's user avatar
0 votes
1 answer
446 views

django static files weird behaviour

in my settings.py I have: import os SITE_ROOT = os.path.realpath(os.path.dirname(__file__)) # ... # STATIC_ROOT = os.path.join(SITE_ROOT, 'static') # ... # STATIC_URL = '/static/' in my urls.py I ...
Darwin Tech's user avatar
  • 18.7k
0 votes
2 answers
239 views

a custom pagination problem in template in django 1.3

I'm making a gallery where i have two models. like below class Gallery(models.Model): name = models.CharField(max_length=200) pub_date = models.DateTimeField('date published', auto_now_add=...
themunna's user avatar
4 votes
1 answer
4k views

Django logging with dictConfig cannot find "logging" module

My LOGGING directive in settings is set to: LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'default': { 'format': '[%(asctime)s] %(...
WilHall's user avatar
  • 11.8k
5 votes
1 answer
10k views

Cannot register custom logging handler class with Django dictConfig

My goal is to create a "log" app, apart from my main app, that will be used for several custom handler classes, filters, etc, and other error and stat reporting. But when running the dev server for my ...
WilHall's user avatar
  • 11.8k
0 votes
3 answers
209 views

django foreign key complex query

I know this is dumb but... I have two model classes class Gallery(models.Model): name = models.CharField(max_length=200) pub_date = models.DateTimeField('date published', auto_now_add=True) ...
themunna's user avatar
0 votes
1 answer
439 views

from django form uploading a image in windows development server

I have a model like this class Ask(models.Model): name = models.CharField(max_length=500) designation = models.CharField(max_length=200, blank=True) email = models.EmailField() phone =...
themunna's user avatar
0 votes
1 answer
137 views

Installation error in with byteflow-0.7

I am installing byteflow-0.7 on python 2.6.5 with django 1.3 on windows7(64-bits). Database used is MySQL 5.0.51b on wamp 2.0 server. I installed all the prerequisites well and have run the syncdb ...
Sandip Agarwal's user avatar
-1 votes
1 answer
79 views

django form version 1.3

I want to have a user submitted form in a certain page. My model is like this class Ask(models.Model): name = models.CharField(max_length=500) designation = models.CharField(max_length=200, ...
themunna's user avatar
3 votes
3 answers
4k views

Django 1.3 CreateView/ModelForm: unique_together validation with one field excluded from form

I am looking for a simple answer by example to this common problem. The answers I found so far leave out critical points for us beginners. I have an app where almost every model has a ForeignKey to ...
user avatar
3 votes
1 answer
3k views

Django 1.3 CreateView, ModelForm and filtering fields by request.user

I am trying to filter a field on a ModelForm. I am subclassing the generic CreateView for my view. I found many references to my problem on the web, but the solutions do not seem to work (for me at ...
user avatar
0 votes
1 answer
573 views

Django image modification, from one image field to others

I have a image field in the model. I need to make two copies(resized) of that image to another two field(thumb_big and thumb_small). Thumb_big will be 225px width, height could be anything. and ...
themunna's user avatar
10 votes
5 answers
7k views

Django Debug Toolbar not displaying SQL

I recently installed django-debug-toolbar. The toolbar works and I can see the tabs on the side. However, nothing shows up in the SQL tab even when I have obviously executed an SQL query (such as in ...
banerjs's user avatar
  • 548
0 votes
1 answer
56 views

django url rule not working

I'm a django newbie. Here is my problem.... My main urls.py has a rule for checking published section to published app, like this: (r'^(published/)$', include('published.urls')), My published app ...
themunna's user avatar
2 votes
2 answers
3k views

Adding Dynamic elements to logging.filters in django 1.3

I'm attempting to add some contextual information to some logs via the logging module. I need to be able to view a projectid next to each line in the logs, with over 20,000 projects created daily this ...
Mark Walker's user avatar
0 votes
2 answers
3k views

How to show an image in template uploaded from admin panel Django 1.3

I'm a newbie to django. I'm developing a project in django 1.3. Problem is I'm uploading a image from the admin panel class About(models.Model): image = models.ImageField(upload_to='about') ...
themunna's user avatar
0 votes
1 answer
2k views

django admin custom list_filter

I did the upgrade to 1.3 version and this code doesn't work any longer: class CustomChoiceFilterSpec(ChoicesFilterSpec): def __init__(self, f, request, params, model, model_admin): super(...
fab10m's user avatar
  • 11
0 votes
1 answer
2k views

Django TypeError when passing arguments via URL

Hello I am getting the following error in Django (latest version): TypeError at /post/1/ post() got an unexpected keyword argument 'post_id' This occurs when I press on a link on the home page to ...
jayduff's user avatar
4 votes
2 answers
369 views

Django 1.3: Problems with UserProfile after upgrade

After an upgrade to Django 1.3 (from 1.2.3) the following row causes a crash: users = self.users.filter(userprofile__public_profile=True).order_by('first_name') The error shown: Caught FieldError ...
Björn Lilja's user avatar
7 votes
3 answers
9k views

Django Class-Based Generic Views and Authentication

I am pretty new to Django (starting with 1.3). In building an app, I went with the new class-based generic views from day one, using a combination of the built in classes and subclassing them where I ...
user avatar
113 votes
5 answers
175k views

What is the easiest way to clear a database from the CLI with manage.py in Django?

I am using Django to build a website with MySQL. Now as I am learning so I need to change the Model very often so I want that all tables get cleared and new table get created. But syncdb doesn't ...
Mirage's user avatar
  • 31.2k
4 votes
1 answer
4k views

Django1.3 multiple gunicorn workers caching problems

i have weird caching problems with the 1.3 version of django. I probably have something configured wrong, but am not sure what. A good example is django-avatar, which uses caching and many people use ...
Philipp Wassibauer's user avatar
2 votes
3 answers
226 views

Is there a way to install Django 1.2 and 1.3 side by side?

I need to use Django 1.2 for one of my projects. I also already have several projects running on Django 1.3 on the same server, and I need to keep them running. Is there a way to only use 1.2 for a ...
Dan Abramov's user avatar
15 votes
2 answers
7k views

Django 1.3 logging: 500 errors are not logged

I'm struggling to make the 'django.request' logger work as advertised - 500 errors don't seem to propagate to handlers attached to it. In the default logging configuration for every new project, the ...
Matt's user avatar
  • 2,203
9 votes
4 answers
34k views

how to get POST data in django 1.3

Hey, I am following this tutorial to learn to make a wiki page with Django. However, it is made in django 0.96 and I use Django 1.3 so there are some things that are different. Some I already fixed ...
Javaaaa's user avatar
  • 3,808
6 votes
1 answer
4k views

Class based view extending UpdateView not saving form correctly

Im trying to save a form using UpdateView in Django 1.3 and seemed to have run into a problem. When I am saving the form, it POST's to the current URL and the success url is the same url. When saving ...
Omar Estrella's user avatar
3 votes
2 answers
5k views

Django get() takes exactly 2 arguments (3 given)

I am trying to use DetailView generic class in my test app and this is what I have in my view *updated model * from this example class AuthorDetailView(DetailView): context_object_name = "...
iJK's user avatar
  • 4,655
9 votes
2 answers
4k views

How to specify something other than pk or slug for DetailView

I was wondering if it was possible to use something besides a pk or slug when you are using a DetailView in Django 1.3. For example, I currently have: url(r'^mymodel/(?P<pk>\d+)/$', ...
Omar Estrella's user avatar
19 votes
3 answers
10k views

How do I handle file upload via PUT request in Django?

I'm implementing a REST-style interface and would like to be able to create (via upload) files via a HTTP PUT request. I would like to create either a TemporaryUploadedFile or a InMemoryUploadedFile ...
user avatar
0 votes
1 answer
160 views

Question about Group_by in django

UPDATE This has been confirmed to be a bug of the release 1.3. Here is the ticket http://code.djangoproject.com/ticket/15709 So I want to implement this SQL: selelct id, count(*), max(insert_date) ...
zs2020's user avatar
  • 54.1k
13 votes
2 answers
9k views

Django: css referencing media in static files (django dev / 1.3 / static files)

Like any other user of django user I serve static files. I've chosen to use django-staticfiles to be ready for django 1.3 which will basically integrate it into the core. My question is pretty simple ...
user avatar

1 2
3