Commit ef84dfb8bf336f6c24c9fb80cb3dc586b85cd179
1 parent
9a55de81
Exists in
master
and in
1 other branch
use global settings.DEBUG (instead of private DEBUG)
Showing
1 changed file
with
5 additions
and
2 deletions
Show diff stats
src/pyrosapp/admin.py
... | ... | @@ -2,6 +2,9 @@ from django import forms |
2 | 2 | from django.contrib import admin |
3 | 3 | from django.contrib.auth.models import User |
4 | 4 | |
5 | +# EP | |
6 | +from django.conf import settings | |
7 | + | |
5 | 8 | #TODO?: |
6 | 9 | #from pyrosapp import models as pyrosapp_models |
7 | 10 | from pyrosapp.models import * |
... | ... | @@ -36,11 +39,11 @@ class ReadOnlyModelAdmin(admin.ModelAdmin): |
36 | 39 | # EP added |
37 | 40 | |
38 | 41 | # Edit mode |
39 | -DEBUG = False | |
42 | +#DEBUG = False | |
40 | 43 | # View only mode |
41 | 44 | #DEBUG = True |
42 | 45 | |
43 | -if DEBUG: | |
46 | +if settings.DEBUG: | |
44 | 47 | class PyrosModelAdmin(ReadOnlyModelAdmin): |
45 | 48 | pass |
46 | 49 | else: | ... | ... |