Giter Club home page Giter Club logo

djangoproject.com's Introduction

djangoproject.com source code

To run locally, do the usual:

  1. Create a virtualenv
  2. Install dependencies:

    pip install -r requirements/dev.txt

    Alternatively use the make task:

    make install
  3. Create a 'secrets.json' file in the directory above the checkout, containing something like:

    { "secret_key": "xyz",
      "superfeedr_creds": ["[email protected]", "some_string"] }
  4. Create databases:

    createuser -d djangoproject
    createdb -O djangoproject djangoproject
    createuser code.djangoproject
    createdb -O code.djangoproject code.djangoproject
  5. Create tables:

    psql -d code.djangoproject < tracdb/trac.sql
    
    ./manage.py migrate
  6. Create a superuser:

    ./manage.py createsuperuser
  7. Populate the www and docs hostnames in the django.contrib.sites app:

    ./manage.py loaddata dev_sites
  8. For docs:

    ./manage.py loaddata doc_releases
    ./manage.py update_docs
  9. Point the www.djangoproject.dev and docs.djangoproject.dev hostnames with your /etc/hosts file to localhost/127.0.0.1. Here's how it could look like:

    127.0.0.1  docs.djangoproject.dev, www.djangoproject.dev

    If you're on Mac OS and don't feel like editing the /etc/hosts file manually, there is a great preference pane called Hosts.prefpane. On Ubuntu there is a built-in network admin GUI to do the same. Remember both require admin priviledges, just like you'd need when editing /etc/hosts with your favorite editor.

  10. Finally run the server:

    make run

    This runs both the main site ("www") as well as the docs site in the same process. Open http://www.djangoproject.dev:8000/ or http://docs.djangoproject.dev:8000/.

Styles

In case you want to work on the stylesheets please install Compass with Rubygems:

gem install compass

You may have to prefix that command with sudo depending on your platform.

Then run the following to compile the Compass SASS files to CSS:

make compile-scss-debug

Alternatively you can also run the following command in a separate shell to continously watch for changes to the SASS files and automatically compile to CSS:

make watch-scss

Running all at once

Optionally you can use a tool like Foreman to run all process at once:

This is great during development. Assuming you're using Foreman simply run:

foreman start

If you just want to run one of the processes defined above use the run subcommand like so:

foreman run web

That'll just run the www server.

Check out the Procfile file for all the process names.

JavaScript libraries

This project uses Bower for managing JS library depedencies. See its documentation for how to use it. Here's the gist:

To update any of the dependencies, edit the bower.json file accordingly and then run bower install to download the appropriate files to the static directory. Commit the downloaded files to git (vendoring).

djangoproject.com's People

Contributors

aaugustin avatar adrianholovaty avatar alex avatar andrevvm avatar andrewmccarthy avatar apollo13 avatar asendecka avatar bmispelon avatar brutasse avatar carljm avatar claudep avatar coderanger avatar collinanderson avatar evildmp avatar freakboy3742 avatar idan avatar jacinda avatar jacobian avatar jezdez avatar jphalip avatar justinabrahms avatar oinopion avatar olasitarska avatar paparent avatar ptone avatar rmecham avatar spookylukey avatar timgraham avatar treyhunner avatar ubernostrum 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.