Commit 3b814edf authored by Dmitry Shelepnev's avatar Dmitry Shelepnev
Browse files

Fix models.LangCodes list

parent efee2164
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -7,17 +7,15 @@ from django.contrib.syndication.views import Feed
from django.core.urlresolvers import reverse
from django.core.paginator import Paginator, EmptyPage
from django.shortcuts import render
from django.core.exceptions import ObjectDoesNotExist
from django.db.models.functions import Substr, Upper
from django.db.models import Count, Min, Sum
from django.utils.encoding import escape_uri_path
#from django.core.exceptions import ObjectDoesNotExist
#from django.db.models.functions import Substr, Upper
#from django.db.models import Count, Min, Sum
#from django.utils.encoding import escape_uri_path

from opds_catalog.models import Book, Catalog, Author, Genre, Series, bookshelf, Counter
from opds_catalog.models import Book, Catalog, Author, Genre, Series, bookshelf, Counter, lang_codes
from opds_catalog import models
from opds_catalog import settings
from django.http.response import Http404

lang_codes = {1:_('Cyrillic'), 2:_('Latin'), 3:_('Digits'), 9:_('Other symbols'), 0:_('Show all')}
#from django.http.response import Http404

class AuthFeed(Feed):
    request = None
+4 −2
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ from django.db import models
from django.contrib.auth.models import User
from django.utils import timezone
from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import ugettext as _

counter_allbooks = 'allbooks'
counter_allcatalogs = 'allcatalogs'
@@ -9,9 +10,10 @@ counter_allauthors = 'allauthors'
counter_allgenres = 'allgenres'
counter_allseries = 'allseries'

LangCodes = {1:'АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЬЫЪЭЮЯ',
             2:'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
LangCodes = {1:'АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЬЫЪЭЮЯабвгдеёжзийклмнопрстуфхцчшщьыъэюя',
             2:'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',
             3:'0123456789'}
lang_codes = {1:_('Cyrillic'), 2:_('Latin'), 3:_('Digits'), 9:_('Other symbols'), 0:_('Show all')}

class Book(models.Model):
    filename = models.CharField(db_index=True, max_length=256)
Loading