Skip to content
PyCon TW official website
HTML Python CSS JavaScript Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
yarn.lock travis-ci status

PyCon TW

This repository serves the website of PyCon TW, Python Conference Taiwan. This project is open source and the license can be found in LICENSE.

Getting Started


  • Git 1.8+
  • Python 3.6.x
  • Yarn 1.0+
  • Node.js 8.0+

Set up a Virtual Environment

Database - Docker (Optional)

Create and start the database for development:

docker-compose up -f docker-compose-dev.yml

Python - Built-in venv

Create your virtual environment:

python3 -m venv venv

And enable it:

. venv/bin/activate

Python - virtualenvwrapper

You need to specify your python path when creating the virtual environment:

mkvirtualenv --python=$(which python3) pycontw2016

Node.js - nvm

Switch to version specified in .nvmrc:

nvm use

Install Dependencies

Use pip to install Python depedencies:

pip install -r requirements.txt

Use Yarn to install Node dependencies:

yarn install --dev

Set up Local Environment Variables and Database

Settings are stored in environment variables via django-environ. The quickest way to start is to copy local.sample.env into local.env:

cp src/pycontw2016/settings/local.sample.env src/pycontw2016/settings/local.env

Then edit the SECRET_KEY line in local.env, replacing {{ secret_key }} into any Django Secret Key value. An example:


If you’re using a database for the first time, create a database named pycontw2016 owned by the database user specified in the env file:

# Replace "postgres" with your specified role.
create database pycontw2016 with owner = postgres;

After that, just run the migration.

Get Ready for Development

cd into the src directory:

cd src

And migrate the database:

python migrate

Now you’re all set!

Run the Development Server

python runserver

Run Tests

Tests are managed with pytest-django. You have two options to run tests, either with the local environment, or in an isolated one via Tox.

Testing in the Local Environment

Run the following command inside src:


To run tests with coverage report:

pytest --cov=.

Testing with Tox

Run the following inside the top-level directory (the one with tox.ini):


How to Contribute

Follow the GitHub Flow, please DO NOT push the commits into master directly. Always create branch by the feature you want to update. You are encouraged to submit a pull request for reviewing before merging things into master.

We strongly recommend you configure your editor to match our coding styles. You can do this manually, or use an EditorConfig plugin if your editor supports it. An .editorconfig file has already been attached to the repository.


Translations are hosted on Transifex. When new commits are added into master branch, Travis CI will automatically push new translation strings to Transifex, so simply fix or edit the translation online.

Update translation

Translation updates into code base are done manually under src/. You need to configure the Transifex client first by adding the file ~/.transifexrc.

For maintainer update transifex

# maybe
# pip install -U transifex-client

python makemessages

tx push -s

Then update the translation in transifex.

Old translation files will stop tx pull updating if they have later modified time, which they generally have when they are pulled from the remote repo. So old translation files should be removed first:

rm locale/en_US/LC_MESSAGES/django.*
rm locale/zh_Hant/LC_MESSAGES/django.*
# ... more languages

Run tx pull to get newer translation and recompile the PO files:

tx pull -a
python compilemessages -x _src
You can’t perform that action at this time.