Remove allauth, add 'make run', clean config, add Nastaveni
This commit is contained in:
parent
cacc5e4c87
commit
b209344e87
6 changed files with 62 additions and 21 deletions
3
Makefile
3
Makefile
|
@ -41,6 +41,9 @@ virtualenv:
|
||||||
clean_virtualenv:
|
clean_virtualenv:
|
||||||
rm -rf virtualenv/
|
rm -rf virtualenv/
|
||||||
|
|
||||||
|
run:
|
||||||
|
./manage.py runserver_plus
|
||||||
|
|
||||||
|
|
||||||
TEST_USER=${USER}
|
TEST_USER=${USER}
|
||||||
TEST_SERVER=atrey.karlin.mff.cuni.cz
|
TEST_SERVER=atrey.karlin.mff.cuni.cz
|
||||||
|
|
|
@ -76,6 +76,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
|
||||||
)
|
)
|
||||||
|
|
||||||
INSTALLED_APPS = (
|
INSTALLED_APPS = (
|
||||||
|
# Basic
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
'django.contrib.auth',
|
'django.contrib.auth',
|
||||||
'django.contrib.contenttypes',
|
'django.contrib.contenttypes',
|
||||||
|
@ -84,11 +85,16 @@ INSTALLED_APPS = (
|
||||||
'django.contrib.sites',
|
'django.contrib.sites',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
|
|
||||||
|
# Utilities
|
||||||
'sekizai',
|
'sekizai',
|
||||||
'reversion',
|
'reversion',
|
||||||
|
'django_countries',
|
||||||
|
'solo',
|
||||||
|
|
||||||
|
# MaMweb
|
||||||
'mamweb',
|
'mamweb',
|
||||||
'seminar',
|
'seminar',
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# MaM specific
|
# MaM specific
|
||||||
|
|
|
@ -7,7 +7,6 @@ from django.conf import settings
|
||||||
urlpatterns = i18n_patterns('',
|
urlpatterns = i18n_patterns('',
|
||||||
|
|
||||||
url(r'^admin/', include(admin.site.urls)), # NOQA
|
url(r'^admin/', include(admin.site.urls)), # NOQA
|
||||||
url(r'^accounts/', include('allauth.urls')),
|
|
||||||
url(r'^', include('seminar.urls')),
|
url(r'^', include('seminar.urls')),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,4 @@
|
||||||
Django==1.7.5
|
# basic libs
|
||||||
django-bootstrap-sass==0.0.6a0
|
|
||||||
django-mptt==0.6.1
|
|
||||||
django-reversion==1.8.5
|
|
||||||
django-sekizai==0.8.1
|
|
||||||
|
|
||||||
django-debug-toolbar==1.3.0
|
|
||||||
django-extensions==1.5.1
|
|
||||||
sqlparse==0.1.14
|
|
||||||
Werkzeug==0.10.1
|
|
||||||
|
|
||||||
django-allauth==0.19.1
|
|
||||||
oauthlib==0.7.2
|
|
||||||
python-openid==2.2.5
|
|
||||||
requests==2.5.3
|
|
||||||
requests-oauthlib==0.4.2
|
|
||||||
|
|
||||||
html5lib==0.999
|
html5lib==0.999
|
||||||
ipython==3.0.0
|
ipython==3.0.0
|
||||||
|
@ -21,4 +6,28 @@ Pillow==2.7.0
|
||||||
pytz==2014.10
|
pytz==2014.10
|
||||||
six==1.9.0
|
six==1.9.0
|
||||||
|
|
||||||
|
# Django
|
||||||
|
|
||||||
|
Django==1.7.5
|
||||||
|
django-bootstrap-sass==0.0.6a0
|
||||||
|
django-mptt==0.6.1
|
||||||
|
django-reversion==1.8.5
|
||||||
|
django-sekizai==0.8.1
|
||||||
|
django-countries==3.2
|
||||||
|
django-solo==1.1.0
|
||||||
|
|
||||||
|
# debug tools/extensions
|
||||||
|
|
||||||
|
django-debug-toolbar==1.3.0
|
||||||
|
django-extensions==1.5.1
|
||||||
|
sqlparse==0.1.14
|
||||||
|
Werkzeug==0.10.1
|
||||||
|
|
||||||
|
# G+, FB authorisation
|
||||||
|
|
||||||
|
# django-allauth==0.19.1
|
||||||
|
# oauthlib==0.7.2
|
||||||
|
# python-openid==2.2.5
|
||||||
|
# requests==2.5.3
|
||||||
|
# requests-oauthlib==0.4.2
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from seminar.models import Skola, Resitel, Rocnik, Cislo, Problem, Reseni, PrilohaReseni
|
from seminar.models import Skola, Resitel, Rocnik, Cislo, Problem, Reseni, PrilohaReseni, Nastaveni
|
||||||
|
from solo.admin import SingletonModelAdmin
|
||||||
|
|
||||||
|
### Nastaveni
|
||||||
|
|
||||||
|
admin.site.register(Nastaveni, SingletonModelAdmin)
|
||||||
|
|
||||||
### Skola
|
### Skola
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,9 @@ from django.conf import settings
|
||||||
from django.utils.encoding import python_2_unicode_compatible
|
from django.utils.encoding import python_2_unicode_compatible
|
||||||
from django.utils.encoding import force_unicode
|
from django.utils.encoding import force_unicode
|
||||||
|
|
||||||
|
from django_countries.fields import CountryField
|
||||||
|
from solo.models import SingletonModel
|
||||||
|
|
||||||
#
|
#
|
||||||
# Mělo by být částečně vytaženo z Aesopa
|
# Mělo by být částečně vytaženo z Aesopa
|
||||||
# viz https://ovvp.mff.cuni.cz/wiki/aesop/export-skol.
|
# viz https://ovvp.mff.cuni.cz/wiki/aesop/export-skol.
|
||||||
|
@ -52,7 +55,8 @@ class Skola(models.Model):
|
||||||
psc = models.CharField(u'PSČ', max_length=32)
|
psc = models.CharField(u'PSČ', max_length=32)
|
||||||
|
|
||||||
# ISO 3166-1 dvojznakovy kod zeme velkym pismem (CZ, SK)
|
# ISO 3166-1 dvojznakovy kod zeme velkym pismem (CZ, SK)
|
||||||
stat = models.CharField(u'kód státu', max_length=2, default='CZ',
|
# Ekvivalentní s CharField(max_length=2, default='CZ', ...)
|
||||||
|
stat = CountryField(u'kód státu', default='CZ',
|
||||||
help_text=u'ISO 3166-1 kód zeme velkými písmeny (CZ, SK, ...)')
|
help_text=u'ISO 3166-1 kód zeme velkými písmeny (CZ, SK, ...)')
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
@ -121,8 +125,9 @@ class Resitel(models.Model):
|
||||||
psc = models.CharField(u'PSČ', max_length=32, blank=True, default='')
|
psc = models.CharField(u'PSČ', max_length=32, blank=True, default='')
|
||||||
|
|
||||||
# ISO 3166-1 dvojznakovy kod zeme velkym pismem (CZ, SK)
|
# ISO 3166-1 dvojznakovy kod zeme velkym pismem (CZ, SK)
|
||||||
stat = models.CharField(u'kód státu', max_length=2,
|
# Ekvivalentní s CharField(max_length=2, default='CZ', ...)
|
||||||
help_text=u'ISO 3166-1 kód zeme velkými písmeny (CZ, SK, ...)', default='CZ')
|
stat = CountryField(u'kód státu', default='CZ',
|
||||||
|
help_text=u'ISO 3166-1 kód země velkými písmeny (CZ, SK, ...)')
|
||||||
|
|
||||||
def plne_jmeno(self):
|
def plne_jmeno(self):
|
||||||
return force_unicode(u'%s %s' % (self.jmeno, self.prijmeni))
|
return force_unicode(u'%s %s' % (self.jmeno, self.prijmeni))
|
||||||
|
@ -298,3 +303,18 @@ class PrilohaReseni(models.Model):
|
||||||
return force_unicode(self.soubor)
|
return force_unicode(self.soubor)
|
||||||
|
|
||||||
|
|
||||||
|
@python_2_unicode_compatible
|
||||||
|
class Nastaveni(SingletonModel):
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
db_table = 'seminar_nastaveni'
|
||||||
|
verbose_name = u'Nastavení semináře'
|
||||||
|
|
||||||
|
aktualni_rocnik = models.ForeignKey(Rocnik, verbose_name=u'aktuální ročník', null=False)
|
||||||
|
|
||||||
|
aktualni_cislo = models.ForeignKey(Cislo, verbose_name=u'poslední vydané číslo', null=False)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return u'Nastavení semináře'
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue