File tree Expand file tree Collapse file tree 3 files changed +36
-10
lines changed Expand file tree Collapse file tree 3 files changed +36
-10
lines changed Original file line number Diff line number Diff line change 11import os
22
3+ from django import VERSION
4+ from django .core .management import call_command
5+
36os .environ .setdefault ('DJANGO_SETTINGS_MODULE' , 'tests.settings' )
47
5- from django import VERSION
68
79if VERSION >= (1 , 7 ):
810 from django .conf import settings
911 from django .apps import apps
1012
1113 apps .populate (settings .INSTALLED_APPS )
14+ call_command ('migrate' , interactive = False )
15+ else :
16+ call_command ('syncdb' , interactive = False )
1217
13- from django .core .management import call_command
14- call_command ('syncdb' , interactive = False )
15-
16- from django_markdown .tests import * # noqa
18+ from django_markdown .tests import * # noqa
Original file line number Diff line number Diff line change 3838 'django.contrib.sessions.middleware.SessionMiddleware' ,
3939 'django.contrib.auth.middleware.AuthenticationMiddleware' ,
4040)
41+
42+ TEMPLATES = [
43+ {
44+ 'BACKEND' : 'django.template.backends.django.DjangoTemplates' ,
45+ 'APP_DIRS' : True ,
46+ 'OPTIONS' : {
47+ 'context_processors' : [
48+ 'django.template.context_processors.debug' ,
49+ 'django.template.context_processors.request' ,
50+ 'django.contrib.auth.context_processors.auth' ,
51+ 'django.contrib.messages.context_processors.messages' ,
52+ ],
53+ },
54+
55+ },
56+ ]
Original file line number Diff line number Diff line change 1- from django .conf .urls import include , patterns
1+ from django import VERSION
2+ from django .conf .urls import include , url
23
3- urlpatterns = patterns (
4- '' ,
5- (r'^markdown/' , include ('django_markdown.urls' )),
6- )
4+ if VERSION >= (1 , 8 ):
5+ urlpatterns = [
6+ url (r'^markdown/' , include ('django_markdown.urls' )),
7+ ]
8+ else :
9+ # django <= 1.7.*
10+ from django .conf .urls import patterns
11+ urlpatterns = patterns (
12+ '' ,
13+ (r'^markdown/' , include ('django_markdown.urls' )),
14+ )
You can’t perform that action at this time.
0 commit comments