PEP8 Stuff
This commit is contained in:
parent
3b1b2d6135
commit
b39612b4be
|
@ -1,10 +1,6 @@
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from .models import Entry, Tag
|
from .models import Entry, Tag
|
||||||
from django import forms
|
|
||||||
from django.utils.translation import ugettext as _
|
from django.utils.translation import ugettext as _
|
||||||
from django import forms
|
|
||||||
from django.db import models
|
|
||||||
from ckeditor.widgets import CKEditorWidget
|
|
||||||
import reversion
|
import reversion
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,15 +46,6 @@ class EntryAdmin(reversion.VersionAdmin):
|
||||||
obj.author = request.user
|
obj.author = request.user
|
||||||
super(self.__class__, self).save_model(request, obj, form, change)
|
super(self.__class__, self).save_model(request, obj, form, change)
|
||||||
|
|
||||||
class Media:
|
|
||||||
#css = {
|
|
||||||
# "all": ("ckeditor/redactor.css",)
|
|
||||||
#}
|
|
||||||
# js = (
|
|
||||||
# "ckeditor/ckeditor.js",
|
|
||||||
# "js/wysiwyg.js",
|
|
||||||
# )
|
|
||||||
pass
|
|
||||||
|
|
||||||
admin.site.register(Entry, EntryAdmin)
|
admin.site.register(Entry, EntryAdmin)
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,14 @@
|
||||||
|
# coding: utf-8
|
||||||
"""
|
"""
|
||||||
Django settings for fmartingrcom project.
|
Django settings for fmartingrcom project.
|
||||||
|
|
||||||
For more information on this file, see
|
|
||||||
https://docs.djangoproject.com/en/1.6/topics/settings/
|
|
||||||
|
|
||||||
For the full list of settings and their values, see
|
|
||||||
https://docs.djangoproject.com/en/1.6/ref/settings/
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
# python
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
||||||
|
|
||||||
|
|
||||||
# Quick-start development settings - unsuitable for production
|
|
||||||
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
|
|
||||||
|
|
||||||
# SECURITY WARNING: keep the secret key used in production secret!
|
# SECURITY WARNING: keep the secret key used in production secret!
|
||||||
SECRET_KEY = '0123456789'
|
SECRET_KEY = '0123456789'
|
||||||
|
|
||||||
|
@ -127,6 +120,8 @@ COMPRESS_PRECOMPILERS = (
|
||||||
#
|
#
|
||||||
# MEDIA FILES
|
# MEDIA FILES
|
||||||
#
|
#
|
||||||
|
MEDIA_URL = '/media/'
|
||||||
|
|
||||||
CKEDITOR_UPLOAD_PATH = 'ckeditor/'
|
CKEDITOR_UPLOAD_PATH = 'ckeditor/'
|
||||||
|
|
||||||
CKEDITOR_CONFIGS = {
|
CKEDITOR_CONFIGS = {
|
||||||
|
@ -134,20 +129,24 @@ CKEDITOR_CONFIGS = {
|
||||||
'toolbar': 'Standard',
|
'toolbar': 'Standard',
|
||||||
'width': '100%',
|
'width': '100%',
|
||||||
'stylesSet': (
|
'stylesSet': (
|
||||||
{ 'name': 'Code',
|
{
|
||||||
'element': 'code',
|
'name': 'Code',
|
||||||
|
'element': 'code',
|
||||||
},
|
},
|
||||||
{ 'name': 'Code block',
|
{
|
||||||
'element': 'pre',
|
'name': 'Code block',
|
||||||
'attributes': { 'class': 'prettyprint' }
|
'element': 'pre',
|
||||||
|
'attributes': {'class': 'prettyprint'}
|
||||||
},
|
},
|
||||||
{ 'name': 'Code block (Bash)',
|
{
|
||||||
'element': 'pre',
|
'name': 'Code block (Bash)',
|
||||||
'attributes': { 'class': 'lang-bash prettyprint' }
|
'element': 'pre',
|
||||||
|
'attributes': {'class': 'lang-bash prettyprint'}
|
||||||
},
|
},
|
||||||
{ 'name': 'Code block (Python)',
|
{
|
||||||
'element': 'pre',
|
'name': 'Code block (Python)',
|
||||||
'attributes': { 'class': 'lang-python prettyprint' }
|
'element': 'pre',
|
||||||
|
'attributes': {'class': 'lang-python prettyprint'}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
@ -166,9 +165,21 @@ TEMPLATE_LOADERS = (
|
||||||
TEMPLATE_DIRS = (
|
TEMPLATE_DIRS = (
|
||||||
'{}/themes/v1/templates/'.format(BASE_DIR),
|
'{}/themes/v1/templates/'.format(BASE_DIR),
|
||||||
)
|
)
|
||||||
from django_jinja.base import DEFAULT_EXTENSIONS
|
|
||||||
JINJA2_EXTENSIONS = DEFAULT_EXTENSIONS + [
|
JINJA2_EXTENSIONS = [
|
||||||
'compressor.contrib.jinja2ext.CompressorExtension',
|
"jinja2.ext.do",
|
||||||
|
"jinja2.ext.loopcontrols",
|
||||||
|
"jinja2.ext.with_",
|
||||||
|
"jinja2.ext.i18n",
|
||||||
|
"jinja2.ext.autoescape",
|
||||||
|
"django_jinja.builtins.extensions.CsrfExtension",
|
||||||
|
"django_jinja.builtins.extensions.CacheExtension",
|
||||||
|
"django_jinja.builtins.extensions.TimezoneExtension",
|
||||||
|
"django_jinja.builtins.extensions.UrlsExtension",
|
||||||
|
"django_jinja.builtins.extensions.StaticFilesExtension",
|
||||||
|
"django_jinja.builtins.extensions.DjangoFiltersExtension",
|
||||||
|
"django_jinja.builtins.extensions.DjangoExtraFiltersExtension",
|
||||||
|
"compressor.contrib.jinja2ext.CompressorExtension",
|
||||||
]
|
]
|
||||||
|
|
||||||
TEMPLATE_CONTEXT_PROCESSORS = (
|
TEMPLATE_CONTEXT_PROCESSORS = (
|
||||||
|
|
|
@ -19,3 +19,11 @@ urlpatterns = patterns('',
|
||||||
url(r'^blog/', include('fmartingrcom.apps.blog.urls', namespace='blog')),
|
url(r'^blog/', include('fmartingrcom.apps.blog.urls', namespace='blog')),
|
||||||
url(r'^$', include('fmartingrcom.apps.homepage.urls', namespace='home')),
|
url(r'^$', include('fmartingrcom.apps.homepage.urls', namespace='home')),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
|
from django.conf.urls.static import static
|
||||||
|
|
||||||
|
if settings.DEBUG:
|
||||||
|
urlpatterns += static(settings.MEDIA_URL,
|
||||||
|
document_root=settings.MEDIA_ROOT)
|
||||||
|
|
Loading…
Reference in New Issue