Find a file
Tomas Gavenciak 9e6a620b82 Merge branch 'master' of atrey:/akce/MaM/MaMweb/mamweb
* 'master' of atrey:/akce/MaM/MaMweb/mamweb: (24 commits)
  Smazaný termín pro účast na soustředění v AktualniZadani.html. A.
  Neukládej k organizátorovi fotku, nezměnila-li se
  Obrázky v hlavičce převedeny na jpg
  NOC | otoceni fotky
  Admin: zobrazuje celé jméno, předvyplňuje, ukládá
  Admin: změna způsobu zobrazování celého jména
  Admin: ve výběru uživatele zobraz celé jméno
  test | nasazovani -- problem s pravy
  Admin: předvyplnění autora u problémů
  Zobrazuj jen zadaná a veřejná témata
  Zadání: aktuální výsledkovka
  Noc | nocni tema
  Middleware, krery zjistuje jestli je NOC
  Odchyceni vyjimky u autocomplete
  Změna Organizator.studuje: obsahuje i činnost
  400 a 403 se stejnym obrazkem jako 500
  test | allow hosts
  Fix: APPEND_SLASH = True funguje
  oprava allow hosts na testu
  Allow hosts na testu
  ...

Conflicts:
	Makefile
2015-09-25 08:32:35 +02:00
dakosdump Zbytky poznamek z importu diskuse 2015-06-08 22:44:17 +02:00
mamweb Merge branch 'master' of atrey.karlin.mff.cuni.cz:/akce/MaM/MaMweb/mamweb 2015-09-24 12:10:30 +02:00
seminar Smazaný termín pro účast na soustředění v AktualniZadani.html. 2015-09-24 22:32:36 +02:00
.gitignore Pridan externi django secret key soubor 2015-05-14 02:19:00 +02:00
diff_db_backup.sh Update diff tool 2015-07-29 12:06:08 +02:00
Makefile Update guardu u make deploy_* 2015-09-25 08:30:28 +02:00
manage.py Re-initialised MaMweb with DJ 1.7, backport settings 2015-03-07 12:09:28 +01:00
README.md Doplneny balicky do Readme, ktere manipuluji s obrazky 2015-07-07 08:54:51 +02:00
requirements.txt Update django-taggit 2015-09-17 18:11:29 +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

Install the following packages in Debian/Ubuntu: libpq-dev python-dev python-setuptools python2.7 libjpeg-dev libpng12-dev. Then run:

make ./manage.py testdata make run

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!

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

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.