• Stars
    star
    600
  • Rank 72,339 (Top 2 %)
  • Language
    Python
  • Created almost 12 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Source code for an example app at http://stackoverflow.com/questions/5871730/need-a-minimal-django-file-upload-example

minimal-django-file-upload-example

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 3.0)

Django 3.0 supports Python 3.6, 3.7, and 3.8. Using a virtual environment is highly recommended although not strictly required.

$ git clone https://github.com/axelpale/minimal-django-file-upload-example.git
$ cd minimal-django-file-upload-example
$ cd src/for_django_3-0
$ pip install -r requirements.txt (only if you don't have Django 3.0 installed)
$ python manage.py migrate
$ python manage.py runserver

Usage (Django 2.0.2)

First ensure you have Django 2.0.2 installed. Then:

$ git clone https://github.com/axelpale/minimal-django-file-upload-example.git
$ cd minimal-django-file-upload-example
$ cd src/for_django_2-0/myproject
$ python manage.py makemigrations
$ python manage.py migrate --run-syncdb
$ python manage.py runserver

Usage (Django 1.9)

First ensure you have Django 1.9 installed. Then:

$ git clone https://github.com/axelpale/minimal-django-file-upload-example.git
$ cd minimal-django-file-upload-example
$ cd src/for_django_1-9/myproject
$ python manage.py migrate
$ python manage.py runserver

Differences between code for Django 1.7 and 1.8

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

Differences between code for Django 1.6 and 1.7

  • use ./manage.py migrate instead of ./manage.py syncdb

Differences between code for Django 1.5 and 1.6

  • myapp/urls.py: 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

  • urls.py: 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 manage.py has risen one level up.
  • Due to hierarchy change absolute package paths are now more recommended and therefore used. Look INSTALLED_APPS in settings.py for example.
  • Little more comments
  • More encoding definitions # -- coding: utf-8 --
  • Database renamed to database.sqlite3

More Repositories

1

genversion

Safety first! An utility to add the version string to your client-side NPM module without exposing package.json.
JavaScript
60
star
2

nudged

Estimate scale, rotation, and translation between two sets of 2D points. For multitouch, calibration, pattern recognition, and more.
JavaScript
59
star
3

poisson-process

A JS lib to generate naturally varying time intervals to improve realism in games and to prevent thundering herds in distributed systems.
JavaScript
28
star
4

nudged-py

Estimate scale, rotation, and translation between two sets of 2D points e.g. for multi-touch gestures or calibration
Python
23
star
5

minibus

Minimal Event Bus for JavaScript
JavaScript
23
star
6

redis-sorted-set

JavaScript implementation of Redis' Sorted Set
JavaScript
21
star
7

sprinkler

Visualize streams, rates, and distributions as a flow of sprite images on HTML5 Canvas
JavaScript
9
star
8

financial-statement

Generate your financial statement automatically from your account transactions
JavaScript
9
star
9

categorical-distribution-js

Categorical distribution library for JavaScript. Capable of online learning, sampling the distribution and dumping it to an array to be stored for later use.
JavaScript
7
star
10

openmoji-spritemap-generator

Generate merged sprite sheets for OpenMoji emoji pickers
JavaScript
6
star
11

affineplane

Affine 2D and 3D geometry library for JavaScript
JavaScript
5
star
12

sensibus

Time series logger and analyser for your daily feelings, activities and life in general.
JavaScript
2
star
13

filterxml

Simplify your XML by removing XML nodes that match XPath expressions
JavaScript
2
star
14

js-math-ops-speed

Benchmark for basic JavaScript math operations
JavaScript
2
star
15

objectronjs

An object sequence learner and predictor. Based on n-grams.
JavaScript
2
star
16

georap

Geographical forum app for groups and teams to share and discuss locations
JavaScript
2
star
17

ghosture

Simulate touch gestures in your unit tests
JavaScript
2
star
18

holocanvas

Hologram effect on canvas for projection mapping purposes
JavaScript
2
star
19

yamdog

Yet another API documentation generator for JavaScript. Scrapes tagged comments in code for Markdown and YAML syntax.
JavaScript
2
star
20

julia-explorer

Julia set renderer and explorer for high resolution fractal image generation
HTML
1
star
21

bitchest

Simple anonymous and temporary file sharing service
JavaScript
1
star
22

demos

Axel Pale Web Tech Demos
HTML
1
star
23

mojifall

A waterfall of emojis animated on html canvas
JavaScript
1
star
24

loadimages

Preload images into web browser and call when finished
JavaScript
1
star
25

openmoji-sprites

Sprite sheets made from OpenMoji.org emojis
JavaScript
1
star
26

circles

Circle user interface library targeted for artificial life simulations.
JavaScript
1
star
27

qrcode-auth

Example app with QR-code authentication
JavaScript
1
star
28

akselipalen

My personal homepages
HTML
1
star
29

make-color-image

Create single-color PNG images from scratch
HTML
1
star
30

tet-node-client

Node.js client for The Eye Tribe
JavaScript
1
star
31

palkkalaskuri

Yksinkertainen ja vapaa suomalainen palkan ja työnantajan sivukulut laskeva funktio
JavaScript
1
star
32

utm-coordinate-parser

Parse northing and easting from various UTM coordinate text formats
JavaScript
1
star