Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pkolt/files

Общий механизм загрузки(вложения) файлов для моделей
https://github.com/pkolt/files

Last synced: 7 days ago
JSON representation

Общий механизм загрузки(вложения) файлов для моделей

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 syncdb

Integration (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 FileInline

class FlatPageAdmin(FlatPageAdminOld):
inlines = [FileInline,]

admin.site.unregister(FlatPage)
admin.site.register(FlatPage, FlatPageAdmin)