5251 Commits

Author SHA1 Message Date
Christopher Allan Webber
cb9bac0c83 Just a bit of formatting for these unfinished tests ;) 2011-06-05 15:33:48 -05:00
Christopher Allan Webber
7eac428526 Instructions for running tests with the modern setup 2011-06-05 15:33:28 -05:00
Christopher Allan Webber
b8fbd81799 New password check error message 2011-06-05 15:33:07 -05:00
Christopher Allan Webber
651403f025 Test registration form integrity 2011-06-05 15:30:07 -05:00
Christopher Allan Webber
460ce56493 The first bit of the registration tests working. Not fully there, but
it's clear that the webtest part is working, without having tested the
database yet.  :)
2011-06-05 10:34:29 -05:00
Christopher Allan Webber
0a791a94de Actually it's a lot better of an idea to load the full application out
of the paste config file the way paste would than to load components
of it ourselves.

Aside from this being nicer, it's also necessary for the sake of
getting the middleware working nicely.  We could do it ourselves, but
why bother when paste can just do it for us?
2011-06-05 10:33:59 -05:00
Christopher Allan Webber
67e8c45d2a We should store the template path, not the template object, as the key
in our testing cache
2011-06-05 10:31:29 -05:00
Elrond
9150244afa Create redirect shortcut and use it around
This is just replacing exc.HTTPFound(location=request.urlgen(...))
by redirect(request, ...). No magic.
2011-06-05 16:16:03 +02: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
99619a625b Firefox 3.X shows hidden fields for some reason, adding display: none;
to be rid of them for sure
2011-06-05 09:14:38 -05: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
f99f61c65c Cache template environments and gettexts so we don't have to reproduce
them on every request.
2011-06-04 16:44:22 -05:00
Christopher Allan Webber
e9279f2137 Added new render_template method which will make our lives nicer and
also will be useful for unit testing purposes :)
2011-06-04 16:33:19 -05:00
Christopher Allan Webber
c5678c1ab3 Proper webtest infrastructure... seems to be about right anyway :) 2011-06-04 13:20:48 -05:00
Christopher Allan Webber
a1556d3f49 Mount media editing under /u/{username}/m/{media}/edit/ 2011-06-04 08:50:25 -05:00
Christopher Allan Webber
8ee83b4333 Let's redirect back to the media homepage using the slug instead of the id 2011-06-04 08:48:17 -05:00
Christopher Allan Webber
747623cc04 I shouldn't have removed the .save() entirely :) 2011-06-04 07:41:31 -05:00
Jef van Schendel
f4b2bd93f2 Merge remote-tracking branch 'gitorious/master' 2011-06-04 02:22:09 +02:00
Christopher Allan Webber
c042bc6e21 Title first and foremost... anything else looks weird to me. 2011-06-03 18:47:22 -05:00
Christopher Allan Webber
3f0679cd78 Merge branch 'media_edit' 2011-06-03 18:43:20 -05:00
Christopher Allan Webber
d5e90fe4b4 Find out if such a slug exists via a query instead of via a .save() call 2011-06-03 18:43:08 -05:00
Elrond
55c74e1e4b Propagate Exceptions up in Celery-Eager-Mode
When running in celery-eager mode, the celery machinery
hides all exceptions inside "celery tasks" (you can find
out about them on the task handle somehow). Currently much
better to propagate them straight up, so they're visible on
the console.
2011-06-03 23:54:33 +02:00
Jef van Schendel
2165d464a4 Merge remote-tracking branch 'gitorious/master' 2011-06-03 21:51:38 +02:00
Aleksandar Micovic
02d80437d1 Refactored the sending of verification emails. 2011-06-02 21:07:37 -04:00
Christopher Allan Webber
04cb99b223 attribute values should be quoted :) 2011-06-02 16:30:06 -05:00
Christopher Allan Webber
f80cdc5868 No reason for 'verification_successful = bool' here. 2011-06-02 16:04:17 -05:00
Jef van Schendel
3e96545095 Added lines background to forms 2011-06-02 22:57:10 +02:00
Jef van Schendel
69dadf429d Right-aligned input buttons, added gradient 2011-06-02 22:44:34 +02:00
Jef van Schendel
6a6355a989 Merge remote-tracking branch 'gitorious/master' 2011-06-02 22:09:52 +02:00
Elrond
9bfe1d8e12 Add GNU headers to new *.py 2011-06-02 18:28:26 +02:00
Jakob Kramer
3eeadc922a add changes in mediagoblin/submit/views.py 2011-06-02 17:47:53 +02:00
Jakob Kramer
5603d4df8f should fix #324 2011-06-02 17:47:51 +02:00
Elrond
0732236e9c Handle Exceptions from save(); Move may_edit_media
Turn .save() excpetions into a HTTPConflict. Not nice, but
at least the user gets the error.  Until there is a proper
way to validate things and get nice errors.

Move may_edit_media() to lib.py, as it's not a view.
2011-06-02 17:43:54 +02:00
Elrond
8cd5d4f8c3 Prepare for moving /edit/ under /u/.../edit/
To make moving the whole thing under /u/ easier, prepare to
pass in the {user} needed for that.
2011-06-02 16:48:15 +02:00
Elrond
b897fdf91b Change edit form to use divs instead of table 2011-06-02 16:39:47 +02:00
Christopher Allan Webber
a77d952aa6 No need for a method for generating the verification key as a method
on the class, can just do that in the view
2011-06-02 09:02:13 -05:00
Christopher Allan Webber
e0f8487005 Elrond put that ObjectId thing in the db.util module and wants us to
use that one ;)
2011-06-02 08:47:30 -05:00
Elrond
7fd6f623f1 Merge remote branch 'upstream/master'
Conflicts:
	mediagoblin/templates/mediagoblin/user_pages/media.html
2011-06-02 14:41:50 +02:00
Elrond
c849e69092 Check for edit permission.
You need to own the media, or be an admin to use the edit form.
As simple as that, for now.
2011-06-02 14:26:53 +02:00
Christopher Allan Webber
4d4b49a84e 0.0.2 of GNU MediaGoblin! 2011-05-31 19:54:26 -05:00
Christopher Allan Webber
155f24f9f5 If a user doesn't provide a userid and a token to the verify_email function, might as well 404 2011-05-31 19:37:28 -05:00
Christopher Allan Webber
73a1bc85f1 Moving import to outside of this function 2011-05-31 19:31:23 -05:00
Christopher Allan Webber
a72c504b25 Just adjusting some spacing so we don't go over 80 chars 2011-05-31 19:30:05 -05:00
Christopher Allan Webber
5866d1a8fb Give a "proper" view for resending verification email 2011-05-31 19:29:36 -05:00
Christopher Allan Webber
d9951a6e03 Merge remote branch 'remotes/aleks/aleks' 2011-05-31 19:17:28 -05:00
Aleksandar Micovic
b93a6a229e Added the ability to regenerate a verification key. 2011-05-31 17:14:23 -04:00
Aleksandar Micovic
bcec749b52 Fixed bug where someone who wasn't logged in was asked to verify
their emails.
2011-05-31 15:26:00 -04:00
Jef van Schendel
54f9d72356 Merge remote-tracking branch 'gitorious/master' 2011-05-31 14:32:46 +02:00
Aleksandar Micovic
28afb47ca8 Added a temporary verification page informing the user they need
to authenticate.
2011-05-30 23:51:30 -04:00