Giter Site home page Giter Site logo

magwit / cz.pycon.org-2019 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pyvec/cz.pycon.org-2019

0.0 1.0 0.0 49.37 MB

PyCon CZ 2019 website

Home Page: https://cz.pycon.org/2019/

License: MIT License

HTML 82.88% JavaScript 0.24% CSS 4.36% Python 4.84% Shell 0.05% Smarty 0.08% TSQL 0.02% SQLPL 7.54%

cz.pycon.org-2019's Introduction

PyConCZ 2019

PyCon CZ taking place in Ostrava for its fifth edition.

Contributing

Workflow

  • master branch is manually deployed to https://cz.pycon.org/
    • commit directly to master only if it’s a hotfix
  • 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)
  • 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

Setup dev environment

PyCon CZ website is using Python 3.5/Django for the backend, NodeJS for bundling frontend assets and Postgresql as a database.

Django

Run following commands to setup project for local development:

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

  2. python3 -m venv env note: Use exactly Python 3.5.2 on Windows (otherwise Pillow won't install with pip) so you might want to py -3.5 -m venv env

  3. pip install -r requirements-dev.txt

  4. copy pyconcz/settings/local_template_dev.py to pyconcz/settings/local.py and don't forget to set DATABASES and SECRET_KEY settings.

  5. ./manage.py migrate

Static files

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

Development

Django

You can run your dev server manually on http://localhost:8000 with:

./manage.py runserver --settings=pyconcz.settings.local

Static files

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.

Building

After each production build, you have to commit newly generated CSS and image files. Old files are automatically replaced.

  1. npm run build
  2. git add pyconcz/static

Deployment

Just use fab production deploy to deploy to production or fab beta deploy to deploy to beta site.

License

This work is licensed under a MIT

cz.pycon.org-2019's People

Contributors

benabraham avatar starenka avatar frenzymadness avatar encukou avatar honzajavorek avatar hroncok avatar baradrb avatar messa avatar mcurlej avatar tuttovka avatar darkless012 avatar ivafingerova avatar doupalovakris avatar magwit avatar mikicz avatar webknjaz avatar torsava avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.