Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pkolt/files
Общий механизм загрузки(вложения) файлов для моделей
https://github.com/pkolt/files
Last synced: 7 days ago
JSON representation
Общий механизм загрузки(вложения) файлов для моделей
- Host: GitHub
- URL: https://github.com/pkolt/files
- Owner: pkolt
- Created: 2011-01-10T21:48:27.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2011-04-24T17:43:40.000Z (over 13 years ago)
- Last Synced: 2024-10-15T12:12:30.232Z (about 1 month ago)
- Language: Python
- Homepage:
- Size: 93.8 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
Awesome Lists containing this project
README
====================================================================
Files. The total loading mechanism (attachment) files for the models
====================================================================Depending
- uploadtools (http://github.com/pkolt/)Installing
1. Add 'files' in INSTALLED_APPS
3. python manage.py syncdbIntegration (for example Flatpages)
# admin.py
from django.contrib import admin
from django.contrib.contenttypes import generic
from django.contrib.flatpages.models import FlatPage
from django.contrib.flatpages.admin import FlatPageAdmin as FlatPageAdminOld
from files.admin import FileInlineclass FlatPageAdmin(FlatPageAdminOld):
inlines = [FileInline,]admin.site.unregister(FlatPage)
admin.site.register(FlatPage, FlatPageAdmin)