axelpale/minimal-django-file-upload-example
소개
다음 주소의 예제 앱 소스 코드입니다: http://stackoverflow.com/questions/5871730/need-a-minimal-django-file-upload-example
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalminimal-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:
- Django 3.0 | source.
- Django 2.0.2 | source.
- Django 1.9 | source.
- Django 1.8 | source.
- Django 1.7 | source.
- Django 1.6 | source.
- Django 1.5 | source.
- Django 1.4 | source.
- Django 1.3 | source.
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 migrateinstead 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, urltofrom 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
관련 프로젝트 살펴보기
불러오는 중…