Find a file
2022-10-14 22:35:26 +02:00
_git_hooks Flake8: oprava nekontrolování migrací v pre-commit 2016-11-08 10:54:00 +01:00
aesop První dokumentace 2022-02-15 17:48:16 +01:00
api První dokumentace 2022-02-15 17:48:16 +01:00
data 127.0.0.1:8000 -> mam.mff.cuni.cz 2022-05-27 21:26:57 +02:00
deploy_v2 Model pro deadline 2022-10-01 11:25:53 +02:00
docs Aprílové nápady v dokumentaci 2022-06-23 15:53:36 +02:00
galerie První dokumentace 2022-02-15 17:48:16 +01:00
header_fotky První dokumentace 2022-02-15 17:48:16 +01:00
ilustrace_odmeny Obrazky kolem odmen 2021-09-02 18:23:49 +02:00
korektury dokumentace… 2022-09-08 18:11:27 +02:00
mamweb Nechceme řešit CSRF warningy (RFC) 2022-10-12 17:21:42 +02:00
odevzdavatko Merge branch 'vysledkovky2' into develop 2022-10-13 21:44:20 +02:00
personalni Merge branch 'vysledkovky2' into develop 2022-10-13 21:44:20 +02:00
prednasky První dokumentace 2022-02-15 17:48:16 +01:00
seminar Merge remote-tracking branch 'origin/stvrzenky' into develop 2022-10-14 22:35:26 +02:00
setup Přesunutí uwsgi configu v systemd službě 2021-11-07 12:20:45 +01:00
soustredeni Generování stvrzenek nedostávalo TeXovský soubor do tempu. 2022-10-13 23:30:23 +02:00
treenode První dokumentace 2022-02-15 17:48:16 +01:00
various Komentář, abych to znovu neopravoval :D 2022-09-27 21:12:13 +02:00
vue_frontend Oprava URLs v celém gitu 2021-03-09 22:44:42 +01:00
vysledkovky Zrušení přebytečné lokální proměnné 2022-10-11 01:38:44 +02:00
.gitignore Pár prvních pokusů 2022-02-10 14:01:03 +01:00
checklinks.sh checklinks: zobrazit i jediný rozbitý odkaz 2021-11-26 05:33:24 +01:00
constraints.txt Constrainty pro nový web nemáme, a staré fakt nechceme :-) 2021-09-06 04:48:30 +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
Makefile Generování testdat (poznámka při install_web) 2022-09-08 15:57:03 +02:00
manage.py Nový Makefile. Bude vyžadovat změny uWSGi configu. 2019-04-23 22:34:05 +02:00
README.md Chyby při instalaci zkopírovány do README 2022-09-08 15:26:43 +02:00
requirements.txt Sphinx lepší vzhled 2022-02-10 14:01:03 +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

Pokud install_web říká Error: pg_config executable not found. nainstaluj si libpq-dev Pokud chybová hláška obsahuje #include <Python.h>, nainstaluj si python3-dev

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.