Browse Source

Clean up gitignore, minor fix admin, update README

remotes/origin/feincms
Tomas Gavenciak 10 years ago
parent
commit
add219ccf8
  1. 2
      .gitignore
  2. 8
      README.md
  3. 4
      seminar/admin.py
  4. BIN
      seminar/management/commands/.testdata.py.swp
  5. 4
      seminar/models.py

2
.gitignore

@ -5,7 +5,9 @@ local/
share/ share/
virtualenv/ virtualenv/
pip-selfcheck.json pip-selfcheck.json
db-local.sqlite3*
/static /static
/media /media
*.pyc *.pyc
*.swp

8
README.md

@ -9,8 +9,14 @@ When working with the code, always use the binaries in `./bin/`, such as
`bin/pip`, `bin/python`, ... never the global python, pip, ... `bin/pip`, `bin/python`, ... never the global python, pip, ...
Use `make` and `./manage.py` for most things. Use `make` and `./manage.py` for most things.
Use git. Use git :-)
Quickstart
----------
make
./manage.py testdata
make run
Make commands Make commands
------------- -------------

4
seminar/admin.py

@ -120,13 +120,13 @@ class ProblemAdmin(admin.ModelAdmin):
form = ProblemAdminForm form = ProblemAdminForm
# readonly_fields = ['autor'] # readonly_fields = ['autor']
fieldsets = [ fieldsets = [
(None, {'fields': ['nazev', 'typ', 'stav', 'autor']}), (None, {'fields': ['nazev', 'typ', 'stav', 'autor', 'body']}),
(u'Vydání', {'fields': ['cislo_zadani', 'kod', 'cislo_reseni', 'opravovatel']}), (u'Vydání', {'fields': ['cislo_zadani', 'kod', 'cislo_reseni', 'opravovatel']}),
(u'Texty', {'fields': ['text_problemu', 'text_problemu_org']}), (u'Texty', {'fields': ['text_problemu', 'text_problemu_org']}),
] ]
list_display = ['nazev', 'typ', 'stav', 'autor', 'kod', 'opravovatel'] list_display = ['nazev', 'typ', 'stav', 'autor', 'kod', 'opravovatel']
list_filter = ['typ', 'stav', 'autor', 'opravovatel'] list_filter = ['typ', 'stav', 'autor', 'opravovatel']
search_fields = ['nazev', 'autor', 'kod', 'text_problemu_org', 'text_problemu'] search_fields = ['nazev', 'kod', 'text_problemu_org', 'text_problemu']
inlines = [ReseniInline] inlines = [ReseniInline]
admin.site.register(Problem, ProblemAdmin) admin.site.register(Problem, ProblemAdmin)

BIN
seminar/management/commands/.testdata.py.swp

Binary file not shown.

4
seminar/models.py

@ -13,10 +13,6 @@ from django.utils.encoding import force_unicode
from django_countries.fields import CountryField from django_countries.fields import CountryField
from solo.models import SingletonModel from solo.models import SingletonModel
from ckeditor.fields import RichTextField
from redactor.fields import RedactorField
# #
# 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.

Loading…
Cancel
Save