| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|\ |
|
| |
| |
| |
| | |
translation tags to license template.
|
| |
| |
| |
| | |
stuff from models
|
| | |
|
|/ |
|
|
|
|
|
| |
Move changes from mongo/models:url_for_self back into
mixin:url_for_self.
|
|\
| |
| |
| |
| | |
Conflicts:
mediagoblin/db/mongo/models.py
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A bunch of functions on the db objects are really more like
"utility functions": They could live outside the classes
and be called "by hand" passing the appropiate reference.
They usually only use the public API of the object and
rarely use database related stuff.
Goals:
- First, simple: Share the code with the SQL objects, so
that the code doesn't need to be duplicated.
- Second, it might unclutter the db models and make them
more into "model only" stuff.
- Doesn't really hurt.
|
|/
|
|
| |
the html version of each entry)
|
|
|
|
|
|
| |
Inside the mongo db backend, use the mongo
MigrationManager. This is hopefully the last reference to
the generic MigrationManager reference on db.util.
|
|
|
|
|
|
|
|
|
|
| |
When initializing the database connection the current mongo
based setup checked for new migrations and warned about
them. This was mongo specific so factor'd it out into a
more generic check_db_migrations_current function in the
mongo backend.
Also created a dummy one in the sql backend.
|
|
|
|
|
|
|
| |
sqlalchemy gives autoloading (hopefully caching) link to
other objects as properties. So turn get_uploader on the
current mongo based stuff into a property to ease
transition.
|
|
|
|
|
|
|
|
|
| |
Replace
urlgen('ID', user=media.get_uploader().username, media=media.*)
by
media.url_for_self(urlgen)
in a few places.
It's just a lot nicer!
|
|
|
|
|
|
|
|
| |
Instead of creating the email verication key on the db
model as a default for the field, create it in the
registration view.
Now all verification key generation is only in
auth/views.py!
|
|
|
|
|
|
|
|
|
| |
1) MediaComment's author method conflicts with the author
field. So rename it to get_author.
2) Turn it from a normal function into a python property.
That means you call it by ".get_author" not by
".get_author()". This is exactly what sqlalchemy gives
us free of charge.
|
|
|
|
|
| |
To my surprise, there was only ONE reference to models.py.
From open.py.
|
|
|
|
| |
And change references.
|
|
|
|
|
| |
- Change some reference
- Provide a wrapper db/util.py
|
|
|
|
| |
And change references (one!).
|
|
Starting to move the mongo specific stuff into db/mongo.
And create thin "from db.mongo.Y import z" wrappers in
db/Y.py.
Why?
1) Will make it lots easier to switch to sql for
testing/developing.
2) The mongo stuff needs to stay around after moving to
sql, because the converter needs it.
|