put draceditor fork back in to fix a few bugs
This commit is contained in:
parent
12e308e927
commit
4afc2c2127
|
@ -31,7 +31,7 @@ services:
|
||||||
user: django
|
user: django
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
- redis
|
# - redis
|
||||||
command: /gunicorn.sh
|
command: /gunicorn.sh
|
||||||
env_file: .env
|
env_file: .env
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.contrib.admin import ModelAdmin
|
from django.contrib.admin import ModelAdmin
|
||||||
|
from draceditor.widgets import AdminDraceditorWidget
|
||||||
|
from draceditor.models import DraceditorField
|
||||||
|
|
||||||
from mhackspace.blog.models import Post, Category
|
from mhackspace.blog.models import Post, Category
|
||||||
|
|
||||||
|
@ -13,6 +15,9 @@ class PostAdmin(ModelAdmin):
|
||||||
readonly_fields = ('published_date',)
|
readonly_fields = ('published_date',)
|
||||||
filter_horizontal = ('categories',)
|
filter_horizontal = ('categories',)
|
||||||
prepopulated_fields = {"slug": ("title",)}
|
prepopulated_fields = {"slug": ("title",)}
|
||||||
|
formfield_overrides = {
|
||||||
|
DraceditorField: {'widget': AdminDraceditorWidget},
|
||||||
|
}
|
||||||
|
|
||||||
@admin.register(Category)
|
@admin.register(Category)
|
||||||
class CategoryAdmin(ModelAdmin):
|
class CategoryAdmin(ModelAdmin):
|
||||||
|
|
|
@ -62,6 +62,5 @@ git+https://github.com/olymk2/scaffold.git
|
||||||
djangorestframework==3.6.2
|
djangorestframework==3.6.2
|
||||||
django-filter==1.0.1
|
django-filter==1.0.1
|
||||||
|
|
||||||
# draceditor==1.1.6
|
|
||||||
|
|
||||||
git+https://github.com/olymk2/dracos-markdown-editor.git
|
git+https://github.com/olymk2/dracos-markdown-editor.git
|
||||||
|
# draceditor
|
||||||
|
|
Loading…
Reference in New Issue