Giter Site home page Giter Site logo

clemesha / twisted-wsgi-django Goto Github PK

View Code? Open in Web Editor NEW
61.0 6.0 11.0 178 KB

How to run Django on the latest Twisted web WSGI functionality

Home Page: http://clemesha.org/blog/2009/apr/23/Django-on-Twisted-using-latest-twisted-web-wsgi/

Python 7.55% CSS 26.61% JavaScript 65.83%

twisted-wsgi-django's Introduction

Django on Twisted using Twisted's (new) WSGI code

This directory contains an example of how to combine Twisted and Django using the latest WSGI functionality in twisted.web.

A more complete discussion of this code can be found here:

http://clemesha.org/blog/2009/apr/23/Django-on-Twisted-using-latest-twisted-web-wsgi/

Install

  1. Recommended: Use a virtualenv and install with pip, to get them type:

    easy_install virtualenv pip
    
  2. Create a fresh virtualenv:

    virtualenv --no-site-packages twisted_wsgi_django_env
    
  3. Install dependencies into your virtualenv:

    #You must have Django 1.0+ and Twisted 9.0.0+
    
    pip -E twisted_wsgi_django_env install twisted django
    
  4. Get a copy of the example:

    curl http://github.com/clemesha/twisted-wsgi-django/tarball/master
    
    #Or clone a copy:
    
    $ git clone git://github.com/clemesha/twisted-wsgi-django.git
    

Run example

  1. Move into your virtualenv and activate it:

    $ cd twisted_wsgi_django_env
    $ source bin/activate
    
  2. Move into the example and do a syncdb:

    $ cd mydjangosite
    $ python manage.py syncdb #be sure to create an admin user
    
  3. Move up one directory and run the example:

    $ cd .. #assume you are in 'mydjangosite'
    $ twistd -ny server.py #open localhost:8000 in browser
    
  4. If you decide to build an application with this server and deploy it, you can start the server as a daemon with:

    $ twistd -y server.py #remember to change the port in server.py to choose an open port in your server.
    

License/Contact

All code licensed under the BSD. Contact: Alex Clemesha <[email protected]> | http://twitter.com/clemesha

twisted-wsgi-django's People

Contributors

clemesha avatar fergalmoran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

twisted-wsgi-django's Issues

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.