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.
 
 
 
 
 
 
Jonas Havelka 37f7619972 Revert "Přihlášený uživatel nyní varován na přihlašovací stránce smysluplnou hláškou" 2 years ago
_git_hooks Flake8: oprava nekontrolování migrací v pre-commit 8 years ago
aesop První dokumentace 3 years ago
api První dokumentace 3 years ago
data 127.0.0.1:8000 -> mam.mff.cuni.cz 3 years ago
deploy_v2 Move admin_org_prava.json 3 years ago
docs Aprílové nápady v dokumentaci 2 years ago
galerie První dokumentace 3 years ago
header_fotky První dokumentace 3 years ago
ilustrace_odmeny Obrazky kolem odmen 3 years ago
korektury dokumentace… 2 years ago
mamweb Doba pro neodhlašování přesunuta do settings 2 years ago
odevzdavatko odevzdavatko | id musi byt v ramci stranky jedinecne. 3 years ago
personalni Řešení už neposíláme (v přihlášce a editaci profilu) 2 years ago
prednasky První dokumentace 3 years ago
seminar Nástřel implementace políčka "Jak se dozvěděli" 2 years ago
setup Přesunutí uwsgi configu v systemd službě 3 years ago
soustredeni První dokumentace 3 years ago
treenode První dokumentace 3 years ago
various Revert "Přihlášený uživatel nyní varován na přihlašovací stránce smysluplnou hláškou" 2 years ago
vue_frontend Oprava URLs v celém gitu 4 years ago
vysledkovky FIX: Výsledkovka 2 years ago
.gitignore Pár prvních pokusů 3 years ago
Makefile Generování testdat (poznámka při install_web) 2 years ago
README.md Chyby při instalaci zkopírovány do README 2 years ago
checklinks.sh checklinks: zobrazit i jediný rozbitý odkaz 3 years ago
constraints.txt Constrainty pro nový web nemáme, a staré fakt nechceme :-) 3 years ago
convert_spaces_to_tabs.sh Změna mezer na tabulátory 6 years ago
diff_db_backup.sh Update diff tool 9 years ago
fix_json.py Pridan skript na jednoznacnejsi razeni jsonu. 4 years ago
manage.py Nový Makefile. Bude vyžadovat změny uWSGi configu. 6 years ago
requirements.txt Sphinx lepší vzhled 3 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

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.