1
0

TinyMCE editor and code cleanup.

This commit is contained in:
2018-01-22 18:36:09 +03:00
parent 33c77ebb85
commit 9f5440d960
8 changed files with 25 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
from django.contrib import admin
from app.models import Setting, File
from .models import Setting, File
from django.conf import settings
# Register your models here.

View File

@@ -1,4 +1,5 @@
from django.db import models
from tinymce.models import HTMLField
# Create your models here.
@@ -8,7 +9,7 @@ class Setting(models.Model):
return 'Setting {0} - {1} ({2})'.format(self.name, self.language, self.id)
name = models.CharField(max_length=100)
language = models.CharField(max_length=5)
string = models.TextField()
string = HTMLField()
class File(models.Model):

View File

@@ -1,5 +1,4 @@
from django.core.exceptions import ObjectDoesNotExist
from app.models import Setting
from .models import Setting
from django.conf import settings

View File

@@ -1,9 +1,9 @@
from django.shortcuts import render, get_object_or_404, redirect
from django.utils.translation import gettext as _
from django.conf import settings
from app.settings_db import get_setting
from .settings_db import get_setting
from django.utils import translation
from app.models import File
from .models import File
from django.http import HttpResponseBadRequest