The show password js depends on the password field to have
an id of "password". So give it a proper id.
Also fixed the label generation for the case of field.name
and field.id being different.
References to undefined variables in templates were
silently ignored/converted to None/empty strings. This
makes coding lazy stuff easy, but it makes catching typos
harder.
(It would have catched one of the SQL things earlier!)
But on the other hand it might make the current templates
error out everywhere. In fact, early testing has shown two
instances, that errored out. Those are fixed with this
commit too.
If this turns out to make things more complex and useless
than actually solving any problems, it can easily be
dropped again.
Inside the mongo db backend, use the mongo
MigrationManager. This is hopefully the last reference to
the generic MigrationManager reference on db.util.
1. Use the new setup_connection_and_db_from_config in the
sql backend.
2. Use sql and mongo specific functions wherever
appropiate instead of the generic "db.X" one. This makes
the converter more indepedent of the current backend
choice.
After changing the password, the login page is now shown.
It contains a message. (we can't test for that easily
currently. There is a bug open on this problem.)
At least for the login page being shown now.
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.