GithubHelp home page GithubHelp logo

cgl / djangogirls Goto Github PK

View Code? Open in Web Editor NEW

This project forked from djangogirls/djangogirls

0.0 2.0 0.0 63.06 MB

Website for DjangoGirls.org

Home Page: http://djangogirls.org/

Python 53.59% Shell 0.09% HTML 39.81% CSS 4.78% JavaScript 1.73%

djangogirls's Introduction

Django Girls website

This repository contains sources of Django application that powers DjangoGirls.org.

What's in it?

It's a simple CMS that contains 4 models:

  • Event - a list of events
  • EventPage - configuration of website
  • EventPageContent - blocks of content that are visible on the website
  • EventPageMenu - items of menu of every website

How to create new event?

Simply go to command line and run this command:

python ./manage.py new_event

And then follow the instructions.

How to manage your website?

EventPage

http://djangogirls.org/admin/core/eventpage/

Here you can change:

  • Meta tags - title and description of the website
  • Main color - main color on the website in HEX (default is FF9400)
  • Custom CSS - customize CSS on the website
  • URL - url that goes after the domain (http://djangogirls.org/__url__)
  • Is live? - live website is available on the homepage and can be accessed by anyone

EventPageContent

http://djangogirls.org/admin/core/eventpagecontent/

Each website comes with some default content that you can adjust to your needs. Each object is a "block" on the website that you can modify in following ways:

  • Name - it's also a permalink that you can link to like this: #name
  • Content - HTML is allowed
  • Background - there are two available types of blocks: without background and with background. By uploading image you're choosing the type with background.
  • Is public - check this if you want this block to be visible

EventPageMenu

http://djangogirls.org/admin/core/eventpagemenu/add/

To manage menu available on the website, you can add objects to EventPageMenu. Available options:

  • Title
  • URL

Contributing to Django Girls website

The website is hosted on PythonAnywhere and is available here: http://djangogirls.org/

We have an auto-deploy thing going on, so everything commited to master is automatically deployed to our Heroku.

Setting up a development environment

First, clone the repository:

git clone [email protected]:DjangoGirls/djangogirls.git

Step into newly created djangogirls directory:

cd djangogirls

Create a new virtual environment if needed. Then, install all the required dependencies:

pip install -r requirements.txt

Start the PostgreSQL database server and enter the psql shell (you need to have PostgreSQL installed):

psql

In the psql shell, create a database and a role with the nessesary permissions:

CREATE DATABASE djangogirls;
CREATE ROLE postgres;
GRANT ALL privileges ON DATABASE djangogirls TO postgres;
ALTER ROLE postgres WITH LOGIN;

Exit the psql shell:

\q

Run the migration to create database schema:

./manage.py migrate

Load sample data to the database

./manage.py loaddata sample_db.json

Create a user so you can login to the admin:

./manage.py createsuperuser

Install dependencies for static files:

npm install

Compile CSS and JS files:

gulp watch

Run your local server:

 ./manage.py runserver

๐ŸŽ‰ You're done.

Static files

We're using a Stylus as our CSS pre-processor. Get styling with Stylus.

This means you shouldn't change any css files, but .styl files. They're in /static/source/css/ directory.

Autocompiling of .styl files to .css:

gulp watch

We're also using gulp for our static files builds. To build static files for production, run this:

gulp build

For local development:

gulp local

Hosting on PythonAnywhere

Key bits of config and secrets are stored in environment variables in two places:

  • in the WSGI file (linked from the Web Tab)
  • in the virtualenv postactivate at ~/.virtualenvs/djangogirls.com/bin/postactivate

djangogirls's People

Contributors

alexanderad avatar algosuna avatar andrayantelo avatar aniav avatar asendecka avatar bmispelon avatar calculation avatar cgl avatar hawkowl avatar helenst avatar jinpark avatar jmkaluzka avatar kerstin avatar ksiedlarek avatar lightstrike avatar marysialowas avatar mmoravcik avatar mounirmesselmeni avatar olasitarska avatar patjouk avatar peconia avatar phalt avatar rachellcalhoun avatar rebkwok avatar sodevious avatar sophiadavis avatar syndbg avatar ulgens avatar uranusjr avatar williln avatar

Watchers

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