diff options
author | Joar Wandborg <git@wandborg.com> | 2012-09-21 13:02:35 +0200 |
---|---|---|
committer | Joar Wandborg <git@wandborg.com> | 2012-09-21 13:09:42 +0200 |
commit | 88a9662be4f97da5b04a3842c8d0caa2652be355 (patch) | |
tree | 1924afd6d94f4aa6932bb88feed150e9eae9fbe3 /mediagoblin/db/sql/migrations.py | |
parent | d4c066abf017bc7af8fa30a25248dbae9e40355d (diff) | |
download | mediagoblin-88a9662be4f97da5b04a3842c8d0caa2652be355.tar.lz mediagoblin-88a9662be4f97da5b04a3842c8d0caa2652be355.tar.xz mediagoblin-88a9662be4f97da5b04a3842c8d0caa2652be355.zip |
Added client registration caps to OAuth plugin
THE MIGRATIONS SUPPLIED WITH THIS COMMIT WILL DROP AND RE-CREATE YOUR
oauth__tokens AND oauth__codes TABLES. ALL YOUR OAUTH CODES AND TOKENS
WILL BE LOST.
- Fixed pylint issues in db/sql/migrations.
- Added __repr__ to the User model.
- Added _disable_cors option to json_response.
- Added crude error handling to the api.tools.api_auth decorator
- Updated the OAuth README.
- Added client registration, client overview, connection overview,
client authorization views and templates.
- Added error handling to the OAuthAuth Auth object.
- Added AuthorizationForm, ClientRegistrationForm in oauth/forms.
- Added migrations for OAuth, added client registration migration.
- Added OAuthClient, OAuthUserClient models.
- Added oauth/tools with require_client_auth decorator method.
Diffstat (limited to 'mediagoblin/db/sql/migrations.py')
-rw-r--r-- | mediagoblin/db/sql/migrations.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/mediagoblin/db/sql/migrations.py b/mediagoblin/db/sql/migrations.py index fb178285..e86109e9 100644 --- a/mediagoblin/db/sql/migrations.py +++ b/mediagoblin/db/sql/migrations.py @@ -16,15 +16,12 @@ import datetime -from sqlalchemy import (MetaData, Table, Column, Boolean, SmallInteger, +from sqlalchemy import (MetaData, Table, Column, Boolean, SmallInteger, Integer, Unicode, UnicodeText, DateTime, ForeignKey) - - from mediagoblin.db.sql.util import RegisterMigration from mediagoblin.db.sql.models import MediaEntry, Collection, User - MIGRATIONS = {} @@ -66,6 +63,7 @@ def add_transcoding_progress(db_conn): col.create(media_entry) db_conn.commit() + @RegisterMigration(4, MIGRATIONS) def add_collection_tables(db_conn): metadata = MetaData(bind=db_conn.bind) @@ -92,6 +90,7 @@ def add_collection_tables(db_conn): db_conn.commit() + @RegisterMigration(5, MIGRATIONS) def add_mediaentry_collected(db_conn): metadata = MetaData(bind=db_conn.bind) @@ -102,4 +101,3 @@ def add_mediaentry_collected(db_conn): col = Column('collected', Integer, default=0) col.create(media_entry) db_conn.commit() - |