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.
* Added ASCII media processing
* Added ASCII media display
* Added ASCII media type
Rebased from Joar Wandborg's ascii art branch (squashed to remove the
commits borrowing code of dubious license)
Fixed a bug in file submission error handling:
- Moved file-extension condition out of loop (what did it do there?)
- Updated file submission tests
- Changed error handling in file submission, should now report more
than absolutely necessary.
* Removed <p> margin-top
* Vertically align logo so Add-media button does not fall off
* Remove last 960.gs traces (grid_X/container_X) and add custom classes/sizes to css
* Add clear class
* Update form_box and add form_box_xl for bigger forms
* Switch all pages that use forms to new classes
* Remove padding from notification messages so they take full width
* Other tiny fixes I forgot about
This is a shortcut to adding the object to a session (if
needed) and giving a commit on the session.
In reality, calling code should probably utilize the
session on its own and call commit in an appropiate place.
MediaEntry now has a get_uploader (property) loading the
appropiate User object for the MediaEntry (and caches it).
MediaComment has the same for author as get_author.
While creating the new SQL model, the "state" field of
MediaEntry was left out. Currently using a plain unicode
string for it.
Maybe should use sqlalchemy.types.Enum?
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.
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.
This is relevant for fcgi:
Some servers (cherokee for example) put "HTTP":"off" in the
environ. And the following code in urlgen breaks on this:
if environ.get('HTTPS') or environ.get('wsgi.url_scheme') == 'https' \
or environ.get('HTTP_X_FORWARDED_PROTO') == 'https':
hostinfo['protocol'] = 'https'
workaround is to remove HTTPS:off from the environ.
* remotes/joar/webfinger:
Added references to docstring in mediagoblin.webfinger
Removed mediagoblin.tools.feed which was accidentally included
Polishing the webfinger implementation
webfinger fully compliant with webfinger.org! Still *preliminary* solution.
Changed some thngs to be compatible with webfinger.org, still *very preliminary*
Added *very preliminary* support for webfinger
- Changed quotes in the templates from " to '
- Changed all link generation to use request.urlgen
- Moved xrd links data generation from template to view
- Added parsing of the account URI using urlparse
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.
In trying to ease the migration to SQL, created an
interface to sqlalchemy that looks a lot like the interface
that is currently in use.
*WARNING* Work in progress