Skip to content

zhaque/django-saas-kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django SAAS kit
===============

Django SAAS kit is an example Django project integrating
django-subscription and django-muaccount applications to achieve
multi-user accounts with custom domain, that are characteristic for
Software As A Service-type (SAAS) services.

Table of Contents
=================
1 Getting started
2 Default data set
3 Runtime environment
    3.1 Warnings at startup
4 License


1 Getting started
~~~~~~~~~~~~~~~~~
  To start the project, after cloning Git repository, run:

  1. make -C upstream/ init
  2. cd project
  3. python manage.py syncdb --noinput
  4. python manage.py loaddata exampledata.json
  5. python manage.py runserver

  Project includes as Git sumodules or downloads from
  upstream/Makefile all needed Django applications; only requirements
  are Python (2.5 or higher, but may work on earlier versions of
  Python) and stable release of Django (1.0.2 at this moment).

  To download dependencies (step 1), following programs are needed:
  - make,
  - git,
  - mercurial,
  - subversion,
  - wget,
  - tar accepting "-j" option (any recent GNU tar).

2 Default data set
~~~~~~~~~~~~~~~~~~
  By loading exampledata.json, data is populated with:
  - Silver Membership monthly recurring plan, linked to Silver Member group,
    having ability to change muaccount's public status;
  - Gold Membership monthly recurring plan, linked to Gold Member group,
    having ability to set custom domain and change muaccount's public status
  - administrative interface user, login admin, password admin
  - free_user user, password "free", with no paid plan selected
  - silver_user user, password "silver", with silver plan selected
  - gold_user user, password "gold", with gold plan selected
  - muaccount of free_user with subdomain "free"
  - muaccount of silver_user with subdomain "silver"
  - muaccount of gold_user with custom domain "www.gold-account.com"
  - test1 user, password "test", with no plan selected, member of "free"
    and "silver" muaccount
  - test2 user, password "test", with no plan selected, member of
    "silver" and "gold" account
  - test3 user, password "test", with no plan selected, member of
    "gold" account

3 Runtime environment
~~~~~~~~~~~~~~~~~~~~~
  Project is expected to run on localhost, port 8000 (or any other
  port set in MUACCOUNTS_PORT).  For all sites to work correctly,
  following hosts must resolve to 127.0.0.1 (e.g. by adding entry in
  /etc/hosts): example.com www.example.com free.example.com
  silver.example.com gold.example.com www.gold-account.com. To deploy
  on standard port (80 for HTTP), comment out MUACCOUNTS_PORT setting.

  To succesfully use PayPal sandbox, you'll need to:
  - sign up for PayPal sandbox at [http://developer.paypal.com/]
  - configure PAYPAL_RECEIVER_EMAIL and possibly SUBSCRIPTION_PAYPAL_SETTINGS
    in project/settings.py
  - make sure your page is visible from outside world (necessary for IPN callbacks)
  - set your page's IP or root domain (MUACCOUNTS_ROOT_DOMAIN) and port, in form
    12.34.56.78:8000 (when deploying on standard port, set just IP or root domain),
    as `example.com' Site's domain name in admin panel, so that django-subscription
    can give correct IPN URL to PayPal.
  To run with live PayPal, you'll need to change {{form.sandbox}} to {{form.render}}
  in templates/subscription/subscription_detail.html and set PAYPAL_TEST to False in
  project/settings.py.

3.1 Warnings at startup
=======================
   When some of dependencies are installed system-wide (especially if
   installed with easy_install), Django may issue warnings similar to
   one pasted below:

       Installing index for admin.LogEntry model
       Installing index for subscription.Transaction model
       /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/simplejson-2.0.9-py2.5-macosx-10.5-i386.egg/simplejson/_speedups.py:3:
       UserWarning: Module registration was already imported from /Users/admin/Projects/django-saas-kit/site-python/registration/__init__.py, but /opt/local/lib/python2.5/site-packages/django_registration-0.7-py2.5.egg is being added to sys.path
        import sys, pkg_resources, imp
   
   Such warnings are not important, since they only indicate that
   system-wide installation of django-registration is not used, and
   project-local checkout is used instead.

4 License
~~~~~~~~~
  Licensed under the GPL (GPL-LICENSE.txt). 

About

Sample django app for subscription based web service

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •