**Other changed**
+* Plugin writers: Internal restructuring led to mediagoblin.db.sql* be
+ mediagoblin.db.* starting from 0.3.3
+
* Dependency list has been reduced not requireing the "webob" package anymore.
0.3.2
from werkzeug.exceptions import Forbidden
-from mediagoblin.db.sql.models import MediaEntry
+from mediagoblin.db.models import MediaEntry
from mediagoblin.decorators import require_active_login
from mediagoblin.tools.response import render_to_response
import datetime
from mediagoblin import messages, mg_globals
-from mediagoblin.db.sql.models import User
+from mediagoblin.db.models import User
from mediagoblin.tools.response import render_to_response, redirect, render_404
from mediagoblin.tools.translate import pass_to_ugettext as _
from mediagoblin.auth import lib as auth_lib
from migrate.changeset.constraint import UniqueConstraint
from mediagoblin.db.util import RegisterMigration
-from mediagoblin.db.sql.models import MediaEntry, Collection, User
+from mediagoblin.db.models import MediaEntry, Collection, User
MIGRATIONS = {}
def load_models(app_config):
- import mediagoblin.db.sql.models
+ import mediagoblin.db.models
for media_type in app_config['media_types']:
_log.debug("Loading %s.models", media_type)
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
from mediagoblin.db.sql.base import Session
-from mediagoblin.db.sql.models import MediaEntry, Tag, MediaTag, Collection
+from mediagoblin.db.models import MediaEntry, Tag, MediaTag, Collection
from mediagoblin.tools.common import simple_printer
self.printer = printer
# For convenience
- from mediagoblin.db.sql.models import MigrationData
+ from mediagoblin.db.models import MigrationData
self.migration_model = MigrationData
self.migration_table = MigrationData.__table__
"""
Make sure the migrations table is set up in the database.
"""
- from mediagoblin.db.sql.models import MigrationData
+ from mediagoblin.db.models import MigrationData
if not MigrationData.__table__.exists(db.bind):
MigrationData.metadata.create_all(
from werkzeug.exceptions import Forbidden
from werkzeug.urls import url_quote
-from mediagoblin.db.sql.models import MediaEntry, User
+from mediagoblin.db.models import MediaEntry, User
from mediagoblin.tools.response import redirect, render_404
managed_dbdata = []
# Add main first
- from mediagoblin.db.sql.models import MODELS as MAIN_MODELS
+ from mediagoblin.db.models import MODELS as MAIN_MODELS
from mediagoblin.db.migrations import MIGRATIONS as MAIN_MIGRATIONS
managed_dbdata.append(
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from mediagoblin.db.sql.models import MediaEntry
+from mediagoblin.db.models import MediaEntry
from mediagoblin.db.util import media_entries_for_tag_slug
from mediagoblin.tools.pagination import Pagination
from mediagoblin.tools.response import render_to_response
from sqlalchemy.ext.declarative import declarative_base
from mediagoblin.db.util import RegisterMigration
-from mediagoblin.db.sql.models import User
+from mediagoblin.db.models import User
MIGRATIONS = {}
from datetime import datetime, timedelta
from mediagoblin.db.sql.base import Base
-from mediagoblin.db.sql.models import User
+from mediagoblin.db.models import User
from sqlalchemy import (
Column, Unicode, Integer, DateTime, ForeignKey, Enum)
from celery.task import Task
from mediagoblin import mg_globals as mgg
-from mediagoblin.db.sql.models import MediaEntry
+from mediagoblin.db.models import MediaEntry
from mediagoblin.processing import mark_entry_failed, BaseProcessingFail
from mediagoblin.tools.processing import json_processing_callback
from mediagoblin import mg_globals
from mediagoblin.auth import lib as auth_lib
-from mediagoblin.db.sql.models import User
+from mediagoblin.db.models import User
from mediagoblin.tests.tools import setup_fresh_app, fixture_add_user
from mediagoblin.tools import template, mail
from mediagoblin import mg_globals
from mediagoblin.tests.tools import get_test_app
-from mediagoblin.db.sql.models import User
+from mediagoblin.db.models import User
def test_get_test_app_wipes_db():
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import logging
-from mediagoblin.db.sql.models import User
+from mediagoblin.db.models import User
_log = logging.getLogger(__name__)
import datetime
from mediagoblin import messages, mg_globals
-from mediagoblin.db.sql.models import (MediaEntry, Collection, CollectionItem,
+from mediagoblin.db.models import (MediaEntry, Collection, CollectionItem,
User)
from mediagoblin.tools.response import render_to_response, render_404, redirect
from mediagoblin.tools.translate import pass_to_ugettext as _
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from mediagoblin import mg_globals
-from mediagoblin.db.sql.models import MediaEntry
+from mediagoblin.db.models import MediaEntry
from mediagoblin.tools.pagination import Pagination
from mediagoblin.tools.response import render_to_response
from mediagoblin.decorators import uses_pagination