Christopher Allan Webber
95e6da024d
Use the cleaned_markdown_conversion method instead of doing that manually
2011-06-29 20:41:52 -05:00
Joar Wandborg
074ac832c3
Issue #362 - Added new wtforms.Form
; MediaCommentForm()
...
* ADDED `MediaCommentForm` is a form for `MediaComment`
user entry and posting.
2011-06-29 01:35:43 +02:00
Joar Wandborg
9074ee7c1d
Issue #362 - Updated mediagoblin.user_pages.views
to handle new "Simple comments" feature
...
* ADDED `media_post_comment(request)` which creates `MediaComments`
from POST requests
* UPDATED `media_home(request, media, **kwargs)` now passes `comments`,
`pagination` and `comments_form` to `media.html`
2011-06-29 01:29:39 +02:00
Joar Wandborg
6a585e4c52
Issue #362 - Added a route to MediaComment POST handler
2011-06-29 01:14:52 +02:00
Christopher Allan Webber
0692c01e4c
Merge remote branch 'remotes/jwandborg/issue_363'
...
Conflicts:
setup.py
2011-06-19 20:00:35 -05:00
cfdv
4b5f5a08d3
user_gallery controller calls render_to_reponse
2011-06-16 13:00:11 -05:00
cfdv
184f2240cb
adds routing.py and view.py changes
2011-06-16 12:59:48 -05:00
Joar Wandborg
44e2da2fe6
Added Markdown rendering for media_entry
2011-06-12 03:24:31 +02:00
Christopher Allan Webber
9038c9f9ac
I have a strong preference for aligning all parameters in a function call.
2011-06-05 15:41:08 -05:00
Elrond
c9c2493435
Reformat render_to_response calls
...
Just a simple indentation and ordering change, no
functional change.
2011-06-05 16:16:03 +02:00
Elrond
1c63ad5d35
Create render_to_reponse and use it everywhere.
...
Just a shortcut for Response(render_template(...))
2011-06-05 16:16:03 +02:00
Christopher Allan Webber
b5d3aec615
Moving all views over to using util.render_template()!
2011-06-04 17:36:36 -05:00
Christopher Allan Webber
a1556d3f49
Mount media editing under /u/{username}/m/{media}/edit/
2011-06-04 08:50:25 -05:00
Bernhard Keller
00c3925614
modified atomfeed feature, corrected spacing, url generation, routing id
2011-05-23 19:00:46 +02:00
Christopher Allan Webber
16509be160
Update all the views so that they use the uploader reference instead
...
of uploader embedding
2011-05-22 16:06:45 -05: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
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
434b322147
One more mild styling tweak
2011-05-19 22:42:38 -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
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
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
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
e2decbcf1e
Removing the raw string-ness
2011-05-13 16:07:37 -05:00
Sebastian Spaeth
7acdbfd364
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>
2011-05-12 23:10:21 -05:00
Christopher Allan Webber
7222955fba
URLs should end in trailing slashes, or slash redirection doesn't work
2011-05-11 10:26:15 -05:00
Christopher Allan Webber
f624940844
404 appropriately here
2011-05-10 16:25:04 -05:00
Sebastian Spaeth
9a16e16ffa
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>
2011-05-10 16:01:43 -05:00