mediagoblin.git
13 years agoAdjusting docstrings a bit to my taste.
Christopher Allan Webber [Fri, 20 May 2011 03:40:49 +0000 (22:40 -0500)]
Adjusting docstrings a bit to my taste.

13 years agoReorganizing the uses_pagination decorator a little and having it pass
Christopher Allan Webber [Fri, 20 May 2011 03:39:15 +0000 (22:39 -0500)]
Reorganizing the uses_pagination decorator a little and having it pass
in the page number to the view

13 years agoMerge remote branch 'remotes/hanaku/pagination'
Christopher Allan Webber [Fri, 20 May 2011 03:34:57 +0000 (22:34 -0500)]
Merge remote branch 'remotes/hanaku/pagination'

Conflicts:
mediagoblin/user_pages/views.py

13 years agomoved check for correct page values into decorator for view function
Bernhard Keller [Thu, 19 May 2011 20:52:18 +0000 (22:52 +0200)]
moved check for correct page values into decorator for view function

13 years agoremoved request arg from Pagination class
Bernhard Keller [Thu, 19 May 2011 18:37:04 +0000 (20:37 +0200)]
removed request arg from Pagination class
added get_page_url() in Pagination class, to generate proper urls without losing
other get arguments

13 years agochanged some coding styles and changed the interface for pagination from __call__...
Bernhard Keller [Thu, 19 May 2011 15:24:31 +0000 (17:24 +0200)]
changed some coding styles and changed the interface for pagination from __call__ to the
__init__, also getting a cursor as input, instead of the query details

13 years agoFactor out most of the database connection into db/open.py
Elrond [Wed, 18 May 2011 23:35:02 +0000 (01:35 +0200)]
Factor out most of the database connection into db/open.py

I needed to split the db connection/opening into open.py,
due to an import loop:
- util.py needs db/util.py:ObjectId
- db/util.py would need db/models.py
- db/models.py needs util.py:slugify

13 years agoClean unused imports (found by pyflakes).
Elrond [Wed, 18 May 2011 20:03:52 +0000 (22:03 +0200)]
Clean unused imports (found by pyflakes).

13 years agoadded Pagination class, usage description in Pagination,__call__
Bernhard Keller [Wed, 18 May 2011 15:32:49 +0000 (17:32 +0200)]
added Pagination class, usage description in Pagination,__call__
added pagination.html, object_gallery.html as templates

13 years agoRenaming connect_database to connect_database_from_config and using in from_celery
Christopher Allan Webber [Wed, 18 May 2011 13:44:57 +0000 (08:44 -0500)]
Renaming connect_database to connect_database_from_config and using in from_celery

13 years agoNeed to import asint for users who specify ports via config file
Christopher Allan Webber [Wed, 18 May 2011 13:39:09 +0000 (08:39 -0500)]
Need to import asint for users who specify ports via config file

13 years agoAdding copyright headers and explaining why these unused imports are here
Christopher Allan Webber [Wed, 18 May 2011 13:37:48 +0000 (08:37 -0500)]
Adding copyright headers and explaining why these unused imports are here

13 years agoMove ObjectId, DESCENDING to db.util
Elrond [Wed, 18 May 2011 09:32:29 +0000 (11:32 +0200)]
Move ObjectId, DESCENDING to db.util

We used to import those from pymongo and mongokit directly.
We should import them from a single place. So let's try
db.util for this.

13 years agoMove "connect to database" into db/util.py
Elrond [Tue, 17 May 2011 23:03:40 +0000 (01:03 +0200)]
Move "connect to database" into db/util.py

13 years agoMove models into new db/ directory
Elrond [Tue, 17 May 2011 22:44:10 +0000 (00:44 +0200)]
Move models into new db/ directory

The database is a central point of interest/discussion.
Represent that by its own directory.

This will surely become more interesting when we have
migrations for example.

13 years agoActually we only need unique slugs per uploader.
Christopher Allan Webber [Mon, 16 May 2011 23:28:49 +0000 (18:28 -0500)]
Actually we only need unique slugs per uploader.

But I want to fix http://bugs.foocorp.net/issues/340 first.

13 years agoMy name's Chris Webber and I'm pedantic about lines not going over 80 characters.
Christopher Allan Webber [Mon, 16 May 2011 23:23:27 +0000 (18:23 -0500)]
My name's Chris Webber and I'm pedantic about lines not going over 80 characters.

13 years agoRequire that the slug field have only unique values.
Christopher Allan Webber [Mon, 16 May 2011 23:22:13 +0000 (18:22 -0500)]
Require that the slug field have only unique values.

13 years agoAdding the is_admin field now per Elrond's sane request / advice. ;)
Christopher Allan Webber [Mon, 16 May 2011 23:20:50 +0000 (18:20 -0500)]
Adding the is_admin field now per Elrond's sane request / advice. ;)

13 years ago./bin/gmg shell documented in the hackinghowto
Christopher Allan Webber [Mon, 16 May 2011 22:35:56 +0000 (17:35 -0500)]
./bin/gmg shell documented in the hackinghowto

13 years agoShow images in reverse submit order
Sebastian Spaeth [Mon, 16 May 2011 12:55:05 +0000 (14:55 +0200)]
Show images in reverse submit order

Fixes bug #327. Just do a .sort('created', DESCENDING) on Media when
showing them to show the latest first.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
13 years agoProperly linking to the background image
Christopher Allan Webber [Mon, 16 May 2011 12:46:26 +0000 (07:46 -0500)]
Properly linking to the background image

13 years ago./bin/gmg shell! Should make a lot of peoples' hacking lives easier I suspect :)
Christopher Allan Webber [Mon, 16 May 2011 00:02:11 +0000 (19:02 -0500)]
./bin/gmg shell!  Should make a lot of peoples' hacking lives easier I suspect :)

13 years agoRemoving the raw string-ness
Christopher Allan Webber [Fri, 13 May 2011 21:07:37 +0000 (16:07 -0500)]
Removing the raw string-ness

13 years agoRemoving backup files and preventing them from showing up via .gitignore
Jef van Schendel [Fri, 13 May 2011 20:38:04 +0000 (15:38 -0500)]
Removing backup files and preventing them from showing up via .gitignore

13 years agolabels changed to font-weight normal instead of bold, css structure improved
Jef van Schendel [Fri, 13 May 2011 20:34:44 +0000 (15:34 -0500)]
labels changed to font-weight normal instead of bold, css structure improved

13 years agoAdded @font-face to css
Jef van Schendel [Fri, 13 May 2011 20:34:35 +0000 (15:34 -0500)]
Added @font-face to css

13 years agoAdded header to base.html
Jef van Schendel [Fri, 13 May 2011 20:34:26 +0000 (15:34 -0500)]
Added header to base.html

13 years agoChanged all headers to <h1>
Jef van Schendel [Fri, 13 May 2011 20:34:10 +0000 (15:34 -0500)]
Changed all headers to <h1>

13 years agoStyled buttons for real this time
Jef van Schendel [Fri, 13 May 2011 20:33:58 +0000 (15:33 -0500)]
Styled buttons for real this time

13 years agoStyled input buttons
Jef van Schendel [Fri, 13 May 2011 20:33:46 +0000 (15:33 -0500)]
Styled input buttons

13 years agoChanged base.html back to old version
Jef van Schendel [Fri, 13 May 2011 20:33:27 +0000 (15:33 -0500)]
Changed base.html back to old version

13 years agoFixing changes
Jef van Schendel [Fri, 13 May 2011 20:33:19 +0000 (15:33 -0500)]
Fixing changes

13 years agoMinor fomatting fix.
Aaron Williamson [Fri, 13 May 2011 18:16:35 +0000 (14:16 -0400)]
Minor fomatting fix.

13 years agoGenerate unique slugs for newly submitted images.
Aaron Williamson [Fri, 13 May 2011 16:18:52 +0000 (12:18 -0400)]
Generate unique slugs for newly submitted images.

13 years agomin=0 makes more sense than min=-1
Christopher Allan Webber [Fri, 13 May 2011 04:40:47 +0000 (23:40 -0500)]
min=0 makes more sense than min=-1

13 years agoOn image submission, do not require title. If none entered, default to filename.
Aaron Williamson [Mon, 9 May 2011 04:06:38 +0000 (00:06 -0400)]
On image submission, do not require title. If none entered, default to filename.

13 years agoMerge remote branch 'refs/remotes/dneelyeps/master'
Christopher Allan Webber [Fri, 13 May 2011 04:34:19 +0000 (23:34 -0500)]
Merge remote branch 'refs/remotes/dneelyeps/master'

13 years agolocale rather than target_lang in the get parameters
Christopher Allan Webber [Fri, 13 May 2011 04:17:53 +0000 (23:17 -0500)]
locale rather than target_lang in the get parameters

13 years agoImprove user homepage
Sebastian Spaeth [Wed, 11 May 2011 06:39:57 +0000 (08:39 +0200)]
Improve user homepage

1) Only consider user's with 'status': 'active'. We don't want to
   display unconfirmed/blocked users, right?
2) Actually query user's media in the view and display on their home
   page.
3) Throw an error 404 if we don't find a valid user, rather than saying,
   "User not found" (from within the template).
4) Pass in medias as media_entries to remain compatible with the 'root'
   page.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
13 years agoLoad gettext, and load it into the template environment
Christopher Allan Webber [Fri, 13 May 2011 03:33:30 +0000 (22:33 -0500)]
Load gettext, and load it into the template environment

13 years agomoving mediagoblin.po to a filename that makes sense
Christopher Allan Webber [Thu, 12 May 2011 20:26:15 +0000 (15:26 -0500)]
moving mediagoblin.po to a filename that makes sense

13 years agoSeparation between setting up the template env and the template loader
Christopher Allan Webber [Thu, 12 May 2011 20:17:07 +0000 (15:17 -0500)]
Separation between setting up the template env and the template loader
for a glorious future where we have gettext in template context

13 years agoMerge branch 'master' of gitorious.org:mediagoblin/mediagoblin
Christopher Allan Webber [Thu, 12 May 2011 19:59:08 +0000 (14:59 -0500)]
Merge branch 'master' of gitorious.org:mediagoblin/mediagoblin

Conflicts:
mediagoblin/util.py

13 years agoAdded some locale determination tools
Christopher Allan Webber [Thu, 12 May 2011 19:57:58 +0000 (14:57 -0500)]
Added some locale determination tools

13 years agoFix the email debug inbox
Christopher Allan Webber [Thu, 12 May 2011 19:49:37 +0000 (14:49 -0500)]
Fix the email debug inbox

13 years agoI probably shouldn't break the main page since we don't have the
Christopher Allan Webber [Thu, 12 May 2011 19:25:28 +0000 (14:25 -0500)]
I probably shouldn't break the main page since we don't have the
gettext thing in place yet.

13 years agoUpdate to previous commit
Daniel Neel [Thu, 12 May 2011 18:54:59 +0000 (14:54 -0400)]
Update to previous commit

To add an extra comment symbol.

13 years agoEdits to "What's where" diagram in docs/codebase.rst
Daniel Neel [Thu, 12 May 2011 18:52:51 +0000 (14:52 -0400)]
Edits to "What's where" diagram in docs/codebase.rst

Added comment symbols to distinguish comments from directory names.
Changed wording a bit on one part.

13 years agoUpdated table of contents
Daniel Neel [Thu, 12 May 2011 18:48:50 +0000 (14:48 -0400)]
Updated table of contents

Updated TOC to match "Foreward" > "Foreword"

13 years agoFixed previous broken commit
Daniel Neel [Thu, 12 May 2011 18:46:59 +0000 (14:46 -0400)]
Fixed previous broken commit

Made a mistake with the last commit, fixed here.

13 years agoChanged "Foreward" to "Foreword"
Daniel Neel [Thu, 12 May 2011 18:46:02 +0000 (14:46 -0400)]
Changed "Foreward" to "Foreword"

Figured this was a typo. If not, feel free to skip this commit.

13 years agoFixed a typo in docs/contributinghowto.rst
Daniel Neel [Thu, 12 May 2011 18:35:39 +0000 (14:35 -0400)]
Fixed a typo in docs/contributinghowto.rst

"it'd" > "it's"

13 years agoFixed another typo in docs/mediagoblin.rst
Daniel Neel [Thu, 12 May 2011 18:29:54 +0000 (14:29 -0400)]
Fixed another typo in docs/mediagoblin.rst

"We decide that in this case, that someone would be us!"
> "We decided that in this case, that someone would be us!"

13 years agoFixed a typo in docs/mediagoblin.rst
Daniel Neel [Thu, 12 May 2011 18:23:52 +0000 (14:23 -0400)]
Fixed a typo in docs/mediagoblin.rst

"...their data and that measn someone..."
> "...their data and that means someone..."

13 years agoMoving translations to mediagoblin/translations
Christopher Allan Webber [Thu, 12 May 2011 15:22:56 +0000 (10:22 -0500)]
Moving translations to mediagoblin/translations

13 years agoadding master.po translations file
Christopher Allan Webber [Thu, 12 May 2011 15:20:03 +0000 (10:20 -0500)]
adding master.po translations file

13 years agobuildout instructions come first since it's easier if it does work
Christopher Allan Webber [Thu, 12 May 2011 15:05:35 +0000 (10:05 -0500)]
buildout instructions come first since it's easier if it does work

13 years agoTranslate the welcome message (extracts successfully!)
Christopher Allan Webber [Thu, 12 May 2011 14:48:54 +0000 (09:48 -0500)]
Translate the welcome message (extracts successfully!)

13 years agoAdded extraction stuff that's not used but appears to work :)
Christopher Allan Webber [Thu, 12 May 2011 14:44:04 +0000 (09:44 -0500)]
Added extraction stuff that's not used but appears to work :)

13 years agoAdd the jinja2 extension to the jinja loader
Christopher Allan Webber [Thu, 12 May 2011 14:18:53 +0000 (09:18 -0500)]
Add the jinja2 extension to the jinja loader

13 years agoFixing tyop in README... thanks Daniel Neel!
Christopher Allan Webber [Thu, 12 May 2011 12:17:02 +0000 (07:17 -0500)]
Fixing tyop in README... thanks Daniel Neel!

Also clarifying that our public alpha may be in October, which is what
we've said elsewhere.

13 years agoRight, we don't need the exported HTML either.
Christopher Allan Webber [Thu, 12 May 2011 12:15:11 +0000 (07:15 -0500)]
Right, we don't need the exported HTML either.

13 years agoI don't believe we need READMEish.org anymore.
Christopher Allan Webber [Thu, 12 May 2011 12:14:15 +0000 (07:14 -0500)]
I don't believe we need READMEish.org anymore.

13 years agoEnforce using local dateutil with buildout
Sebastian Spaeth [Sun, 8 May 2011 23:08:46 +0000 (01:08 +0200)]
Enforce using local dateutil with buildout

Natty has a too old system dateutil, but buildout will put the system
modules in the search path first. By adding the dateutil spec to the
'egg' requirement, we put the dateutil inclusion of the local egg first
and natty compiles (buildouts) fine.

Part of http://bugs.foocorp.net/issues/308

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
13 years agoURLs should end in trailing slashes, or slash redirection doesn't work
Christopher Allan Webber [Wed, 11 May 2011 15:26:15 +0000 (10:26 -0500)]
URLs should end in trailing slashes, or slash redirection doesn't work

13 years agoRemoving this horrifying submission test stuff from way back when
Christopher Allan Webber [Tue, 10 May 2011 21:35:34 +0000 (16:35 -0500)]
Removing this horrifying submission test stuff from way back when

13 years ago404 appropriately here
Christopher Allan Webber [Tue, 10 May 2011 21:25:04 +0000 (16:25 -0500)]
404 appropriately here

13 years agoIndenting these templates because I'm pedantic about tag sections
Christopher Allan Webber [Tue, 10 May 2011 21:24:51 +0000 (16:24 -0500)]
Indenting these templates because I'm pedantic about tag sections
having their content indented :)

13 years agoImplement simple media detail page
Sebastian Spaeth [Sun, 8 May 2011 18:35:54 +0000 (20:35 +0200)]
Implement simple media detail page

This patch creates a "homepage" for each media. The URL is
/u/<username>/m/<objID>.

On it we display the media and some details. It is ugly and lacking some
stuff but it works. The only thing left to do is to throw an 404 error
if the <username> and the media uploader don't correspond.

- Also create a user "home page" while at it. It is merely a place
  holder for now though.

- Link from the entries on the homepage, to the media pages, so we
actually find them.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
13 years agoMerge remote branch 'spaetz/fix_description'
Christopher Allan Webber [Mon, 9 May 2011 01:20:19 +0000 (20:20 -0500)]
Merge remote branch 'spaetz/fix_description'

13 years agoFix description submission in form handling
Sebastian Spaeth [Sun, 8 May 2011 22:23:12 +0000 (00:23 +0200)]
Fix description submission in form handling

When we submitted an image the description would remain empty. THis was
because of some weird typo in form handling. Get an attribute with
.get('description') and not with .get(['description']). With this patch,
descriptions actually go into the database.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
13 years agoAsbool the email debug mode option
Christopher Allan Webber [Sun, 8 May 2011 15:07:39 +0000 (10:07 -0500)]
Asbool the email debug mode option

13 years agoDon't escape the verification URL
Sebastian Spaeth [Sun, 8 May 2011 13:46:35 +0000 (15:46 +0200)]
Don't escape the verification URL

In the verification email we would output the URL using HTML encoded
text, so that e.g. & -> &amp;. We don't want that and we know the URL
won't contain user contributed content, so it is safe to turn off HTML
encoding here.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
13 years agoOnly convert db port if it's there and use asint to do it (better errors if failing)
Christopher Allan Webber [Sun, 8 May 2011 12:16:50 +0000 (07:16 -0500)]
Only convert db port if it's there and use asint to do it (better errors if failing)

13 years agoMerge remote branch 'refs/remotes/spaetz/master'
Christopher Allan Webber [Sun, 8 May 2011 12:11:57 +0000 (07:11 -0500)]
Merge remote branch 'refs/remotes/spaetz/master'

13 years agomgoblin_section.get, not app_config.get (doh)
Christopher Allan Webber [Sun, 8 May 2011 12:07:08 +0000 (07:07 -0500)]
mgoblin_section.get, not app_config.get (doh)

My name's Chris Webber and I ignore pyflakes warnings.

13 years agoapp.py: Need to pass in port number as 'int'
Sebastian Spaeth [Sun, 8 May 2011 09:12:38 +0000 (11:12 +0200)]
app.py: Need to pass in port number as 'int'

When we configured an explicite db_port in mediagoblin.ini, paster would
crash claiming that the port number must be an int. Given that we don't
have a "get_conf_int()" function or something similar (yet?), simply
convert the port number to int before passing it to the mongo Connection
instance.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
13 years agoRemoving unused sys import from setup.py
Christopher Allan Webber [Sun, 8 May 2011 03:45:30 +0000 (22:45 -0500)]
Removing unused sys import from setup.py

13 years agoAdded an email debug mode which, by default, is enabled
Christopher Allan Webber [Sun, 8 May 2011 03:45:06 +0000 (22:45 -0500)]
Added an email debug mode which, by default, is enabled

13 years ago[to_email] rather than list(to_email) which makes a nasty series like ['e','m','a...
Christopher Allan Webber [Sun, 8 May 2011 03:44:37 +0000 (22:44 -0500)]
[to_email] rather than list(to_email) which makes a nasty series like ['e','m','a','i','l']

13 years agoMerge remote branch 'refs/remotes/jwandborg/master'
Christopher Allan Webber [Sun, 8 May 2011 01:05:28 +0000 (20:05 -0500)]
Merge remote branch 'refs/remotes/jwandborg/master'

13 years agoUpdated default sender address
Joar Wandborg [Sun, 8 May 2011 00:03:11 +0000 (02:03 +0200)]
Updated default sender address

Signed-off-by: Joar Wandborg <git@wandborg.com>
13 years agoAdded verification email template
Joar Wandborg [Sun, 8 May 2011 00:01:26 +0000 (02:01 +0200)]
Added verification email template

Signed-off-by: Joar Wandborg <git@wandborg.com>
13 years agoRemoved unused variable
Joar Wandborg [Sat, 7 May 2011 23:58:58 +0000 (01:58 +0200)]
Removed unused variable

Signed-off-by: Joar Wandborg <git@wandborg.com>
13 years agoMade changes according to http://bugs.foocorp.net/issues/271#note-7
Joar Wandborg [Sat, 7 May 2011 22:55:57 +0000 (00:55 +0200)]
Made changes according to bugs.foocorp.net/issues/271#note-7

Signed-off-by: Joar Wandborg <git@wandborg.com>
13 years agoReversing buildout and virtualenv instructions because I think
Christopher Allan Webber [Sat, 7 May 2011 18:58:36 +0000 (13:58 -0500)]
Reversing buildout and virtualenv instructions because I think
virtualenv is easier if you don't know how this stuff works, and it
works.

13 years agoMerge branch 'master' of http://git.gitorious.org/mediagoblin/mediagoblin
Joar Wandborg [Sat, 7 May 2011 16:07:04 +0000 (18:07 +0200)]
Merge branch 'master' of git.gitorious.org/mediagoblin/mediagoblin

13 years agoRemoves the git requirement--that's redundant
Will Kahn-Greene [Sat, 7 May 2011 13:57:58 +0000 (09:57 -0400)]
Removes the git requirement--that's redundant

13 years agoWraps the virtualenv wrapper line
Will Kahn-Greene [Sat, 7 May 2011 13:57:37 +0000 (09:57 -0400)]
Wraps the virtualenv wrapper line

13 years agoTweaks the "if mongodb isn't working" troubleshooting section
Will Kahn-Greene [Sat, 7 May 2011 13:56:39 +0000 (09:56 -0400)]
Tweaks the "if mongodb isn't working" troubleshooting section

13 years agoBe sure to read the install instructions!
Christopher Allan Webber [Sat, 7 May 2011 13:54:53 +0000 (08:54 -0500)]
Be sure to read the install instructions!

13 years agoFixes headers in hacking howto docs
Will Kahn-Greene [Sat, 7 May 2011 13:42:01 +0000 (09:42 -0400)]
Fixes headers in hacking howto docs

13 years agoOverhauls hacking howto
Will Kahn-Greene [Sat, 7 May 2011 12:49:36 +0000 (08:49 -0400)]
Overhauls hacking howto

* reworks virtualenv section to be way better
* reworks buildout section to mirror virtualenv section
* reworks other sections that depend on which development environment
  building method you chose

13 years agoMerge branch 'master' of http://git.gitorious.org/mediagoblin/mediagoblin
Joar Wandborg [Sat, 7 May 2011 11:46:30 +0000 (13:46 +0200)]
Merge branch 'master' of git.gitorious.org/mediagoblin/mediagoblin

13 years agoFirst pass at adding virtualenv instructions.
Will Kahn-Greene [Sat, 7 May 2011 02:06:36 +0000 (22:06 -0400)]
First pass at adding virtualenv instructions.

13 years agoFixes a link in the docs
Will Kahn-Greene [Sat, 7 May 2011 01:54:10 +0000 (21:54 -0400)]
Fixes a link in the docs

13 years agoMerge branch 'master' of http://git.gitorious.org/mediagoblin/mediagoblin
Joar Wandborg [Sat, 7 May 2011 01:11:36 +0000 (03:11 +0200)]
Merge branch 'master' of git.gitorious.org/mediagoblin/mediagoblin

13 years agoAdded functionality to send out verification email upon successful registration
Joar Wandborg [Sat, 7 May 2011 01:08:09 +0000 (03:08 +0200)]
Added functionality to send out verification email upon successful registration

Signed-off-by: Joar Wandborg <git@wandborg.com>
13 years agoChanged the method used to generate uuids for verification_key, this one works, thank...
Joar Wandborg [Sat, 7 May 2011 00:30:35 +0000 (02:30 +0200)]
Changed the method used to generate uuids for verification_key, this one works, thanks paroneayea

Signed-off-by: Joar Wandborg <git@wandborg.com>