You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Pavel "LEdoian" Turinsky 7770dbf134 Merge branch 'data_migrations' into test 4 years ago
_git_hooks Flake8: oprava nekontrolování migrací v pre-commit 8 years ago
dakosdump Zbytky poznamek z importu diskuse 10 years ago
data přepsány kontakty 4 years ago
galerie Vyčištění submenu, headerů a base v templatech 4 years ago
header_fotky Move context_processors.py do header_fotky 4 years ago
korektury Merge branch 'data_migrations' into email 4 years ago
mamweb Merge branch 'data_migrations' into test 4 years ago
prednasky Vyčištění submenu, headerů a base v templatech 4 years ago
seminar Migr 005[12]: Debugovací poznámky do DB + pár fixů 4 years ago
various Apríl není pořád :-D 4 years ago
vue_frontend Oprava URLs v celém gitu 4 years ago
.gitignore .gitignore update 4 years ago
MIGRATIONS Log migrace, ať se ví, co se nepovedlo a dá se to dochytat 4 years ago
Makefile Merge branch 'data_migrations' into test 4 years ago
README.md Merge branch 'data_migrations' into new_design 5 years ago
Schema_new.dia Schema | Aktualizovane a zjednodusene schema. 5 years ago
admin_org_prava.json Zapomenutá práva k taggitu 4 years ago
convert_spaces_to_tabs.sh Změna mezer na tabulátory 6 years ago
diff_db_backup.sh Update diff tool 10 years ago
fix_json.py Pridan skript na jednoznacnejsi razeni jsonu. 4 years ago
init_local.sh Init: collectstatic 5 years ago
mamweb_prod.ini Oprava uwsgi configu pro Python 3 4 years ago
mamweb_test.ini Oprava uwsgi configu pro Python 3 4 years ago
manage.py Nový Makefile. Bude vyžadovat změny uWSGi configu. 6 years ago
requirements.txt TreeNode editor a zobrazovac ve Vue 4 years ago

README.md

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.