Python HTML
Switch branches/tags
Nothing to show
Clone or download
axelpale Merge pull request #17 from nerogit/master
pep8 only 1.8 and works for 1.9
Latest commit 529862f Jul 3, 2016


Project contains source code that was made originally for the Django file upload example at StackOverflow.

The goal with minimal-django-file-upload-example is to demonstrate and teach how file uploading is done with Django. Because of the academic nature of the project all the extra functionality is left out. Otherwise you would have hard time to guess what is important and what is not.

The following Django versions are supported:

Usage (Django 1.9)

First ensure you have Django 1.9 installed. Then:

$ git clone
$ cd minimal-django-file-upload-example
$ cd src/for_django_1-9/myproject
$ python migrate
$ python runserver

Differences between code for Django 1.7 and 1.8

  • New TEMPLATE settings. See upgrading instructions for details.
  • reverted to the default directory for db.sqlite3 database and media dir.
  • Added explicit RedirectView permanent argument: RedirectView.as_view(url='/myapp/list/', permanent=True))

Differences between code for Django 1.6 and 1.7

  • use ./ migrate instead of ./ syncdb

Differences between code for Django 1.5 and 1.6

  • myapp/ changed the line from django.conf.urls.defaults import patterns, url to from django.conf.urls import patterns, url

Differences between code for Django 1.4 and 1.5

  • Django 1.5 recommends RedirectView to be used instead of django.views.generic.simple.redirect_to. See RedirectView for details.
  • list.html: url template tag requires view names to be double quoted. See Django 1.5 release note overview for details.

Differences between code for Django 1.3 and 1.4

  • Directory hierachy follows Django's defaults. For example has risen one level up.
  • Due to hierarchy change absolute package paths are now more recommended and therefore used. Look INSTALLED_APPS in for example.
  • Little more comments
  • More encoding definitions # -- coding: utf-8 --
  • Database renamed to database.sqlite3