https://cz.pycon.org/2019/ and https://cz.pycon.org/2020/ are now served as a static websites.
Repo for these static mirrors is https://github.com/pyvec/cz.pycon.org-archive.
New repository for cz.pycon.org is https://github.com/pyvec/cz.pycon.org and should remain so in the future.
PyCon CZ website
master
branch is manually deployed to https://cz.pycon.org/- commit directly to
master
only if it’s a hotfix
- commit directly to
- create feature branches (named whatever you want) for your work
- create PR’s to merge into
master
- rebase feature branch on top of the
master
to keep it current (it’s preferred to merging)
- create PR’s to merge into
beta
branch is manually deployed to beta (URL and credentials available at Pyvec Slack).- freely merge into
beta
anything you need to preview including work in progress - never merge from
beta
to anywhere
- freely merge into
PyCon CZ website is using Python 3.5/Django for the backend, NodeJS for bundling frontend assets and Postgresql as a database.
Run following commands to setup project for local development:
-
You can use sqlite database if you only need to work with static pages and styles.
In a case you need to work with dynamic apps setup postgresql create role and db via CLI:
# su -c psql postgres postgres=# CREATE ROLE pycon2019 LOGIN ENCRYPTED PASSWORD 'your fancy password'; postgres=# CREATE DATABASE "pycon2019" WITH ENCODING='UTF8' OWNER=pycon2019;
You can also use PostgreSQL localy in Docker container:
$ docker run --name pyconcz2019-pg -e POSTGRES_PASSWORD="your fancy password" -e POSTGRES_USER=pycon2019 -d -p 5432:5432 postgres
-
python3 -m venv env
note: Use exactly Python 3.5.2 on Windows (otherwise Pillow won't install with pip) so you might want topy -3.5 -m venv env
-
pip install -r requirements-dev.txt
-
copy
pyconcz/settings/local_template_dev.py
topyconcz/settings/local.py
and don't forget to set DATABASES and SECRET_KEY settings. -
./manage.py migrate
You only need this if you work with styles or images.
For styles and images processing to work, you need to have node.js
installed.
In root directory (the same directory where manage.py
is) run npm install
You can run your dev server manually on http://localhost:8000 with:
./manage.py runserver --settings=pyconcz.settings.local
To start development with static files being processed run npm start
. It will also start Django dev server for you.
Open http://localhost:3838 and you should see development version of website with automatic compiling and reloading.
You can also set your hosts to map 127.0.0.1 to pycon.test
and it will work on http://pycon.test:3838.
Everything in /static/css
and /static/img
is replaced with
processed content of /static_src/css
and /static_src/img
respectively so don't edit anything inside /static/css
and /static/img
manually.
Same would go for own JavaScript but we don’t have any.
After each production build, you have to commit newly generated CSS and image files. Old files are automatically replaced.
npm run build
git add pyconcz/static
Just use fab production deploy
to deploy to production or fab beta deploy
to deploy to beta site.
This work is licensed under a MIT