A custom query class allows to add more methods on
queries (read: "cursors").
This custom query class especially adds a .sort with a
calling convention exactly like the mongo one.
Makes a lot of existing code happy!
sql/fake.py contains some fake classes and functions to
calm the rest of the code base. Or provide super minimal
implementations.
Currently:
- ObjectId "class": It's a function mostly doing
int(first_arg) to convert string primary keys into
integer primary keys.
- InvalidId exception
- DESCENING "constant"
* remotes/macno/pushatom:
As per spec, we permit to have more then 1 hub
As suggested by Elrond, we use only one setting
Default is now PuSH disabled
Added PuSH capability
The session can contain invalid objectids when switching a
more or less live instance (with logged in users) from
mongo to sql or vice versa.
So drop the complete session and force the user to login
again.
If one isn't logged in and views the profile of a user
without media, one gets a problem, because request.user is
None and has no _id attribute.
Fix this.
- This adds a new SQL table field type for path tuples.
They're stored as '/' separated unicode strings.
- Uses it to implement a MediaFile table.
- Add relationship and proxy fields on MediaEntry to give a
nice media_files "view" there.
- Let the converter fill the MediaFile.
attachments are an optional part. But it doesn't hurt to
enable them in the test suite at all.
Also (with enabled attachmemtns) the main media view fails,
if one isn't logged in (joar found it!). So add a simple
(currently failing) test for this.
1. reset.css was moved to /css/extlib/ some time ago.
So update the staticdirect link to it.
2. We don't have video-js.css (any more?). Drop link to it.
Use pkg_resource to check for the existence of any files
referenced by staticdirect. If they don't exist, warn about
this.
This might raise false warnings in the future for more
advanced setups.
paste uses paste.ini to configure python's logging module.
Until now, there was NO config, not even a useful default
one. This means: any messages went away unseen.
Not good.
The new default logs everything to stderr at level INFO and
higher. Maybe not the best, but a good starting point.
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 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.