Merge lp://qastaging/~gesha/linaro-license-protection/add-multiple-sites-support into lp://qastaging/~linaro-automation/linaro-license-protection/trunk

Proposed by Georgy Redkozubov
Status: Merged
Approved by: James Tunnicliffe
Approved revision: 97
Merged at revision: 96
Proposed branch: lp://qastaging/~gesha/linaro-license-protection/add-multiple-sites-support
Merge into: lp://qastaging/~linaro-automation/linaro-license-protection/trunk
Diff against target: 288 lines (+228/-0)
9 files modified
README (+16/-0)
license_protected_downloads/wsgi_releases.py (+42/-0)
license_protected_downloads/wsgi_snapshots.py (+42/-0)
middleware.py (+19/-0)
releases_urls.py (+36/-0)
settings.py (+6/-0)
settings_releases.py (+16/-0)
settings_snapshots.py (+15/-0)
snapshots_urls.py (+36/-0)
To merge this branch: bzr merge lp://qastaging/~gesha/linaro-license-protection/add-multiple-sites-support
Reviewer Review Type Date Requested Status
James Tunnicliffe (community) Approve
Review via email: mp+118339@code.qastaging.launchpad.net

This proposal supersedes a proposal from 2012-08-01.

Description of the change

This branch adds support of multi-sites per single Django application. It is now configured to serve releases.linaro.org and snapshots.linaro.org. Both sites use the same database for licenses. License acceptance is site-dependent: for example if you have accepted the license on snapshots you will need to accept the same license on releases if asked.
SITE_ID is not used since we separate DBs for each sites.

To post a comment you must log in.
Revision history for this message
James Tunnicliffe (dooferlad) wrote : Posted in a previous version of this proposal

Looks fine.

Since we have multiple settings and wsgi files it would be possible to use a separate database for each site and remove the site_id requirement. The databases build themselves up as they go, so unless the OpenID code stores data in them, we can just delete the existing database at a later date and start fresh.

Currently the set up uses sqlite3, which is fine for development but not for deployment, but I assume you and the sys-admins know that and will use a more traditional database when live!

review: Approve
Revision history for this message
James Tunnicliffe (dooferlad) wrote :

Cool. If you change the databases so the sqlite3 stores are different files (licenses-release.db and licenses-snapshopt.db sort of thing) then this is good to land. Approving on condition of that change.

review: Approve
98. By Georgy Redkozubov

Added deployment steps to README.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches