Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

karina-klinkeviciute/pyconlt

Repository files navigation

pyconlt

A repository for a website for PyCon Lithuania.

Deployable on PythonAnywhere.

An app for organizing a conference.

Existing tools:

  • Listing speakers.
  • CFP submission and management.
  • Approving submitted applications. Approved talks are automatically shown on Talks page and approved speakers on Speakers page.
  • Program management with slots and option to add talks to slots.

Planned features:

  • Having multiple events in one page, e.g. for different years of conference.

Setting development environment

If you prefer Docker follow instructions in docker-compose.rst. Docker workflow might save you some time if you are used to Docker.

Alternative workflow:

  • Install pipenv (e.g. pip3 install --user pipenv) if you don't have it yet.

  • Install all requires packages pipenv install.

  • Run pipenv shell pipenv shell. I recommend to start using direnv (see https://github.com/direnv/direnv) if you are not doing it yet. This will run pipenv shell command automatically for you.

  • Install posgresql DB and create pysql database.

  • Create /pyconlt/settings/local.py with following content:

import os

from .base import *


DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'pyconlt',
    }
}
  • Run python manage.py migrate

  • Import data using on of the two methods:

    • python manage.py loaddata data.json

    • psql < pyconlt.dump

    Ask for data.json or pyconlt.dump from team members.

  • Run python manage.py runserver

Now you can develop.

Deployment

Configure your environment properly in file in pyconlt/settings folder and specify DJANGO_SETTINGS_MODULE in .env file. E.g.:

DJANGO_SETTINGS_MODULE=pyconlt.settings.pythonanywhere

Follow deployment instructions for your platform. For pythonanywhere we have deploy.sh script in the system.

DB Dump

In order to produce DB dump connect to pythonanywhere via SSH or using Console in web. Then run ./dump.sh on server, that will produce dump in format pyconYYYY-MM-DD.dump format. Download dump via SSH using scp or use PythonAnywhere web.

To import dump create empty pyconlt database using psql, e.g.

DROP DATABASE pyconlt;

CREATE DATABASE pyconlt;

Then use psql to import dump:

psql -d pyconlt < pyconYYYY-MM-DD.dump