Find a file
2021-02-23 21:58:10 +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
data Merge branch 'data_migrations' of gimli.ms.mff.cuni.cz:/akce/mam/git/mamweb into data_migrations 2021-02-16 21:52:04 +01:00
galerie Vyčištění submenu, headerů a base v templatech 2020-09-20 12:41:56 +02:00
header_fotky Move context_processors.py do header_fotky 2020-10-16 00:35:36 +02:00
korektury Merge branch 'data_migrations' into email 2021-01-19 22:21:41 +01:00
mamweb zkrášlování deadlinů 2021-02-17 08:13:48 +01:00
prednasky Vyčištění submenu, headerů a base v templatech 2020-09-20 12:41:56 +02:00
seminar ročník má svá témata 2021-02-23 21:58:10 +01:00
vue_frontend Merge remote-tracking branch 'origin/data_migrations' into treenode_editor 2020-12-22 22:13:48 +01:00
.gitignore .gitignore update 2020-09-08 18:41:54 +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
fix_json.py Pridan skript na jednoznacnejsi razeni jsonu. 2021-01-26 20:21:18 +01:00
init_local.sh Init: collectstatic 2020-06-25 19:29:34 +02:00
Makefile Merge branch 'data_migrations' of gimli.ms.mff.cuni.cz:/akce/mam/git/mamweb into data_migrations 2021-01-19 20:27:36 +01:00
mamweb_prod.ini Oprava uwsgi configu pro Python 3 2020-08-19 09:17:42 +02:00
mamweb_test.ini Oprava uwsgi configu pro Python 3 2020-08-19 09:17:42 +02:00
manage.py Nový Makefile. Bude vyžadovat změny uWSGi configu. 2019-04-23 22:34:05 +02:00
MIGRATIONS Log migrace, ať se ví, co se nepovedlo a dá se to dochytat 2020-08-20 00:49:51 +02:00
README.md Merge branch 'data_migrations' into new_design 2020-02-19 20:46:08 +01:00
requirements.txt TreeNode editor a zobrazovac ve Vue 2020-09-03 23:02:28 +02:00
Schema_new.dia Schema | Aktualizovane a zjednodusene schema. 2020-04-02 22:07:09 +02: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 and applies static/flat pages from mamweb-prod

./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.