1615 Commits

Author SHA1 Message Date
Elrond
fbad3a9fb9 Add copyright header and a bit of pep8ification
Nearly all the sql files missed a copyright header.
So added it!
And while there fixed a few pep8 things.
2012-01-20 00:17:05 +01:00
Elrond
92edc74e9b Use custom query class
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!
2012-01-20 00:00:57 +01:00
Elrond
6fc8af3278 sql/fake.py: Some fake objects/methods to calm the code
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"
2012-01-18 23:35:55 +01:00
Michele Azzolari
c03d13cd79 Cleaned the code 2012-01-17 23:15:47 +01:00
Michele Azzolari
77b91efcc2 We handle exceptions if PuSH fails 2012-01-17 22:42:36 +01:00
Elrond
6d13314e99 Merge remote branch 'remotes/macno/pushatom'
* 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
2012-01-17 18:30:15 +01:00
Jef van Schendel
8c7701f9f1 Small fix to simplify font style 2012-01-15 17:23:21 +01:00
Jef van Schendel
62f2557cae Another small text style fix 2012-01-15 17:10:35 +01:00
Jef van Schendel
b699791956 Small margin/font-weight fix 2012-01-15 17:07:15 +01:00
Elrond
52fc51f6a9 Drop sessions with invalid ObjectIds
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.
2012-01-14 13:36:00 +01:00
Elrond
9c94700413 Move maketarball.sh into devtools/
Now that there is a devtools directory, use it!
2012-01-14 12:54:16 +01:00
Christopher Allan Webber
1b5bbc0a85 make this script executable 2012-01-13 20:27:53 -06:00
Christopher Allan Webber
4670ff1c56 Simple translation update script 2012-01-13 20:26:36 -06:00
Elrond
762d4a0c48 Fix request.user==None error
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.
2012-01-13 23:42:33 +01:00
Jef van Schendel
fafec72740 Remove unnecessary piece of text in media.html. Fix "Markdown text" indentation so they are the same. 2012-01-13 23:23:02 +01:00
Jef van Schendel
20659de234 Add CC0 license header to Sphinx MediaGoblin theme (mg.css) 2012-01-13 17:38:20 +01:00
Michele Azzolari
bb025ebda1 As per spec, we permit to have more then 1 hub 2012-01-12 11:05:05 +01:00
Michele Azzolari
7f251b037b As suggested by Elrond, we use only one setting 2012-01-12 00:00:28 +01:00
Michele Azzolari
f502a89b6d Default is now PuSH disabled 2012-01-11 16:11:23 +01:00
Michele Azzolari
5b1a7bae3c Added PuSH capability 2012-01-11 15:48:37 +01:00
Elrond
02db7e0a83 Add MediaFile table and related infrastructure.
- 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.
2012-01-11 12:19:03 +01:00
Elrond
0ab21f981a Dot-Notation: Some random places 2012-01-11 11:42:26 +01:00
Elrond
cb7ae1e433 Fix url_for_self mixup
Move changes from mongo/models:url_for_self back into
mixin:url_for_self.
2012-01-11 11:16:35 +01:00
Christopher Allan Webber
73079ac4b8 Merge branch 'master' of gitorious.org:mediagoblin/mediagoblin
Conflicts:
	mediagoblin/db/mongo/models.py
2012-01-10 08:12:30 -06:00
Michele Azzolari
1df68a3524 Fixed #724 and added extra infos to the atom feed (author uri and links to the html version of each entry) 2012-01-10 08:10:53 -06:00
Joar Wandborg
914b8bcde3 Added check for request.user to media.html attachment-related conditional 2012-01-10 13:12:14 +01:00
Elrond
c2d6792ddb Test Suite: Enable attachments, add failing test
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.
2012-01-10 12:52:01 +01:00
Elrond
1dc7f28d24 Fix reset.css reference and drop link to video-js.css
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.
2012-01-09 14:39:54 +01:00
Elrond
1b876ac2ea Warn about unknown staticdirect paths.
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.
2012-01-09 14:39:54 +01:00
Elrond
7cbbf3e75b Create a default logging config
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.
2012-01-09 14:39:16 +01:00
Elrond
f42e49c3ad Add DB Mixin classes and use them
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.
2012-01-08 21:55:46 +01:00
Christopher Allan Webber
bcd50908d2 Committing extracted and compiled translations 2012-01-07 13:48:12 -06:00
Christopher Allan Webber
3a4d8b9713 Committing present MediaGoblin translations before pushing extracted messages 2012-01-07 13:47:33 -06:00
Jef van Schendel
0788e48c0e Increase docs sidebar width 2012-01-07 00:04:38 +01:00
Jef van Schendel
242509239f New docs logo, small css changes 2012-01-06 23:58:43 +01:00
Jef van Schendel
b957cba0cb First push with new style (includes css file, logo image, fonts) 2012-01-06 19:56:50 +01:00
Jef van Schendel
7646e695bf Fix div breaking in user.html; add media query bits 2012-01-06 13:44:00 +01:00
Jef van Schendel
173999a7e4 Resize image below 660px width 2012-01-06 13:34:25 +01:00
Jef van Schendel
7945cd21ba * Rename mediagoblin_header, mediagoblin_body, mediagoblin_footer, mediagoblin_header_right, mediagoblin_logo
* Add html5shiv for older browsers
* Small size fix (940px instead of 960pgx)
2012-01-05 23:36:16 +01:00
Jef van Schendel
a91e4e07e7 Add closing bracket so the whole thing doesn't break down 2012-01-05 22:46:21 +01:00
Jef van Schendel
ee0b9ea282 Remove last 960.gs leftover; fix classes for edit forms 2012-01-05 21:52:28 +01:00
Jef van Schendel
d2fce291b5 Fix merge conflicts 2012-01-05 21:42:56 +01:00
Jef van Schendel
7df9f45c32 Several changes for mobile layout 2012-01-05 21:36:24 +01:00
Jef van Schendel
34b4090cbf Always show 'Change account settings' link 2012-01-05 15:58:03 +01:00
Elrond
b48abba303 Fix Unit Tests for new password changing 2012-01-05 14:54:03 +01:00
Elrond
49af00e491 Make show-password-js work for change password too
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.
2012-01-05 14:47:15 +01:00
Elrond
4a24500aa4 Fix more StrictUndefined issues 2012-01-05 14:46:27 +01:00
Jef van Schendel
1c53f98c09 Add change-account-settings link to user.html 2012-01-05 00:18:29 +01:00
Jef van Schendel
a473deda9a Merge branch 'master' of gitorious.org:mediagoblin/mediagoblin 2012-01-05 00:17:51 +01:00
Jef van Schendel
c8071fa591 Create edit_account.html 2012-01-05 00:17:45 +01:00