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
109
votes
5 answers

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 touch existing tables. Is there any better way to…
Mirage
  • 30,868
  • 62
  • 166
  • 261
19
votes
3 answers

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 which I can then pass to my existing FileField and…
user257111
17
votes
3 answers

Django 1.3: MEDIA_URL vs. STATIC_URL

What does MEDIA_URL does now? I am particularly confused after I got "django.core.exceptions.ImproperlyConfigured: The MEDIA_URL and STATIC_URL settings must have different values". I'd appreciate Django explaining why this is. Regards
Zain Khan
  • 3,753
  • 3
  • 31
  • 54
16
votes
5 answers

Django-Pinax : How do you use a pinax app apart from what you get with a pinax base project?

I am trying to understand Pinax and plan to use it in my next project. I have started with a pinax basic project, and now I have something to go with runserver. Now, I understand that I can customize the initial setup that I got from pinax and…
Yugal Jindle
  • 44,057
  • 43
  • 129
  • 197
15
votes
2 answers

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 comment says the "logging performed by this…
Matt
  • 2,153
  • 1
  • 18
  • 29
13
votes
2 answers

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 really - this works great for pulling together…
user257111
10
votes
2 answers

Whats is the best way to migrate folder and files structure from django1.3 to django1.4?

I have a little project created with django1.3 and I want to migrate it to django1.4 but since the files structure change a little, what is the best way to migrate?
user1290741
10
votes
5 answers

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 the admin): My settings are as follows: DATABASES…
banerjs
  • 538
  • 6
  • 14
9
votes
4 answers

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 myself, however this one I can't seem to make it…
Javaaaa
  • 3,788
  • 7
  • 43
  • 54
9
votes
2 answers

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\d+)/$', MyDetailView.as_view()) as my url. Say I wanted something…
Omar Estrella
  • 638
  • 1
  • 6
  • 15
7
votes
1 answer

how to make interaction between different django apps in a single site?

I have just learnt about Django apps. I want to know that within one site, if I make different apps. like, users, profiles, polls, blogs,comments, jobs , applications then how can I manage them to make them intereactive? And is it how the concept of…
Hafiz
  • 4,187
  • 12
  • 58
  • 111
7
votes
3 answers

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 needed to add to the context. Now my problem is,…
user658587
7
votes
4 answers

Django aggregate queries with expressions

I have a model XYZ and I need to get the max value for fields a, b, and expression x/y for a given queryset. It works beautifully for fields. Something like: >>> XYZ.all().aggregate(Max('a')) ... {'a__max': 10} However, I can't find a way to do it…
Pedro Werneck
  • 40,902
  • 7
  • 64
  • 85
6
votes
1 answer

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 the form, the data seems to be changed because…
Omar Estrella
  • 638
  • 1
  • 6
  • 15
6
votes
3 answers

Saving a decoded temporary image to Django Imagefield

I'm trying to save images which have been passed to me as Base64 encoded text into a Django Imagefield. But it seems to not be saving correctly. The database reports all my images are stored as "" when it should report them as a filename for…
Jharwood
  • 1,046
  • 2
  • 11
  • 28
1
2 3
8 9