From: Aleksander Łukasz Date: Tue, 13 Aug 2013 10:52:53 +0000 (+0200) Subject: Merge branch 'master' into forum X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/32ac950fc8d6ba7ef7ec4bf1c4b05f2ed25b02fd?hp=6585e1a054f95d439e8dc8b7216eb25193dc9d20 Merge branch 'master' into forum --- diff --git a/edumed/forms.py b/edumed/forms.py new file mode 100755 index 0000000..554779f --- /dev/null +++ b/edumed/forms.py @@ -0,0 +1,17 @@ +from django import forms +from django.utils.translation import ugettext_lazy as _ +from pybb.forms import EditProfileForm +from pybb import util + + +class AvatarlessEditProfileForm(EditProfileForm): + signature = forms.CharField( + widget=forms.Textarea(attrs={'rows': 2, 'cols:': 60}), + required=False, + label = _('Signature') + ) + + class Meta: + model = util.get_pybb_profile_model() + fields = ['signature', 'time_zone', 'language', + 'show_signatures'] diff --git a/edumed/forum.py b/edumed/forum.py new file mode 100755 index 0000000..8d52680 --- /dev/null +++ b/edumed/forum.py @@ -0,0 +1,7 @@ +from pybb.permissions import DefaultPermissionHandler + + +class ForumPermissionHandler(DefaultPermissionHandler): + def may_post_as_admin(self, user): + """ return True if `user` may post as admin """ + return False diff --git a/edumed/locale-contrib/django.pot b/edumed/locale-contrib/django.pot new file mode 100644 index 0000000..c231cd9 --- /dev/null +++ b/edumed/locale-contrib/django.pot @@ -0,0 +1,715 @@ +# Translations template for PROJECT. +# Copyright (C) 2013 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# FIRST AUTHOR , 2013. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2013-08-09 11:40+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 1.3\n" + +#: pybb/admin.py:40 +#: pybb/admin.py:66 +#: pybb/admin.py:94 +#: pybb/admin.py:116 +msgid "Additional options" +msgstr "" + +#: pybb/admin.py:99 +#: pybb/models.py:254 +msgid "Message" +msgstr "" + +#: pybb/admin.py:130 +msgid "View post" +msgstr "" + +#: pybb/admin.py:135 +msgid "Edit post" +msgstr "" + +#: pybb/feeds.py:25 +#: pybb/feeds.py:26 +#: pybb/templates/pybb/base.html:12 +msgid "Latest posts on forum" +msgstr "" + +#: pybb/feeds.py:35 +#: pybb/feeds.py:36 +#: pybb/templates/pybb/base.html:13 +msgid "Latest topics on forum" +msgstr "" + +#: pybb/forms.py:27 +msgid "Attachment is too big" +msgstr "" + +#: pybb/forms.py:47 +#, python-format +msgid "You cant add more than %s answers for poll" +msgstr "" + +#: pybb/forms.py:49 +msgid "Add two or more answers for this poll" +msgstr "" + +#: pybb/forms.py:109 +msgid "Polls question is required when adding a poll" +msgstr "" + +#: pybb/forms.py:192 +#, python-format +msgid "Avatar is too large, max size: %s bytes" +msgstr "" + +#: pybb/models.py:68 +#: pybb/models.py:99 +msgid "Name" +msgstr "" + +#: pybb/models.py:69 +#: pybb/models.py:100 +msgid "Position" +msgstr "" + +#: pybb/models.py:70 +#: pybb/models.py:106 +#: pybb/templates/pybb/category.html:5 +#: pybb/templates/pybb/category.html:28 +msgid "Hidden" +msgstr "" + +#: pybb/models.py:71 +msgid "If checked, this category will be visible only for staff" +msgstr "" + +#: pybb/models.py:76 +#: pybb/models.py:98 +msgid "Category" +msgstr "" + +#: pybb/models.py:77 +msgid "Categories" +msgstr "" + +#: pybb/models.py:101 +msgid "Description" +msgstr "" + +#: pybb/models.py:102 +msgid "Moderators" +msgstr "" + +#: pybb/models.py:103 +#: pybb/models.py:165 +#: pybb/models.py:270 +msgid "Updated" +msgstr "" + +#: pybb/models.py:104 +#: pybb/models.py:172 +#: pybb/models.py:357 +msgid "Post count" +msgstr "" + +#: pybb/models.py:105 +msgid "Topic count" +msgstr "" + +#: pybb/models.py:108 +msgid "Headline" +msgstr "" + +#: pybb/models.py:112 +#: pybb/models.py:162 +#: pybb/templates/pybb/category.html:10 +msgid "Forum" +msgstr "" + +#: pybb/models.py:113 +msgid "Forums" +msgstr "" + +#: pybb/models.py:157 +msgid "None" +msgstr "" + +#: pybb/models.py:158 +msgid "Single answer" +msgstr "" + +#: pybb/models.py:159 +msgid "Multiple answers" +msgstr "" + +#: pybb/models.py:163 +msgid "Subject" +msgstr "" + +#: pybb/models.py:164 +#: pybb/models.py:269 +msgid "Created" +msgstr "" + +#: pybb/models.py:166 +#: pybb/models.py:268 +#: pybb/models.py:381 +#: pybb/models.py:512 +#: pybb/templates/pybb/mail_templates/subscription_email_body.html:3 +msgid "User" +msgstr "" + +#: pybb/models.py:167 +msgid "Views count" +msgstr "" + +#: pybb/models.py:168 +#: pybb/templates/pybb/topic_list.html:27 +msgid "Sticky" +msgstr "" + +#: pybb/models.py:169 +#: pybb/templates/pybb/topic_list.html:28 +msgid "Closed" +msgstr "" + +#: pybb/models.py:170 +#: pybb/templates/pybb/topic.html:92 +msgid "Subscribers" +msgstr "" + +#: pybb/models.py:174 +#: pybb/models.py:272 +msgid "On moderation" +msgstr "" + +#: pybb/models.py:175 +msgid "Poll type" +msgstr "" + +#: pybb/models.py:176 +msgid "Poll question" +msgstr "" + +#: pybb/models.py:180 +#: pybb/models.py:267 +#: pybb/models.py:489 +#: pybb/templates/pybb/topic_list.html:7 +msgid "Topic" +msgstr "" + +#: pybb/models.py:181 +#: pybb/templates/pybb/category.html:13 +msgid "Topics" +msgstr "" + +#: pybb/models.py:255 +msgid "HTML version" +msgstr "" + +#: pybb/models.py:256 +msgid "Text version" +msgstr "" + +#: pybb/models.py:271 +msgid "User IP" +msgstr "" + +#: pybb/models.py:276 +#: pybb/models.py:397 +msgid "Post" +msgstr "" + +#: pybb/models.py:277 +#: pybb/templates/pybb/category.html:16 +#: pybb/templates/pybb/topic_list.html:10 +msgid "Posts" +msgstr "" + +#: pybb/models.py:346 +msgid "Signature" +msgstr "" + +#: pybb/models.py:348 +msgid "Signature HTML Version" +msgstr "" + +#: pybb/models.py:350 +msgid "Time zone" +msgstr "" + +#: pybb/models.py:352 +msgid "Language" +msgstr "" + +#: pybb/models.py:355 +msgid "Show signatures" +msgstr "" + +#: pybb/models.py:358 +msgid "Avatar" +msgstr "" + +#: pybb/models.py:360 +msgid "Automatically subscribe" +msgstr "" + +#: pybb/models.py:361 +msgid "Automatically subscribe to topics that you answer" +msgstr "" + +#: pybb/models.py:384 +msgid "Profile" +msgstr "" + +#: pybb/models.py:385 +msgid "Profiles" +msgstr "" + +#: pybb/models.py:394 +#: pybb/templates/pybb/post_template.html:73 +msgid "Attachment" +msgstr "" + +#: pybb/models.py:395 +msgid "Attachments" +msgstr "" + +#: pybb/models.py:398 +msgid "Size" +msgstr "" + +#: pybb/models.py:399 +msgid "File" +msgstr "" + +#: pybb/models.py:447 +msgid "Topic read tracker" +msgstr "" + +#: pybb/models.py:448 +msgid "Topic read trackers" +msgstr "" + +#: pybb/models.py:483 +msgid "Forum read tracker" +msgstr "" + +#: pybb/models.py:484 +msgid "Forum read trackers" +msgstr "" + +#: pybb/models.py:490 +msgid "Text" +msgstr "" + +#: pybb/models.py:493 +#: pybb/models.py:511 +msgid "Poll answer" +msgstr "" + +#: pybb/models.py:494 +msgid "Polls answers" +msgstr "" + +#: pybb/models.py:516 +msgid "Poll answer user" +msgstr "" + +#: pybb/models.py:517 +msgid "Polls answers users" +msgstr "" + +#: pybb/util.py:58 +msgid "Can't get profile for anonymous user" +msgstr "" + +#: pybb/views.py:648 +msgid "All forums marked as read" +msgstr "" + +#: pybb/views.py:668 +msgid "User successfuly blocked" +msgstr "" + +#: pybb/templates/pybb/_button_new_topic.html:2 +#: pybb/templates/pybb/add_post.html:24 +msgid "New topic" +msgstr "" + +#: pybb/templates/pybb/_button_save.html:1 +msgid "Save" +msgstr "" + +#: pybb/templates/pybb/_button_submit.html:1 +msgid "Submit" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:15 +msgid "Bold" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:16 +msgid "Italic" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:17 +msgid "Underline" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:18 +msgid "Stroke" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:20 +msgid "Picture" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:21 +msgid "Link" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:23 +msgid "Bulleted list" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:24 +msgid "Numeric list" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:25 +msgid "List item" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:27 +msgid "Quotes" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:28 +msgid "Code" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:30 +msgid "Clean" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:31 +msgid "Preview" +msgstr "" + +#: pybb/templates/pybb/_need_to_login_message.html:3 +msgid "Register" +msgstr "" + +#: pybb/templates/pybb/_need_to_login_message.html:3 +msgid "or" +msgstr "" + +#: pybb/templates/pybb/_need_to_login_message.html:3 +msgid "login" +msgstr "" + +#: pybb/templates/pybb/_need_to_login_message.html:3 +msgid "to create to post a reply" +msgstr "" + +#: pybb/templates/pybb/add_post.html:24 +msgid "New reply" +msgstr "" + +#: pybb/templates/pybb/attachments_formset.html:4 +msgid "Add attachments" +msgstr "" + +#: pybb/templates/pybb/attachments_formset.html:10 +#: pybb/templates/pybb/edit_profile.html:27 +msgid "delete" +msgstr "" + +#: pybb/templates/pybb/breadcrumb.html:5 +msgid "Home" +msgstr "" + +#: pybb/templates/pybb/category.html:19 +msgid "Last posts" +msgstr "" + +#: pybb/templates/pybb/category.html:44 +msgid "No forums created" +msgstr "" + +#: pybb/templates/pybb/category.html:45 +msgid "Add forum now" +msgstr "" + +#: pybb/templates/pybb/delete_post.html:5 +msgid "Are you sure you want to delete this message?" +msgstr "" + +#: pybb/templates/pybb/delete_post.html:12 +msgid "No, take me back" +msgstr "" + +#: pybb/templates/pybb/delete_post.html:13 +msgid "Yes, I am sure" +msgstr "" + +#: pybb/templates/pybb/edit_post.html:4 +#: pybb/templates/pybb/edit_post.html:13 +msgid "Editing the post" +msgstr "" + +#: pybb/templates/pybb/edit_profile.html:7 +#: pybb/templates/pybb/edit_profile.html:10 +#: pybb/templates/pybb/edit_profile.html:15 +msgid "Profile editing" +msgstr "" + +#: pybb/templates/pybb/edit_profile.html:20 +msgid "Subscriptions on topics" +msgstr "" + +#: pybb/templates/pybb/index.html:19 +msgid "Forum categories are not created" +msgstr "" + +#: pybb/templates/pybb/index.html:20 +msgid "Add a category now" +msgstr "" + +#: pybb/templates/pybb/index.html:25 +#: pybb/templates/pybb/latest_topics.html:7 +#: pybb/templates/pybb/latest_topics.html:17 +msgid "Last updates in topics" +msgstr "" + +#: pybb/templates/pybb/index.html:28 +msgid "Mark all forums as read" +msgstr "" + +#: pybb/templates/pybb/latest_topics.html:10 +msgid "\"Last updates in topics\"" +msgstr "" + +#: pybb/templates/pybb/latest_topics.html:33 +msgid "Mark all topics as read" +msgstr "" + +#: pybb/templates/pybb/pagination.html:7 +msgid "previous page" +msgstr "" + +#: pybb/templates/pybb/pagination.html:21 +msgid "next page" +msgstr "" + +#: pybb/templates/pybb/poll.html:5 +msgid "Poll" +msgstr "" + +#: pybb/templates/pybb/poll.html:37 +msgid "'Cancel my poll vote'" +msgstr "" + +#: pybb/templates/pybb/poll_edit_form.html:7 +msgid "Poll answers" +msgstr "" + +#: pybb/templates/pybb/poll_edit_form.html:20 +msgid "remove answer" +msgstr "" + +#: pybb/templates/pybb/poll_edit_form.html:21 +msgid "add answer" +msgstr "" + +#: pybb/templates/pybb/post_template.html:25 +msgid "Rank" +msgstr "" + +#: pybb/templates/pybb/post_template.html:38 +#: pybb/templates/pybb/user.html:41 +msgid "Edit" +msgstr "" + +#: pybb/templates/pybb/post_template.html:42 +msgid "Delete post?" +msgstr "" + +#: pybb/templates/pybb/post_template.html:43 +msgid "Delete" +msgstr "" + +#: pybb/templates/pybb/post_template.html:45 +msgid "Approve post" +msgstr "" + +#: pybb/templates/pybb/post_template.html:50 +#: pybb/templates/pybb/topic.html:63 +msgid "Admin" +msgstr "" + +#: pybb/templates/pybb/post_template.html:66 +msgid "Edited" +msgstr "" + +#: pybb/templates/pybb/post_template.html:78 +msgid "quote" +msgstr "" + +#: pybb/templates/pybb/topic.html:24 +#: pybb/templates/pybb/topic.html:44 +#: pybb/templates/pybb/user_posts.html:8 +msgid "'Posts'" +msgstr "" + +#: pybb/templates/pybb/topic.html:52 +msgid "Unstick topic" +msgstr "" + +#: pybb/templates/pybb/topic.html:54 +msgid "Stick topic" +msgstr "" + +#: pybb/templates/pybb/topic.html:58 +msgid "Open topic" +msgstr "" + +#: pybb/templates/pybb/topic.html:60 +msgid "Close topic" +msgstr "" + +#: pybb/templates/pybb/topic.html:66 +msgid "Merge topics" +msgstr "" + +#: pybb/templates/pybb/topic.html:71 +msgid "Unsubscribe" +msgstr "" + +#: pybb/templates/pybb/topic.html:73 +msgid "Subscribe" +msgstr "" + +#: pybb/templates/pybb/topic_list.html:13 +msgid "Views" +msgstr "" + +#: pybb/templates/pybb/topic_list.html:16 +msgid "Last post" +msgstr "" + +#: pybb/templates/pybb/topic_list.html:26 +msgid "Go to first unread post" +msgstr "" + +#: pybb/templates/pybb/topic_list.html:32 +msgid "pages" +msgstr "" + +#: pybb/templates/pybb/user.html:15 +msgid "Statistics" +msgstr "" + +#: pybb/templates/pybb/user.html:18 +msgid "Number of topics" +msgstr "" + +#: pybb/templates/pybb/user.html:24 +msgid "Number of posts" +msgstr "" + +#: pybb/templates/pybb/user.html:28 +msgid "Date of registration" +msgstr "" + +#: pybb/templates/pybb/user.html:35 +msgid "Block" +msgstr "" + +#: pybb/templates/pybb/user.html:36 +msgid "Block and delete all messages" +msgstr "" + +#: pybb/templates/pybb/user_posts.html:13 +msgid "All posts created by" +msgstr "" + +#: pybb/templates/pybb/user_topics.html:8 +msgid "'Topics'" +msgstr "" + +#: pybb/templates/pybb/user_topics.html:11 +#: pybb/templates/pybb/user_topics.html:15 +msgid "All topics created by" +msgstr "" + +#: pybb/templates/pybb/users.html:8 +msgid "Users" +msgstr "" + +#: pybb/templates/pybb/users.html:12 +msgid "Search" +msgstr "" + +#: pybb/templates/pybb/users.html:24 +msgid "'Users'" +msgstr "" + +#: pybb/templates/pybb/mail_templates/subscription_email_body.html:3 +msgid "replied in topic to which you are subscribed." +msgstr "" + +#: pybb/templates/pybb/mail_templates/subscription_email_body.html:4 +msgid "Link to post:" +msgstr "" + +#: pybb/templates/pybb/mail_templates/subscription_email_body.html:5 +msgid "Link to topic:" +msgstr "" + +#: pybb/templates/pybb/mail_templates/subscription_email_body.html:8 +msgid "" +"If you don't want to recive notifications on new messages in this topic " +"visit following link:" +msgstr "" + +#: pybb/templates/pybb/mail_templates/subscription_email_subject.html:2 +msgid "New answer in topic that you subscribed." +msgstr "" + +#: pybb/templatetags/pybb_tags.py:61 +msgid "seconds ago,seconds ago,seconds ago" +msgstr "" + +#: pybb/templatetags/pybb_tags.py:64 +msgid "seconds ago" +msgstr "" + +#: pybb/templatetags/pybb_tags.py:70 +msgid "minutes ago,minutes ago,minutes ago" +msgstr "" + +#: pybb/templatetags/pybb_tags.py:73 +msgid "minutes ago" +msgstr "" + +#: pybb/templatetags/pybb_tags.py:83 +#, python-format +msgid "today, %s" +msgstr "" + +#: pybb/templatetags/pybb_tags.py:85 +#, python-format +msgid "yesterday, %s" +msgstr "" + diff --git a/edumed/locale-contrib/pl/LC_MESSAGES/django.mo b/edumed/locale-contrib/pl/LC_MESSAGES/django.mo new file mode 100644 index 0000000..357fb92 Binary files /dev/null and b/edumed/locale-contrib/pl/LC_MESSAGES/django.mo differ diff --git a/edumed/locale-contrib/pl/LC_MESSAGES/django.po b/edumed/locale-contrib/pl/LC_MESSAGES/django.po new file mode 100644 index 0000000..d2ebeb0 --- /dev/null +++ b/edumed/locale-contrib/pl/LC_MESSAGES/django.po @@ -0,0 +1,677 @@ +# Polish translations for PROJECT. +# Copyright (C) 2013 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2013-08-09 11:40+0200\n" +"PO-Revision-Date: 2013-08-09 12:17+0100\n" +"Last-Translator: Radek Czajka \n" +"Language-Team: pl \n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 1.3\n" +"X-Generator: Poedit 1.5.4\n" + +#: pybb/admin.py:40 pybb/admin.py:66 pybb/admin.py:94 pybb/admin.py:116 +msgid "Additional options" +msgstr "" + +#: pybb/admin.py:99 pybb/models.py:254 +msgid "Message" +msgstr "" + +#: pybb/admin.py:130 +msgid "View post" +msgstr "" + +#: pybb/admin.py:135 +msgid "Edit post" +msgstr "" + +#: pybb/feeds.py:25 pybb/feeds.py:26 pybb/templates/pybb/base.html:12 +msgid "Latest posts on forum" +msgstr "" + +#: pybb/feeds.py:35 pybb/feeds.py:36 pybb/templates/pybb/base.html:13 +msgid "Latest topics on forum" +msgstr "" + +#: pybb/forms.py:27 +msgid "Attachment is too big" +msgstr "" + +#: pybb/forms.py:47 +#, python-format +msgid "You cant add more than %s answers for poll" +msgstr "" + +#: pybb/forms.py:49 +msgid "Add two or more answers for this poll" +msgstr "" + +#: pybb/forms.py:109 +msgid "Polls question is required when adding a poll" +msgstr "" + +#: pybb/forms.py:192 +#, python-format +msgid "Avatar is too large, max size: %s bytes" +msgstr "" + +#: pybb/models.py:68 pybb/models.py:99 +msgid "Name" +msgstr "" + +#: pybb/models.py:69 pybb/models.py:100 +msgid "Position" +msgstr "" + +#: pybb/models.py:70 pybb/models.py:106 pybb/templates/pybb/category.html:5 +#: pybb/templates/pybb/category.html:28 +msgid "Hidden" +msgstr "" + +#: pybb/models.py:71 +msgid "If checked, this category will be visible only for staff" +msgstr "" + +#: pybb/models.py:76 pybb/models.py:98 +msgid "Category" +msgstr "" + +#: pybb/models.py:77 +msgid "Categories" +msgstr "" + +#: pybb/models.py:101 +msgid "Description" +msgstr "" + +#: pybb/models.py:102 +msgid "Moderators" +msgstr "" + +#: pybb/models.py:103 pybb/models.py:165 pybb/models.py:270 +msgid "Updated" +msgstr "" + +#: pybb/models.py:104 pybb/models.py:172 pybb/models.py:357 +msgid "Post count" +msgstr "" + +#: pybb/models.py:105 +msgid "Topic count" +msgstr "" + +#: pybb/models.py:108 +msgid "Headline" +msgstr "" + +#: pybb/models.py:112 pybb/models.py:162 pybb/templates/pybb/category.html:10 +msgid "Forum" +msgstr "" + +#: pybb/models.py:113 +msgid "Forums" +msgstr "" + +#: pybb/models.py:157 +msgid "None" +msgstr "" + +#: pybb/models.py:158 +msgid "Single answer" +msgstr "" + +#: pybb/models.py:159 +msgid "Multiple answers" +msgstr "" + +#: pybb/models.py:163 +msgid "Subject" +msgstr "" + +#: pybb/models.py:164 pybb/models.py:269 +msgid "Created" +msgstr "" + +#: pybb/models.py:166 pybb/models.py:268 pybb/models.py:381 pybb/models.py:512 +#: pybb/templates/pybb/mail_templates/subscription_email_body.html:3 +msgid "User" +msgstr "" + +#: pybb/models.py:167 +msgid "Views count" +msgstr "" + +#: pybb/models.py:168 pybb/templates/pybb/topic_list.html:27 +msgid "Sticky" +msgstr "" + +#: pybb/models.py:169 pybb/templates/pybb/topic_list.html:28 +msgid "Closed" +msgstr "" + +#: pybb/models.py:170 pybb/templates/pybb/topic.html:92 +msgid "Subscribers" +msgstr "" + +#: pybb/models.py:174 pybb/models.py:272 +msgid "On moderation" +msgstr "" + +#: pybb/models.py:175 +msgid "Poll type" +msgstr "" + +#: pybb/models.py:176 +msgid "Poll question" +msgstr "" + +#: pybb/models.py:180 pybb/models.py:267 pybb/models.py:489 +#: pybb/templates/pybb/topic_list.html:7 +msgid "Topic" +msgstr "" + +#: pybb/models.py:181 pybb/templates/pybb/category.html:13 +msgid "Topics" +msgstr "" + +#: pybb/models.py:255 +msgid "HTML version" +msgstr "" + +#: pybb/models.py:256 +msgid "Text version" +msgstr "" + +#: pybb/models.py:271 +msgid "User IP" +msgstr "" + +#: pybb/models.py:276 pybb/models.py:397 +msgid "Post" +msgstr "" + +#: pybb/models.py:277 pybb/templates/pybb/category.html:16 +#: pybb/templates/pybb/topic_list.html:10 +msgid "Posts" +msgstr "" + +#: pybb/models.py:346 +msgid "Signature" +msgstr "Podpis" + +#: pybb/models.py:348 +msgid "Signature HTML Version" +msgstr "" + +#: pybb/models.py:350 +msgid "Time zone" +msgstr "" + +#: pybb/models.py:352 +msgid "Language" +msgstr "" + +#: pybb/models.py:355 +msgid "Show signatures" +msgstr "" + +#: pybb/models.py:358 +msgid "Avatar" +msgstr "" + +#: pybb/models.py:360 +msgid "Automatically subscribe" +msgstr "" + +#: pybb/models.py:361 +msgid "Automatically subscribe to topics that you answer" +msgstr "" + +#: pybb/models.py:384 +msgid "Profile" +msgstr "" + +#: pybb/models.py:385 +msgid "Profiles" +msgstr "" + +#: pybb/models.py:394 pybb/templates/pybb/post_template.html:73 +msgid "Attachment" +msgstr "" + +#: pybb/models.py:395 +msgid "Attachments" +msgstr "" + +#: pybb/models.py:398 +msgid "Size" +msgstr "" + +#: pybb/models.py:399 +msgid "File" +msgstr "" + +#: pybb/models.py:447 +msgid "Topic read tracker" +msgstr "" + +#: pybb/models.py:448 +msgid "Topic read trackers" +msgstr "" + +#: pybb/models.py:483 +msgid "Forum read tracker" +msgstr "" + +#: pybb/models.py:484 +msgid "Forum read trackers" +msgstr "" + +#: pybb/models.py:490 +msgid "Text" +msgstr "" + +#: pybb/models.py:493 pybb/models.py:511 +msgid "Poll answer" +msgstr "" + +#: pybb/models.py:494 +msgid "Polls answers" +msgstr "" + +#: pybb/models.py:516 +msgid "Poll answer user" +msgstr "" + +#: pybb/models.py:517 +msgid "Polls answers users" +msgstr "" + +#: pybb/util.py:58 +msgid "Can't get profile for anonymous user" +msgstr "" + +#: pybb/views.py:648 +msgid "All forums marked as read" +msgstr "" + +#: pybb/views.py:668 +msgid "User successfuly blocked" +msgstr "" + +#: pybb/templates/pybb/_button_new_topic.html:2 +#: pybb/templates/pybb/add_post.html:24 +msgid "New topic" +msgstr "" + +#: pybb/templates/pybb/_button_save.html:1 +msgid "Save" +msgstr "" + +#: pybb/templates/pybb/_button_submit.html:1 +msgid "Submit" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:15 +msgid "Bold" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:16 +msgid "Italic" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:17 +msgid "Underline" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:18 +msgid "Stroke" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:20 +msgid "Picture" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:21 +msgid "Link" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:23 +msgid "Bulleted list" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:24 +msgid "Numeric list" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:25 +msgid "List item" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:27 +msgid "Quotes" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:28 +msgid "Code" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:30 +msgid "Clean" +msgstr "" + +#: pybb/templates/pybb/_markitup.html:31 +msgid "Preview" +msgstr "" + +#: pybb/templates/pybb/_need_to_login_message.html:3 +msgid "Register" +msgstr "" + +#: pybb/templates/pybb/_need_to_login_message.html:3 +msgid "or" +msgstr "" + +#: pybb/templates/pybb/_need_to_login_message.html:3 +msgid "login" +msgstr "" + +#: pybb/templates/pybb/_need_to_login_message.html:3 +msgid "to create to post a reply" +msgstr "" + +#: pybb/templates/pybb/add_post.html:24 +msgid "New reply" +msgstr "" + +#: pybb/templates/pybb/attachments_formset.html:4 +msgid "Add attachments" +msgstr "" + +#: pybb/templates/pybb/attachments_formset.html:10 +#: pybb/templates/pybb/edit_profile.html:27 +msgid "delete" +msgstr "" + +#: pybb/templates/pybb/breadcrumb.html:5 +msgid "Home" +msgstr "" + +#: pybb/templates/pybb/category.html:19 +msgid "Last posts" +msgstr "" + +#: pybb/templates/pybb/category.html:44 +msgid "No forums created" +msgstr "" + +#: pybb/templates/pybb/category.html:45 +msgid "Add forum now" +msgstr "" + +#: pybb/templates/pybb/delete_post.html:5 +msgid "Are you sure you want to delete this message?" +msgstr "" + +#: pybb/templates/pybb/delete_post.html:12 +msgid "No, take me back" +msgstr "" + +#: pybb/templates/pybb/delete_post.html:13 +msgid "Yes, I am sure" +msgstr "" + +#: pybb/templates/pybb/edit_post.html:4 pybb/templates/pybb/edit_post.html:13 +msgid "Editing the post" +msgstr "" + +#: pybb/templates/pybb/edit_profile.html:7 +#: pybb/templates/pybb/edit_profile.html:10 +#: pybb/templates/pybb/edit_profile.html:15 +msgid "Profile editing" +msgstr "" + +#: pybb/templates/pybb/edit_profile.html:20 +msgid "Subscriptions on topics" +msgstr "" + +#: pybb/templates/pybb/index.html:19 +msgid "Forum categories are not created" +msgstr "" + +#: pybb/templates/pybb/index.html:20 +msgid "Add a category now" +msgstr "" + +#: pybb/templates/pybb/index.html:25 pybb/templates/pybb/latest_topics.html:7 +#: pybb/templates/pybb/latest_topics.html:17 +msgid "Last updates in topics" +msgstr "" + +#: pybb/templates/pybb/index.html:28 +msgid "Mark all forums as read" +msgstr "" + +#: pybb/templates/pybb/latest_topics.html:10 +msgid "\"Last updates in topics\"" +msgstr "" + +#: pybb/templates/pybb/latest_topics.html:33 +msgid "Mark all topics as read" +msgstr "" + +#: pybb/templates/pybb/pagination.html:7 +msgid "previous page" +msgstr "" + +#: pybb/templates/pybb/pagination.html:21 +msgid "next page" +msgstr "" + +#: pybb/templates/pybb/poll.html:5 +msgid "Poll" +msgstr "" + +#: pybb/templates/pybb/poll.html:37 +msgid "'Cancel my poll vote'" +msgstr "" + +#: pybb/templates/pybb/poll_edit_form.html:7 +msgid "Poll answers" +msgstr "" + +#: pybb/templates/pybb/poll_edit_form.html:20 +msgid "remove answer" +msgstr "" + +#: pybb/templates/pybb/poll_edit_form.html:21 +msgid "add answer" +msgstr "" + +#: pybb/templates/pybb/post_template.html:25 +msgid "Rank" +msgstr "" + +#: pybb/templates/pybb/post_template.html:38 pybb/templates/pybb/user.html:41 +msgid "Edit" +msgstr "" + +#: pybb/templates/pybb/post_template.html:42 +msgid "Delete post?" +msgstr "" + +#: pybb/templates/pybb/post_template.html:43 +msgid "Delete" +msgstr "" + +#: pybb/templates/pybb/post_template.html:45 +msgid "Approve post" +msgstr "" + +#: pybb/templates/pybb/post_template.html:50 pybb/templates/pybb/topic.html:63 +msgid "Admin" +msgstr "" + +#: pybb/templates/pybb/post_template.html:66 +msgid "Edited" +msgstr "" + +#: pybb/templates/pybb/post_template.html:78 +msgid "quote" +msgstr "" + +#: pybb/templates/pybb/topic.html:24 pybb/templates/pybb/topic.html:44 +#: pybb/templates/pybb/user_posts.html:8 +msgid "'Posts'" +msgstr "" + +#: pybb/templates/pybb/topic.html:52 +msgid "Unstick topic" +msgstr "" + +#: pybb/templates/pybb/topic.html:54 +msgid "Stick topic" +msgstr "" + +#: pybb/templates/pybb/topic.html:58 +msgid "Open topic" +msgstr "" + +#: pybb/templates/pybb/topic.html:60 +msgid "Close topic" +msgstr "" + +#: pybb/templates/pybb/topic.html:66 +msgid "Merge topics" +msgstr "" + +#: pybb/templates/pybb/topic.html:71 +msgid "Unsubscribe" +msgstr "" + +#: pybb/templates/pybb/topic.html:73 +msgid "Subscribe" +msgstr "" + +#: pybb/templates/pybb/topic_list.html:13 +msgid "Views" +msgstr "" + +#: pybb/templates/pybb/topic_list.html:16 +msgid "Last post" +msgstr "" + +#: pybb/templates/pybb/topic_list.html:26 +msgid "Go to first unread post" +msgstr "Zobacz pierwszy nieprzeczytany post" + +#: pybb/templates/pybb/topic_list.html:32 +msgid "pages" +msgstr "" + +#: pybb/templates/pybb/user.html:15 +msgid "Statistics" +msgstr "" + +#: pybb/templates/pybb/user.html:18 +msgid "Number of topics" +msgstr "" + +#: pybb/templates/pybb/user.html:24 +msgid "Number of posts" +msgstr "" + +#: pybb/templates/pybb/user.html:28 +msgid "Date of registration" +msgstr "" + +#: pybb/templates/pybb/user.html:35 +msgid "Block" +msgstr "" + +#: pybb/templates/pybb/user.html:36 +msgid "Block and delete all messages" +msgstr "" + +#: pybb/templates/pybb/user_posts.html:13 +msgid "All posts created by" +msgstr "" + +#: pybb/templates/pybb/user_topics.html:8 +msgid "'Topics'" +msgstr "" + +#: pybb/templates/pybb/user_topics.html:11 +#: pybb/templates/pybb/user_topics.html:15 +msgid "All topics created by" +msgstr "" + +#: pybb/templates/pybb/users.html:8 +msgid "Users" +msgstr "" + +#: pybb/templates/pybb/users.html:12 +msgid "Search" +msgstr "" + +#: pybb/templates/pybb/users.html:24 +msgid "'Users'" +msgstr "" + +#: pybb/templates/pybb/mail_templates/subscription_email_body.html:3 +msgid "replied in topic to which you are subscribed." +msgstr "" + +#: pybb/templates/pybb/mail_templates/subscription_email_body.html:4 +msgid "Link to post:" +msgstr "" + +#: pybb/templates/pybb/mail_templates/subscription_email_body.html:5 +msgid "Link to topic:" +msgstr "" + +#: pybb/templates/pybb/mail_templates/subscription_email_body.html:8 +msgid "" +"If you don't want to recive notifications on new messages in this topic " +"visit following link:" +msgstr "" + +#: pybb/templates/pybb/mail_templates/subscription_email_subject.html:2 +msgid "New answer in topic that you subscribed." +msgstr "" + +#: pybb/templatetags/pybb_tags.py:61 +msgid "seconds ago,seconds ago,seconds ago" +msgstr "" + +#: pybb/templatetags/pybb_tags.py:64 +msgid "seconds ago" +msgstr "" + +#: pybb/templatetags/pybb_tags.py:70 +msgid "minutes ago,minutes ago,minutes ago" +msgstr "" + +#: pybb/templatetags/pybb_tags.py:73 +msgid "minutes ago" +msgstr "" + +#: pybb/templatetags/pybb_tags.py:83 +#, python-format +msgid "today, %s" +msgstr "" + +#: pybb/templatetags/pybb_tags.py:85 +#, python-format +msgid "yesterday, %s" +msgstr "" diff --git a/edumed/settings.d/30-apps.py b/edumed/settings.d/30-apps.py index 521839b..824b44b 100644 --- a/edumed/settings.d/30-apps.py +++ b/edumed/settings.d/30-apps.py @@ -15,6 +15,8 @@ INSTALLED_APPS = ( 'haystack', 'chunks', 'contact', + 'pybb', + 'django_libravatar', 'sorl.thumbnail', 'django.contrib.auth', diff --git a/edumed/settings.d/30-locale.py b/edumed/settings.d/30-locale.py index d77583d..40f6617 100644 --- a/edumed/settings.d/30-locale.py +++ b/edumed/settings.d/30-locale.py @@ -28,3 +28,10 @@ USE_L10N = True # If you set this to False, Django will not use timezone-aware datetimes. USE_TZ = True + +CONTRIB_LOCALE_APPS = ( + 'pybb', +) +LOCALE_PATHS = ( + path.join(PROJECT_DIR, 'edumed/locale-contrib'), +) diff --git a/edumed/settings.d/40-context.py b/edumed/settings.d/40-context.py index e161e0b..0cf10b8 100644 --- a/edumed/settings.d/40-context.py +++ b/edumed/settings.d/40-context.py @@ -8,5 +8,6 @@ TEMPLATE_CONTEXT_PROCESSORS = tuple(x for x in ( "django.core.context_processors.tz", "django.contrib.messages.context_processors.messages" if 'django.contrib.messages' in INSTALLED_APPS else None, - "django.core.context_processors.request" + "django.core.context_processors.request", + 'pybb.context_processors.processor', ) if x is not None) diff --git a/edumed/settings.d/40-middleware.py b/edumed/settings.d/40-middleware.py index 34780d8..8a3d2e6 100644 --- a/edumed/settings.d/40-middleware.py +++ b/edumed/settings.d/40-middleware.py @@ -21,5 +21,6 @@ MIDDLEWARE_CLASSES = tuple(x for x in ( 'pagination.middleware.PaginationMiddleware' if "pagination" in INSTALLED_APPS else None, 'django.middleware.cache.FetchFromCacheMiddleware', - 'fnpdjango.middleware.SetRemoteAddrFromXRealIP' + 'fnpdjango.middleware.SetRemoteAddrFromXRealIP', + 'pybb.middleware.PybbMiddleware', ) if x is not None) diff --git a/edumed/settings.d/50-contrib.py b/edumed/settings.d/50-contrib.py index 9291ce5..64770e8 100644 --- a/edumed/settings.d/50-contrib.py +++ b/edumed/settings.d/50-contrib.py @@ -4,4 +4,10 @@ CAS_VERSION = '1' SPONSORS_THUMB_WIDTH = 100 SPONSORS_THUMB_HEIGHT = 56 -HONEYPOT_FIELD_NAME='miut' +PYBB_TEMPLATE = "base_forum.html" +PYBB_SMILES = {} +PYBB_ENABLE_ANONYMOUS_POST = False + +PYBB_DEFAULT_TITLE = u'Forum' +PYBB_DEFAULT_TIME_ZONE = 1 +PYBB_PERMISSION_HANDLER = 'edumed.forum.ForumPermissionHandler' diff --git a/edumed/settings.d/50-static.py b/edumed/settings.d/50-static.py index 4013a66..780ce01 100644 --- a/edumed/settings.d/50-static.py +++ b/edumed/settings.d/50-static.py @@ -25,6 +25,8 @@ PIPELINE_CSS = { 'catalogue/css/section_list.scss', 'curriculum/curriculum.scss', 'jquery/colorbox/colorbox.css', + + 'css/forum.scss', ), 'output_filename': 'compressed/base.css', }, @@ -40,6 +42,8 @@ PIPELINE_JS = { 'catalogue/js/lesson.js', 'sponsors/js/sponsors.js', 'curriculum/curriculum.js', + + 'pybb/js/pybbjs.js', ), 'output_filename': 'compressed/base.js', }, diff --git a/edumed/static/css/forum.css b/edumed/static/css/forum.css new file mode 100644 index 0000000..51fe05f --- /dev/null +++ b/edumed/static/css/forum.css @@ -0,0 +1,77 @@ +ul.breadcrumb { + margin: 0; + padding: 0; + list-style: none; } + ul.breadcrumb li { + display: inline; } + +.forum-body { + /* --- Unread --- */ + /* --- Moderation --- */ + /* --- Mini pagination --- */ } + .forum-body .pagination ul { + margin: 0; + padding: 0; + list-style: none; } + .forum-body .pagination ul li { + display: inline-block; } + .forum-body .pagination ul li a { + display: block; + padding: .5em; } + .forum-body .pagination ul .disabled a { + color: black; } + .forum-body .table { + width: 100%; + margin: 1em 0; } + .forum-body .forum-description { + margin: 5px; } + .forum-body .forum-row, .forum-body .topic-row { + width: 100%; } + .forum-body .forum-name, .forum-body .topic-name { + width: 40%; + text-align: left; } + .forum-body .forum-topic-count, .forum-body .forum-post-count, .forum-body .topic-post-count, .forum-body .topic-view-count { + width: 16%; + text-align: center; } + .forum-body .forum-last-post, .forum-body .topic-last-post { + width: 20%; + text-align: center; } + .forum-body .first-unread-post-link, .forum-body .first-unread-post-link:hover { + text-decoration: none; } + .forum-body .post-header { + padding: 3px 0 3px 20px; } + .forum-body .post-header th { + text-align: left; } + .forum-body .post-info { + width: 200px; + padding: 10px; } + .forum-body .post-info .post-author { + padding: 5px 0; } + .forum-body .post-content { + vertical-align: top; + padding: 10px; } + .forum-body .post-signature { + color: #CCC; + margin-top: 15px; + border-top: 1px dotted #cccccc; + display: block; } + .forum-body .post-related { + margin-top: 20px; } + .forum-body .forum-headline { + margin-top: 10px; } + .forum-body .attachments-form { + padding-bottom: 15px; } + .forum-body .attachment-link { + border-bottom: 1px dotted; } + .forum-body .state-indicator { + display: block; + float: left; + height: 10px; + width: 10px; + margin: 3px 5px; } + .forum-body .topic-unread a, .forum-body .forum-unread a { + font-weight: bold; } + .forum-body .on-moderation { + background: #ffcccc; } + .forum-body .mini-pagination { + padding: 3px 0 3px 10px; } diff --git a/edumed/static/css/forum.scss b/edumed/static/css/forum.scss new file mode 100755 index 0000000..3691f8f --- /dev/null +++ b/edumed/static/css/forum.scss @@ -0,0 +1,155 @@ +ul.breadcrumb { + margin: 0; + padding: 0; + list-style: none; + li { + display: inline; + } +} + + + +.forum-body { + .pagination { + ul { + margin: 0; + padding: 0; + list-style: none; + + li { + display: inline-block; + a { + display: block; + padding: .5em; + } + } + + .disabled { + a { + color: black; + } + } + } + } + + .table { + width: 100%; + margin: 1em 0; + } + + .forum-description { + margin: 5px; + } + + .forum-row, .topic-row { + width: 100%; + } + + .forum-name, .topic-name { + width: 40%; + text-align: left; + } + + .forum-topic-count, .forum-post-count, .topic-post-count, .topic-view-count { + width: 16%; + text-align: center; + } + + .forum-last-post, .topic-last-post { + width: 20%; + text-align: center; + } + + .first-unread-post-link, .first-unread-post-link:hover { + text-decoration: none; + } + + + + + + .post-header { + padding: 3px 0 3px 20px; + th { + text-align: left; + } + } + + .post-info { + width: 200px; + padding: 10px; + + .avatar { + + } + + .post-author { + padding: 5px 0; + } + + .post-extra-info { + } + + .post-controls { + } + } + + .post-content { + vertical-align: top; + padding: 10px; + } + + .post-signature { + color: #CCC; + margin-top: 15px; + border-top: 1px dotted #CCC; + display: block; + } + + .post-related { + margin-top: 20px; + } + + + + + .forum-headline { + margin-top: 10px; + } + + .attachments-form { + padding-bottom: 15px; + } + + .attachment-link { + border-bottom: 1px dotted; + } + + /* --- Unread --- */ + + .state-indicator { + display: block; + float: left; + height: 10px; + width: 10px; + margin: 3px 5px; + } + + .topic-unread, .forum-unread { + a { + font-weight: bold; + } + .state-indicator { + } + } + + /* --- Moderation --- */ + .on-moderation { + background: #ffcccc; + } + + /* --- Mini pagination --- */ + .mini-pagination { + padding: 3px 0 3px 10px; + } +} diff --git a/edumed/templates/base.html b/edumed/templates/base.html index 6233cf3..7fe4c5e 100644 --- a/edumed/templates/base.html +++ b/edumed/templates/base.html @@ -96,6 +96,7 @@ {% compressed_js 'base' %} + {% block extra_script %}{% endblock %} {{ piwik_tag|safe }} diff --git a/edumed/templates/base_forum.html b/edumed/templates/base_forum.html new file mode 100755 index 0000000..5948131 --- /dev/null +++ b/edumed/templates/base_forum.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} + +{% block body %} +
+ {% block breadcrumb %}{% endblock %} + {% block content %}{% endblock %} +
+{% endblock %} diff --git a/edumed/templates/pybb/_need_to_login_message.html b/edumed/templates/pybb/_need_to_login_message.html new file mode 100755 index 0000000..bcc8550 --- /dev/null +++ b/edumed/templates/pybb/_need_to_login_message.html @@ -0,0 +1,2 @@ +{% load i18n %} +{% trans "Login" %} / {% trans "register" %} {% trans "to create to post a reply" %}. diff --git a/edumed/templates/pybb/avatar.html b/edumed/templates/pybb/avatar.html new file mode 100755 index 0000000..0358753 --- /dev/null +++ b/edumed/templates/pybb/avatar.html @@ -0,0 +1,8 @@ +{% load pybb_tags %} +{% load libravatar_tags %} +
+ {% pybb_get_profile user=user as user_profile %} + + {{ user }} libravatar + +
diff --git a/edumed/templates/pybb/breadcrumb.html b/edumed/templates/pybb/breadcrumb.html new file mode 100755 index 0000000..a537281 --- /dev/null +++ b/edumed/templates/pybb/breadcrumb.html @@ -0,0 +1,20 @@ +{% load i18n pybb_tags %} + diff --git a/edumed/templates/pybb/breadcrumb_top_extra_crumb.html b/edumed/templates/pybb/breadcrumb_top_extra_crumb.html new file mode 100755 index 0000000..dd09f97 --- /dev/null +++ b/edumed/templates/pybb/breadcrumb_top_extra_crumb.html @@ -0,0 +1 @@ +
  • Strona główna /
  • diff --git a/edumed/urls.py b/edumed/urls.py index 3e99b30..2c31a0c 100644 --- a/edumed/urls.py +++ b/edumed/urls.py @@ -1,17 +1,19 @@ from django.conf.urls import patterns, include, url from django.conf import settings -from .views import HomeView +from .views import HomeView, AvatarlessProfileEditView + urlpatterns = patterns('', url(r'^$', HomeView.as_view(), name="home"), url(r'^kompetencje/', include('curriculum.urls')), url(r'^lekcje/', include('catalogue.urls')), -# url(r'^i/', include('django.contrib.flatpages.urls')), url(r'^info/(?P.*)$', 'django.contrib.flatpages.views.flatpage', name="info"), url(r'^szukaj/', include('haystack.urls')), url(r'^zglos/', include('contact.urls')), + url(r'^forum/profile/edit/$', AvatarlessProfileEditView.as_view(), name='edit_profile'), + url(r'^forum/', include('pybb.urls', namespace='pybb')), ) @@ -20,6 +22,10 @@ if 'django.contrib.admin' in settings.INSTALLED_APPS: from django.contrib import admin admin.autodiscover() + if 'django_cas' in settings.INSTALLED_APPS: + urlpatterns += patterns('', + (r'^admin/logout/$', 'django_cas.views.logout'), + ) urlpatterns += patterns('', url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/', include(admin.site.urls)), @@ -28,8 +34,8 @@ if 'django.contrib.admin' in settings.INSTALLED_APPS: # Auth stuff, if necessary if 'django_cas' in settings.INSTALLED_APPS: urlpatterns += patterns('', - (r'^accounts/login/$', 'django_cas.views.login'), - (r'^accounts/logout/$', 'django_cas.views.logout'), + url(r'^accounts/login/$', 'django_cas.views.login', name='login'), + url(r'^accounts/logout/$', 'django_cas.views.logout', name='logout'), ) diff --git a/edumed/views.py b/edumed/views.py index b497716..bde67ef 100755 --- a/edumed/views.py +++ b/edumed/views.py @@ -1,6 +1,9 @@ import os.path from django.conf import settings from django.views.generic import TemplateView +from pybb.views import ProfileEditView +from .forms import AvatarlessEditProfileForm + class HomeView(TemplateView): template_name="home.html" @@ -10,3 +13,6 @@ class HomeView(TemplateView): context['package_url'] = os.path.join(settings.MEDIA_URL, settings.CATALOGUE_PACKAGE) context['package_student_url'] = os.path.join(settings.MEDIA_URL, settings.CATALOGUE_PACKAGE_STUDENT) return context + +class AvatarlessProfileEditView(ProfileEditView): + form_class = AvatarlessEditProfileForm diff --git a/requirements.txt b/requirements.txt index 3db2e26..c96b02c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -29,4 +29,8 @@ django-sponsors>=1.1,<1.2 django-haystack>=2.0,<2.1 pysolr>=3,<4 +pybbm>=0.14,<0.15 +django-libravatar + sorl-thumbnail>=11,<12 +