3950 Commits

Author SHA1 Message Date
Christopher Allan Webber
abff297cf9 Caution about the API in the release notes 2013-09-04 14:27:18 -05:00
Rodney Ewing
857512e81e need to send the users email to persona if the user logged in with persona.
Thanks callahad for pointing this out.
2013-09-04 08:45:08 -07:00
Christopher Allan Webber
d87d099dd8 Thanking Dan Callahan as a contributor. Thanks for helping with the persona stuff! :) 2013-09-04 09:23:02 -05:00
Sebastian Spaeth
560fd63843 Improve checkbox description
Do not Enable/Disable next to a checkbox. So what does an enabled checkbox do then?
2013-09-04 14:54:00 +02:00
Christopher Allan Webber
100625f6c2 Merge remote-tracking branch 'refs/remotes/spaetz/fix_docs' 2013-09-04 07:41:56 -05:00
Sebastian Spaeth
cc0c6cd250 Fix plugin documentation
The docs suggest to use {% template_hook "media_sidebar" %}. This
will break Mediagoblin in mysterious ways, and the docs need a fix.
2013-09-04 11:35:39 +02:00
Dan Callahan
b6fc7dd96e Add site name, logo, and background for Persona 2013-09-03 15:54:04 -05:00
tilly-Q
8e91df8734 I did some more code-keeping in this commit. I added a lot of documentation, so
that most of my functions do indeed have effective docstrings. I also changed
the decorators so that they imply eachother in a logical way. I also modified
the one decorator get_media_comment_by_id to be more usable with the variable
urls of mediagoblin.user_pages.views:file_a_report. I also noticed a few tests
had broken, so I went through them and fixed them up, finding that mostly there
were problems in my actual writing of the tests. I also did a few other small
tasks such as creating a new User method to check whether or not a User is ban-
-ned.

===============================================================================
    Added in documentation
===============================================================================
--\  mediagoblin/db/models.py
--\  mediagoblin/decorators.py
--\  mediagoblin/moderation/forms.py
--\  mediagoblin/moderation/tools.py
--\  mediagoblin/moderation/views.py
--\  mediagoblin/user_pages/lib.py

===============================================================================
    Rearranged decorators to be more efficient
===============================================================================
--\  mediagoblin/decorators.py
--| Made it so that user_not_banned is encapsulated in require_active_login
--| Made it so that require_active_login is encapsulated in user_has_privilege
--| Changed get_media_comment_by_id into get_optional_media_comment_by_id. It
  | now returns valid code if the MediaComment id is absent. This makes it pos-
  | -sible to use this decorator for the function:
  |         mediagoblin.user_pages.views:file_a_report

--\  mediagoblin/user_pages/views.py
--| Replaced the mediagoblin.user_pages.views:file_a_comment_report with the
  | decorator mentioned above

--\  mediagoblin/user_pages/routing.py

        -----------------------------------------------------------
        |     took out unnecessary @user_not_banned decorators    |
        -----------------------------------------------------------
--\  mediagoblin/submit/views.py
--\  mediagoblin/user_pages/views.py

===============================================================================
    Fixed broken tests
===============================================================================
--\  mediagoblin/tests/test_auth.py
--\  mediagoblin/tests/test_privileges.py
--\  mediagoblin/tests/test_submission.py

===============================================================================
    Fixed broken code
===============================================================================
--\  mediagoblin/tools/response.py

===============================================================================
    Other Tasks
===============================================================================
--\  mediagoblin/db/models.py
--| Added in User.is_banned() method
--\  mediagoblin/decorators.py
--| Utitilized User.is_banned() method in the user_not_banned decorator

--\  mediagoblin/moderation/views.py
--| Made it impossible for an admin to ban themself.
--| Got rid of a vestigial print statement

--\  mediagoblin/templates/mediagoblin/base.html
--| Made it so the top panel does not show up for users that are banned.

--\  mediagoblin/templates/mediagoblin/moderation/user.html
--| Rearranged the javascript slightly

===============================================================================
2013-09-03 16:19:07 -04:00
Christopher Allan Webber
6a7e4b431c Updated AUTHORS for v0.5.0 2013-09-03 11:38:50 -05:00
tilly-Q
dc31cd1b65 I've moved on to one of the last phases of my work! Now I'm just checking off
items from my last to-do list. The biggest change in this commit is that I made
the moderation reports panel sortable via get request. I also added in page nu-
mbers so that more than 10 reports can be viewed. I'm hoping to go from here to
make a search page. Aside from that, there were only a few other changes I made
this time. I fixed two bugs in my code. I copy-ed and pasted function
mediagoblin.user_pages.views:media_preview_comment which I must've deleted ear-
-lier in a merge. And I moved some of the javascript I was using in the modera-
-tion templates into it's own seperate .js file.

===============================================================================
    Made the moderation reports panel view sortable
===============================================================================
--\ mediagoblin/moderation/forms.py
--\ mediagoblin/moderation/views.py
--\ mediagoblin/templates/mediagoblin/moderation/report_panel.html
--\ mediagoblin/templates/mediagoblin/moderation/user.html
--|  Made `<user> report history` into a link that automatically shows all open
  | and closed reports on <user>.

===============================================================================
    Grabbed some code from master that I accidentally deleted in a merge
===============================================================================
--\ mediagoblin/user_pages/views.py

===============================================================================
    Moved javascript away from templates into its own file
===============================================================================
--\ mediagoblin/static/js/setup_report_forms.js
--\ mediagoblin/templates/mediagoblin/moderation/report.html
--\ mediagoblin/templates/mediagoblin/moderation/user.html

===============================================================================
    Cleared trailing white space
===============================================================================
--\ mediagoblin/templates/mediagoblin/moderation/media_panel.html
--\ mediagoblin/moderation/tools.py
--\ mediagoblin/templates/mediagoblin/meta/terms_of_service.html
--\ mediagoblin/templates/mediagoblin/moderation/report_panel.html
--\ mediagoblin/templates/mediagoblin/user_pages/media.html
--\ mediagoblin/tests/test_modelmethods.py

===============================================================================
    Small fixes
===============================================================================
--\ mediagoblin/templates/mediagoblin/moderation/report.html
--|  Fixed a link so that it points to the correct user page

--\ mediagoblin/templates/mediagoblin/user_pages/media.html
--|  Fixed a bug that crashed this page when a guest visitted it (because
  | request.user is None)
2013-09-03 11:57:10 -04:00
Sebastian Spaeth
51b4318079 Simplify non-active user page
Currently, the logic of whether a user account has been activated is in
the main user.html template. This is not good as: doing that check for all
users from template code is probably not great for performance, but more
severly, the template logic is rather difficult and convoluted.

Split this in a user.html and a user_nonactive.html where user.html is
used for active users and user_nonactive displays all the "you still need
to be activated" blurbs. This makes the templates much easier on the eyes.
2013-09-03 17:52:28 +02:00
Rodney Ewing
6375cf735c should use public_store.file_exists to check if the file copied correctly 2013-09-02 12:09:55 -07:00
Rodney Ewing
635dd6cc31 don't set logging level to debug 2013-09-02 11:55:41 -07:00
Rodney Ewing
26583b2cab check if db is up to date 2013-09-02 11:53:48 -07:00
Aditi Mittal
fe74105509 Rename get_all_posts_of_a_blog function. 2013-09-02 22:14:59 +05:30
Aditi Mittal
8762609f2a Implement pagination feature for blog_post_listing and blog_dashboard pages. 2013-09-02 21:58:17 +05:30
Aditi Mittal
060d15d384 Get all blog posts as a query object as suggested by spaetz. 2013-09-02 20:35:22 +05:30
Aditi Mittal
a6ad5ddd4b Make get_all_posts_of_a_blog a function of Blog class. 2013-09-02 20:33:40 +05:30
Aditi Mittal
839e6ebd57 Rename save button to 'save as draft'. 2013-09-02 09:09:31 +05:30
Rodney Ewing
dd57c6c5e5 didn't remove form.new_email when change email was moved to its own view 2013-08-31 13:45:58 -07:00
Aditi Mittal
a7f02e9514 Merge branch 'master' of git://gitorious.org/mediagoblin/mediagoblin 2013-08-31 12:34:02 +05:30
Christopher Allan Webber
6b61a51e45 We're presently tied to a very specific version of oauthlib... 2013-08-30 16:27:39 -05:00
tilly-Q
1bb367f613 This is a quick commit. I gave admins the ability to ban or unban users
straight from the moderation.users_detail page. I also changed the
UserBan.expiration_date type from DateTime into Date. I also began work on the
Terms of Service, pulled from another website (which will be cited clearly
before I'm done). I added new tests as well for the ban/unbanning. Lastly,
I added a few `user_not_banned` decorators to relevant views, so banned users
cannot access any pages.
2013-08-29 17:31:19 -04:00
tilly-Q
dfd66b789c This was a big commit! I included lots of documentation below, but generally I
did a few things. I wrote many many many new tests, either in old test files or
in the three new test files I made. I also did some code-keeping work, deleting
trailing whitespace and deleting vestigial code. Lastly, I fixed the parts of
the code which I realized were broken thru the process of running tests.

===============================================================================
 Deleted trailing whitespace:
===============================================================================
--\  mediagoblin/decorators.py
--\  mediagoblin/auth/tools.py
--\  mediagoblin/db/migrations.py
--\  mediagoblin/db/models.py
--\  mediagoblin/gmg_commands/users.py
--\  mediagoblin/moderation/forms.py
--\  mediagoblin/moderation/tools.py
--\  mediagoblin/moderation/views.py
--\  mediagoblin/templates/mediagoblin/moderation/media_panel.html
--\  mediagoblin/templates/mediagoblin/moderation/report.html
--\  mediagoblin/templates/mediagoblin/moderation/report_panel.html
--\  mediagoblin/templates/mediagoblin/moderation/user.html
--\  mediagoblin/templates/mediagoblin/moderation/user_panel.html
--\  mediagoblin/templates/mediagoblin/user_pages/report.html
--\  mediagoblin/templates/mediagoblin/utils/report.html
--\  mediagoblin/user_pages/lib.py
--\  mediagoblin/user_pages/views.py
===============================================================================
 Deleted Vestigial Code
===============================================================================
--\  mediagoblin/db/util.py
--\  mediagoblin/tests/test_notifications.py
===============================================================================
 Modified the Code:
===============================================================================
--\  mediagoblin/moderation/tools.py
--| Encapsulated the code around giving/taking away privileges into two
  | funtions.

--\  mediagoblin/moderation/views.py
--| Imported and used the give/take away privilege functions
--| Replaced 'require_admin_or_moderator_login' with
  |'user_has_privilege(u"admin")' for adding/taking away privileges, only
  | admins are allowed to do this.

--\  mediagoblin/templates/mediagoblin/banned.html
--| Added relevant translation tags
--| Added ability to display indefinite banning

--\  mediagoblin/templates/mediagoblin/user_pages/media.html
--| Made sure the add comments button was only visible for users with the
  | `commenter` privilege

--\  mediagoblin/tests/test_submission.py
--| Paroneayea fixed a DetachedInstanceError I was having with the our_user
  | function

--\  mediagoblin/tests/tools.py
--| Added a fixture_add_comment_report function for testing.

--\  mediagoblin/tools/response.py
--| Fixed a minor error where a necessary return statement was missing
--| Fit the code within 80 columns

--\  mediagoblin/user_pages/views.py
--| Added a necessary decorator to ensure that only users with the 'commenter'
  | privilege can post comments
===============================================================================
 Wrote new tests for an old test file:
===============================================================================
--\  mediagoblin/tests/test_auth.py
--| Added a new test to make sure privilege granting on registration happens
  | correctly

--\  mediagoblin/tests/test_modelmethods.py*
--| Added a test to ensure the User method has_privilege works properly
===============================================================================
 Wrote entirely new files full of tests:
===============================================================================
--\  mediagoblin/tests/test_moderation.py
--\  mediagoblin/tests/test_privileges.py
--\  mediagoblin/tests/test_reporting.py
===============================================================================
===============================================================================
NOTE: Any files I've marked with a * in this commit report, were actually subm-
itted in my last commit. I made that committ to fix an error I was having, so
they weren't properly documented in that report.
===============================================================================
===============================================================================
2013-08-29 13:47:50 -04:00
Rodney Ewing
3f59518463 pdf media_type now have their own config_spec.ini 2013-08-29 08:22:16 -07:00
Rodney Ewing
738cc49926 ascii media_type now have their own config_spec.ini 2013-08-29 08:22:16 -07:00
Rodney Ewing
9ff68c224e audio media_type now have their own config_spec.ini 2013-08-29 08:22:16 -07:00
Rodney Ewing
9a6741d7bf video media_type now have their own config_spec.ini 2013-08-29 08:22:16 -07:00
Rodney Ewing
93874d0a66 image media_type now have their own config_spec.ini 2013-08-29 08:22:16 -07:00
Christopher Allan Webber
6a01fafc98 Explicitly require a newer celery 2013-08-29 09:36:34 -05:00
Aditi
dc56835a79 Add function get_all_blog_posts_of_blog. 2013-08-29 10:35:53 +05:30
Aditi
b0802bc3b2 Resolve merge conflict. 2013-08-29 10:34:47 +05:30
Aditi
0b2ea4bb4f Refactor views using functions in lib file. 2013-08-28 23:42:35 +05:30
Aditi
3a971ef736 Change Url for blog post listing view. 2013-08-28 23:32:13 +05:30
Aditi
922599990d Pull changes and resolve merge conflict. 2013-08-28 23:28:09 +05:30
Christopher Allan Webber
b33feb18a7 Fix failing to build docs 2013-08-28 11:11:41 -05:00
Christopher Allan Webber
9dfca6b3ce double colon here was killing the build 2013-08-28 11:06:07 -05:00
Christopher Allan Webber
7904402750 Should fix Beuc's bug with video thumbnail width... I think! 2013-08-28 09:15:47 -05:00
Rodney Ewing
a126ef4d89 0.5.0 release notes 2013-08-27 14:24:24 -07:00
Christopher Allan Webber
fea0e4e4ea Committing extracted and compiled translations 2013-08-26 17:39:53 -05:00
Christopher Allan Webber
85572ade58 Committing present MediaGoblin translations before pushing extracted messages 2013-08-26 17:38:50 -05:00
Christopher Allan Webber
1847a482c1 Fixing another typo, thanks to Laura Arjona (again!) 2013-08-26 17:35:54 -05:00
Christopher Allan Webber
6db375b522 Fixing typo. Thanks larjona! 2013-08-26 17:28:51 -05:00
Christopher Allan Webber
3b8251f329 Switch docs back over to using old virtualenv setup while we resolve issue #755 2013-08-26 15:50:47 -05:00
Christopher Allan Webber
567c09f02c Committing extracted and compiled translations 2013-08-26 14:19:44 -05:00
Christopher Allan Webber
3bc2bb1bc7 Committing present MediaGoblin translations before pushing extracted messages 2013-08-26 14:18:04 -05:00
Christopher Allan Webber
e9e57e144e transifex.net->transifex.com 2013-08-26 14:17:34 -05:00
Rodney Ewing
0b95003cd4 use media.get_uploader and fix typo 2013-08-26 06:33:30 -07:00
Rodney Ewing
2188925bab javascript limit validation 2013-08-26 06:33:30 -07:00
Rodney Ewing
a80ea74702 fix after rebase 2013-08-26 06:33:30 -07:00