Christopher Allan Webber
c0bf3c807b
Clarified: don't do this in production!
2011-05-20 19:35:11 -05:00
Christopher Allan Webber
693b674ce0
Added some stuff on how to run CELERY_ALWAYS_EAGER
2011-05-20 19:34:28 -05:00
Will Kahn-Greene
2aa3bb1154
Moves virtualenv instructions to a place far far away
...
But seriously, moved them to the stop-gap wiki:
https://gitorious.org/mediagoblin/pages/HackingWithVirtualenv
2011-05-20 20:21:18 -04:00
Christopher Allan Webber
5487efc401
This check is redundant now that it's handled by the decorator.
2011-05-20 19:12:44 -05:00
Christopher Allan Webber
01674e105c
Make sure that a MediaEntry does belong to this appropriate user in
...
the decorator. (Thanks Elrond)
2011-05-20 19:12:32 -05:00
Christopher Allan Webber
571198c938
Now you can set CELERY_ALWAYS_EAGER environment variable so that you
...
don't have to run celeryd at the same time.
This should make Elrond happy ;)
2011-05-20 18:49:04 -05:00
Christopher Allan Webber
6926b23d43
Added a url_for_self method for generating mediaentry links
...
This allows for optionally making the url based off of slugs or ids
2011-05-20 18:16:10 -05:00
Christopher Allan Webber
439e37f732
Cosmetic changes: removed an unused import, stripped some trailing whitespace.
2011-05-20 17:48:43 -05:00
Christopher Allan Webber
724933b154
MediaEntry slugs usable in URLs, & decorator that grabs media from the request
2011-05-20 17:47:36 -05:00
Christopher Allan Webber
3c2567ac76
Adjusting spacing a little bit
2011-05-20 17:37:50 -05:00
Christopher Allan Webber
90bdf3428f
pass in page number in uses_pagination view via keyword argument so ordering doesn't matter.
2011-05-20 17:36:29 -05:00
Christopher Allan Webber
b9e9610bfe
I think 30 is a good default number of items per page.
2011-05-19 22:46:18 -05:00
Christopher Allan Webber
dffa0b0983
Another minor formatting change.
2011-05-19 22:44:57 -05:00
Christopher Allan Webber
434b322147
One more mild styling tweak
2011-05-19 22:42:38 -05:00
Christopher Allan Webber
140e21028b
We don't really need to use a \ here so let's not do so.
2011-05-19 22:41:27 -05:00
Christopher Allan Webber
a98d5254cb
Adjusting docstrings a bit to my taste.
2011-05-19 22:40:49 -05:00
Christopher Allan Webber
1301a8ad57
Reorganizing the uses_pagination decorator a little and having it pass
...
in the page number to the view
2011-05-19 22:39:15 -05:00
Christopher Allan Webber
af4d0b5cb0
Merge remote branch 'remotes/hanaku/pagination'
...
Conflicts:
mediagoblin/user_pages/views.py
2011-05-19 22:34:57 -05:00
Bernhard Keller
3eb6fc4f2f
moved check for correct page values into decorator for view function
2011-05-19 22:52:18 +02:00
Bernhard Keller
44e3e917fb
removed request arg from Pagination class
...
added get_page_url() in Pagination class, to generate proper urls without losing
other get arguments
2011-05-19 20:37:04 +02:00
Bernhard Keller
ca3ca51c5a
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
2011-05-19 17:24:31 +02:00
Elrond
a67fec8177
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
2011-05-19 01:35:02 +02:00
Elrond
86f9b47387
Clean unused imports (found by pyflakes).
2011-05-18 22:03:52 +02:00
Bernhard Keller
ae85ed0f97
added Pagination class, usage description in Pagination,__call__
...
added pagination.html, object_gallery.html as templates
2011-05-18 17:32:49 +02:00
Christopher Allan Webber
3262ad1dbb
Renaming connect_database to connect_database_from_config and using in from_celery
2011-05-18 08:44:57 -05:00
Christopher Allan Webber
468bc8afce
Need to import asint for users who specify ports via config file
2011-05-18 08:39:09 -05:00
Christopher Allan Webber
1815f5ce2e
Adding copyright headers and explaining why these unused imports are here
2011-05-18 08:37:48 -05:00
Elrond
254bc43174
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.
2011-05-18 11:32:29 +02:00
Elrond
a4bae8700e
Move "connect to database" into db/util.py
2011-05-18 01:03:40 +02:00
Elrond
0f18ed8f5e
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.
2011-05-18 00:44:10 +02:00
Christopher Allan Webber
931f318cbc
Actually we only need unique slugs per uploader.
...
But I want to fix http://bugs.foocorp.net/issues/340 first.
2011-05-16 18:28:49 -05:00
Christopher Allan Webber
f0545ddebd
My name's Chris Webber and I'm pedantic about lines not going over 80 characters.
2011-05-16 18:23:27 -05:00
Christopher Allan Webber
37af09a2e5
Require that the slug field have only unique values.
2011-05-16 18:22:13 -05:00
Christopher Allan Webber
18cf34d470
Adding the is_admin field now per Elrond's sane request / advice. ;)
2011-05-16 18:21:23 -05:00
Christopher Allan Webber
3e4a2f2be7
./bin/gmg shell documented in the hackinghowto
2011-05-16 17:35:56 -05:00
Sebastian Spaeth
1ab8467320
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>
2011-05-16 14:55:05 +02:00
Christopher Allan Webber
400125148f
Properly linking to the background image
2011-05-16 07:46:26 -05:00
Christopher Allan Webber
029cad45c6
./bin/gmg shell! Should make a lot of peoples' hacking lives easier I suspect :)
2011-05-15 19:02:11 -05:00
Christopher Allan Webber
e2decbcf1e
Removing the raw string-ness
2011-05-13 16:07:37 -05:00
Jef van Schendel
9d4b435a72
Removing backup files and preventing them from showing up via .gitignore
2011-05-13 15:38:04 -05:00
Jef van Schendel
983aa712ad
labels changed to font-weight normal instead of bold, css structure improved
2011-05-13 15:34:44 -05:00
Jef van Schendel
cb1e4a3d1f
Added @font-face to css
2011-05-13 15:34:35 -05:00
Jef van Schendel
4a0f823e51
Added header to base.html
2011-05-13 15:34:26 -05:00
Jef van Schendel
8d2a42d435
Changed all headers to <h1>
2011-05-13 15:34:10 -05:00
Jef van Schendel
223b410dce
Styled buttons for real this time
2011-05-13 15:33:58 -05:00
Jef van Schendel
8c01ae42e9
Styled input buttons
2011-05-13 15:33:46 -05:00
Jef van Schendel
20aaec5f68
Changed base.html back to old version
2011-05-13 15:33:27 -05:00
Jef van Schendel
881b6e2c32
Fixing changes
2011-05-13 15:33:19 -05:00
Aaron Williamson
1013bdaff2
Minor fomatting fix.
2011-05-13 14:16:35 -04:00
Aaron Williamson
0546833c6e
Generate unique slugs for newly submitted images.
2011-05-13 12:18:52 -04:00