Giter Site home page Giter Site logo

larryhastings / pyweekorg Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pyweekorg/pyweekorg

0.0 1.0 0.0 9.2 MB

Django web application for pyweek.org

Home Page: https://pyweek.org/

Shell 0.10% JavaScript 17.79% Python 73.09% CSS 1.85% HTML 6.31% SCSS 0.86%

pyweekorg's Introduction

Pyweek.org website

This website runs the pyweek.org challenge.

Developing

Database

The production site runs against a PostgreSQL database. You can run one of these using Docker for development purposes:

docker run --name pyweek-postgresql postgres:latest

You will need to put the IP address of this service into your settings; you can obtain this with:

docker inspect pyweek-postgresql

You will need to create an account and database on the new host. To do this you will need the PostgreSQL psql command to be installed. Create a database like this:

$ psql -h 172.17.0.2 postgres postgres
psql (9.5.12, server 10.3 (Debian 10.3-1.pgdg90+1))
WARNING: psql major version 9.5, server major version 10.
         Some psql features might not work.
Type "help" for help.

postgres=# create database pyweek;
CREATE DATABASE
postgres=# \d
No relations found.
postgres=# CREATE USER pyweek WITH PASSWORD 'hunter2';
CREATE ROLE
postgres=# DROP DATABASE pyweek;
DROP DATABASE
postgres=# create database pyweek with owner pyweek;
CREATE DATABASE
postgres=# \q

Environment

How to set up a PyWeek-like site:

  1. Create a virtualenv
  2. Install requirements.txt and requirements-dev.txt
  3. Create a local settings file based on the template given in dev_settings_example.py.

Running a dev server

To run the dev server, use:

django-admin.py runserver --settings=dev_settings --pythonpath=.

This assumes you have first created a dev_settings.py file. An example is given in dev_settings_example.py.

When starting with a blank database, you can set it up initially using the following command:

django-admin.py migrate --settings=dev_settings --pythonpath=.

You will then also want to create an admin account to enable access to the administration panel, which can be done using this command:

django-admin.py createsuperuser --settings=dev_settings --pythonpath=.

pyweekorg's People

Contributors

lordmauve avatar rdb avatar dependabot[bot] avatar reidrac avatar lextoumbourou avatar r1chardj0n3s avatar elena avatar malcolmt avatar tomfryers avatar

Watchers

 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.