Find a file
2020-03-03 21:48:55 +01:00
_git_hooks Flake8: oprava nekontrolování migrací v pre-commit 2016-11-08 10:54:00 +01:00
dakosdump Zbytky poznamek z importu diskuse 2015-06-08 22:44:17 +02:00
galerie Revert "Migrace: Seminářové migrace tímto resetovány" 2019-11-07 21:50:16 +01:00
korektury Revert "Migrace: Seminářové migrace tímto resetovány" 2019-11-07 21:50:16 +01:00
mamweb Zprovozněn reset hesla 2020-01-15 23:55:13 +01:00
obalky Na různých místech změna oddělení (OVVP -> OPMK) 2018-03-24 16:36:25 +01:00
prednasky Revert "Migrace: Seminářové migrace tímto resetovány" 2019-11-07 21:50:16 +01:00
seminar views.py rozdeleny na vice souboru 2020-03-03 21:48:55 +01:00
.gitignore Prace na prihlasce, bugfixy. 2019-09-01 16:35:20 +02:00
convert_spaces_to_tabs.sh Změna mezer na tabulátory 2019-05-11 01:15:05 +02:00
diff_db_backup.sh Update diff tool 2015-07-29 12:06:08 +02:00
flat.json Zkopírovány JSONy z new_design 2020-02-27 00:54:41 +01:00
Makefile Pridany prikaz na stahovani aktualnich flatpages z produkce. 2019-10-16 23:07:09 +02:00
mamweb_prod.ini Update uWSGi configu, **Možná nebude fungovat** 2019-04-23 23:31:35 +02:00
mamweb_test.ini Update uWSGi configu, **Možná nebude fungovat** 2019-04-23 23:31:35 +02:00
manage.py Nový Makefile. Bude vyžadovat změny uWSGi configu. 2019-04-23 22:34:05 +02:00
README.md README.md: update pokynů k začátku vývoje 2019-11-13 23:08:00 +01:00
requirements.txt Admin: django-reverse-admin ukazka a fail s m2m. 2020-01-08 21:44:50 +01:00
Schema_new.dia Update modelu, odstraneni zadani a vzoraku z ulohy 2019-05-29 00:27:25 +02:00
sitetree_new.json Zkopírovány JSONy z new_design 2020-02-27 00:54:41 +01:00

Basic commands for web development

After you clone this repository, run make. It will download, locally install and setup virtualenv and pip, and then locally install all required packages from requirements.txt.

When working with the code, always use the binaries in ./bin/, such as bin/pip, bin/python, ... never the global python, pip, ... Use make and ./manage.py for most things.

Use git :-)

Quickstart

Run the following commands: make install_venv . env/bin/activate make install_web

After finishing development, run "deactivate".

Make commands

  • make install (or make) - locally install and setup virtualpy, install required packages. Ran again installs missing packages. Run after changing requirements.txt.

  • make clean - remove local python packages.

  • make veryclean - remove local packages and virtualpy enviroment and binaries.

  • make run - runs "./manage.py runserver_plus"

  • make push_test - pushes the last commited version to test location. Only git-commited changes are pushed! Rest is re-generated from scratch. At test server, the media data and database are kept the same. Everything else not in .gitignore is deleted/overwritten on the test server.

  • make schema - generates graph of seminar and all schemas as PDF. Supercool!

  • make sync_prod_flatpages - downloads current flat/static pages from production version

./manage.py commands

  • ./manage.py migrate - update the database schema, initialise the database. You need to run this in the beginning.

  • ./manage.py runserver_plus - run a debugging server for the web. Slightly enhanced compared to ./manage.py runserver. Open 127.0.0.1:8000.

  • ./manage.py testdata - create pseudo-random seminar data and admin/admin user.

  • ./manage.py test - run the tests.

  • ./manage.py shell - run commands, list elemements of database, check syntax by importing files, etc.

Configurations

  • mamweb/settings_common.py contains most configuration options.
  • mamweb/settings.py is used only for local development.
  • mamweb/settings_test.py is used for testing on atrey.
  • mamweb/settings_prod.py is used in production deployment.

These are automatically switched by make.