4190 Commits

Author SHA1 Message Date
Aditi Mittal
291ae79833 Add buton to create a blog. 2013-09-15 14:24:44 +05:30
Christopher Allan Webber
1fef79f4f8 Fix pagination for certain request.GET data
This didn't work at all nicely with MultiDict objects in various
circumstances and could possibly break pagination.  This fix handles
that!

This commit sponsored by Alessandro Francolini.  Thank you!
2013-09-13 10:16:07 -05:00
tilly-Q
045fe0ee9d Merge branch 'master' into OPW-Moderation-Update
Conflicts:
	mediagoblin/db/migrations.py
2013-09-12 18:58:04 -04:00
tilly-Q
a02831687a In this next small update, I made a few changes to protect against XXS attacks
in the moderation panel.
2013-09-12 18:16:25 -04:00
tilly-Q
c906887025 In this commit, I'm deleting the ArchivedReports object, at paroneyea's recom-
-mendation. Instead, all of its functionality will be in the ReportBase object.
2013-09-11 17:09:21 -04:00
tilly-Q
6acf4ee60e This should be my final code update before I am ready for review! Basically, in
this update I finished the search/sort function on the Reports Panel. I also
finished the Terms of Service and made the decision to remove the meta portion
of the site I had planned to create. I decided that the features involved were
just unnecessary at this point. I also dropped the User status column and added
a migration to establish default privileges (and create the privilege foundat-
-ions. I fixed a few small errors that were left over as well, in the implemen-
tation and in the tests. Next, I just need to await code review and work on the
documentation for these new features. I also need to supervise a new merge to
master.

===============================================================================
    Dropped the vestigial 'status' column
===============================================================================
--\ mediagoblin/db/migrations.py
--\ mediagoblin/db/models.py
--| Also added in comments describing the current situation with the `is_admin`
  | and `email_verified` columns, where they are 100% vestigial but cannot be
  | dropped.

===============================================================================
            Wrote necessary migrations to set up Privilege
    foundations and give users the necessary privileges on an older
     implementation of mediagoblin that is migrating into this update
===============================================================================
--\ mediagoblin/db/migrations.py

===============================================================================
    Deleted the meta pages
===============================================================================
--\ Deleted mediagoblin/meta/__init__.py
--\ Deleted mediagoblin/meta/routing.py
--\ Deleted mediagoblin/meta/views.py
--\ Deleted mediagoblin/templates/mediagoblin/meta/code_of_conduct.html
--\ Deleted mediagoblin/templates/mediagoblin/meta/reports_details.html
--\ Deleted mediagoblin/templates/mediagoblin/meta/reports_panel.html
    ----------------------------------------------------------------
        Moved the terms of service to /terms_of_service
    ----------------------------------------------------------------
    --\ Moved mediagoblin/templates/mediagoblin/meta/terms_of_service.html
        -> mediagoblin/templates/mediagoblin/terms_of_service.html
    --| I decided that terms of service were really the only necessary part of my
      | planned "meta" pages, so I moved it instead to its own singular page
    --\ mediagoblin/routing.py
    --\ mediagoblin/static/css/base.css
    --\ mediagoblin/templates/mediagoblin/base.html
    --\ mediagoblin/views.py

===============================================================================
          Simplified & Finished the Reports Panel Searching
===============================================================================
--\ mediagoblin/moderation/forms.py
--\ mediagoblin/moderation/tools.py
--\ mediagoblin/moderation/views.py
--\ mediagoblin/templates/mediagoblin/moderation/report_panel.html
--\ mediagoblin/templates/mediagoblin/moderation/user.html

===============================================================================
                  Fixed Small Errors
===============================================================================
--\ mediagoblin/templates/mediagoblin/user_pages/user.html
--\ mediagoblin/tests/test_moderation.py
--\ mediagoblin/tests/tools.py

===============================================================================
2013-09-10 13:17:07 -04:00
Aditi Mittal
728516261a Merge branch 'master' of git://gitorious.org/mediagoblin/mediagoblin 2013-09-09 21:53:56 +05:30
Aditi Mittal
5d9ecb05dd Add ConfirmDeleteForm and URL mapping for blog_delete view 2013-09-09 21:52:00 +05:30
Aditi Mittal
4aa7058e48 Write view function for blog deletion 2013-09-09 21:49:44 +05:30
Aditi Mittal
caeab88f88 Write code for deleting a blog 2013-09-09 21:48:02 +05:30
Aditi Mittal
3357b8a3b5 Write template for confirmation for blog deletion and add blog delete button on blog dashboard. 2013-09-09 21:46:23 +05:30
Christopher Allan Webber
66cafc3b74 Support python 2.6 again! Thanks to julianoliver for catching this.
This commit sponsored by Sam Clegg.  Thank you!
2013-09-09 10:06:59 -05:00
tilly-Q
25625107b6 This was a quick update, I mostly worked on the transition from using the old
User table columns (is_admin, status, email_verified) and making sure that
their functionality is instead completely handled by privileges. I also worked
on the meta pages which I hope to finish soon. I set up migrations to ensure
the default privileges are given to users that should have them. Lastly, I made
it so that banned users can log out.

===============================================================================
    Made Sure the Vestigial Columns of the User Table were not being Used
===============================================================================
--\ mediagoblin/auth/views.py
--\ mediagoblin/db/models.py
--\ mediagoblin/templates/mediagoblin/base.html
--\ mediagoblin/templates/mediagoblin/moderation/user.html
--\ mediagoblin/templates/mediagoblin/user_pages/collection_lis$
--\ mediagoblin/templates/mediagoblin/user_pages/user.html
--\ mediagoblin/tests/test_auth.py
--\ mediagoblin/tests/test_persona.py
--\ mediagoblin/user_pages/views.py

===============================================================================
    Wrote the Migrations to Set up the Default Privileges
===============================================================================
--\ mediagoblin/db/migrations.py
--\ mediagoblin/gmg_commands/users.py

===============================================================================
    Work on the Meta Pages
===============================================================================
--\ mediagoblin/meta/routing.py
--\ mediagoblin/meta/views.py
--\ mediagoblin/static/css/base.css
--\ mediagoblin/templates/mediagoblin/meta/terms_of_service.html

===============================================================================
    Small Changes
===============================================================================
--\ mediagoblin/templates/mediagoblin/base.html
--| Benevolently made it so that banned users can log out

===============================================================================
X   X   X   X   X   X   X   X   X   X   X   X   X   X   X   X   X   X   X   X
===============================================================================
2013-09-08 18:26:37 -04:00
Aditi Mittal
125d7d1a85 Get max_blog_count variable from config_spec.ini file using pluginapi config. 2013-09-08 02:28:48 +05:30
Aditi Mittal
ae71a3a1d6 Reindentation 2013-09-07 13:45:27 +05:30
Aditi Mittal
414c25c5a4 Add user to invidual blog dashboard context. 2013-09-07 13:44:27 +05:30
Aditi Mittal
5278c6dd80 Correct template syntax error. 2013-09-07 13:13:08 +05:30
Aditi Mittal
a6a7d785b2 Put buttons for blog create and blog dashboard on view using template_hooks for blog plugin not to be interfering with original code. 2013-09-07 13:11:14 +05:30
Aditi Mittal
4226743ad6 Capitalize first letter of tags 2013-09-07 12:08:36 +05:30
Aditi Mittal
1ff86c03a6 Write on the template when there is no blog for the user. 2013-09-07 12:06:35 +05:30
Aditi Mittal
cc37c8f8f9 Amend blog_dashboard view for accomodating all conditions. 2013-09-07 12:01:27 +05:30
Aditi Mittal
5961431097 Remove condition of being logged in to view blog dashboard. 2013-09-07 11:35:05 +05:30
Aditi Mittal
9ad6454e17 Insert URL to blog in a user's profile page by spaetz 2013-09-07 11:33:10 +05:30
Rodney Ewing
0485e9c892 typo. conversions not convirsions
thanks to saul for pointing this out.
2013-09-06 14:28:40 -07:00
Aditi Mittal
dffff64a26 Add tags for every post on blog post listing page. 2013-09-06 18:54:29 +05:30
Aditi Mittal
f242807518 Merge branch 'master' of git://gitorious.org/mediagoblin/mediagoblin 2013-09-05 22:45:10 +05:30
Aditi Mittal
1d9d9f1c9a Make changes for displaying page listing all the blogs created by user. 2013-09-05 22:21:00 +05:30
Aditi Mittal
c37e528329 Add blog dashboard button. 2013-09-05 22:19:46 +05:30
Rodney Ewing
85cf52f865 reword persona edit link 2013-09-05 09:04:23 -07:00
Aditi Mittal
377800e779 Add url for viewing page which lists all blogs created by a user. 2013-09-05 21:22:15 +05:30
Aditi Mittal
af07925de6 Created a template for viewing all blogs by a user. 2013-09-05 21:20:29 +05:30
Christopher Allan Webber
5a756fb819 Revert "Temporarily switching git:// to http://"
This reverts commit 18922af5830f4a7686ec3b3ff11dc309a5a9cca6.
2013-09-05 09:51:22 -05:00
Christopher Allan Webber
18922af583 Temporarily switching git:// to http:// 2013-09-05 09:37:08 -05:00
Christopher Allan Webber
936624c362 In the v0.6.0 cycle now 2013-09-05 09:34:48 -05:00
Christopher Allan Webber
612469595b MediaGoblin v0.5.0! 2013-09-04 16:25:12 -05:00
Christopher Allan Webber
a25adfc424 Committing extracted and compiled translations 2013-09-04 16:07:37 -05:00
Christopher Allan Webber
07b02d2bc2 Committing present MediaGoblin translations before pushing extracted messages 2013-09-04 16:07:12 -05:00
Christopher Allan Webber
b299b6b7b8 Committing extracted and compiled translations 2013-09-04 16:03:57 -05:00
Christopher Allan Webber
577e8fc705 Committing present MediaGoblin translations before pushing extracted messages 2013-09-04 16:02:48 -05:00
Christopher Allan Webber
5738838e93 Fixing tyop. Thanks for catching, tryggvib :) 2013-09-04 16:01:21 -05:00
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