Permalink
Browse files

Merge branch 'master' of git://github.com/stephenmcd/mezzanine

  • Loading branch information...
2 parents 75824dc + 037314e commit 60fcb564698cd79b2f92099141991038d9bea020 @dpnova dpnova committed Oct 6, 2012
Showing with 295 additions and 109 deletions.
  1. +72 −0 .hgtags
  2. +2 −0 AUTHORS
  3. +3 −0 README.rst
  4. +10 −6 docs/content-architecture.rst
  5. +1 −1 mezzanine/accounts/templates/accounts/account_login.html
  6. +1 −1 mezzanine/accounts/templates/accounts/includes/user_panel.html
  7. +22 −16 mezzanine/accounts/urls.py
  8. +1 −1 mezzanine/blog/feeds.py
  9. BIN mezzanine/blog/locale/ru/LC_MESSAGES/django.mo
  10. +21 −7 mezzanine/blog/locale/ru/LC_MESSAGES/django.po
  11. +2 −2 mezzanine/blog/templates/blog/includes/filter_panel.html
  12. +31 −19 mezzanine/blog/urls.py
  13. +2 −2 mezzanine/core/admin.py
  14. +10 −0 mezzanine/core/defaults.py
  15. +1 −1 mezzanine/core/middleware.py
  16. +4 −2 mezzanine/core/sitemaps.py
  17. +7 −1 mezzanine/core/templatetags/mezzanine_tags.py
  18. +3 −4 mezzanine/core/tests.py
  19. +8 −0 mezzanine/generic/defaults.py
  20. +2 −2 mezzanine/generic/templates/generic/includes/comment.html
  21. +16 −0 mezzanine/generic/templatetags/comment_tags.py
  22. +1 −3 mezzanine/mobile/templates/mobile/includes/search.html
  23. +8 −0 mezzanine/pages/models.py
  24. +2 −2 mezzanine/pages/templates/pages/menus/dropdown.html
  25. +1 −1 mezzanine/pages/templates/pages/menus/footer.html
  26. +1 −1 mezzanine/pages/templates/pages/menus/footer_tree.html
  27. +1 −1 mezzanine/pages/templates/pages/menus/mobile.html
  28. +1 −1 mezzanine/pages/templates/pages/menus/tree.html
  29. +25 −20 mezzanine/pages/templatetags/pages_tags.py
  30. +3 −1 mezzanine/pages/urls.py
  31. +4 −0 mezzanine/twitter/models.py
  32. +1 −3 mezzanine/urls.py
  33. +22 −5 mezzanine/utils/docs.py
  34. +5 −5 mezzanine/utils/email.py
  35. +1 −1 mezzanine/utils/urls.py
View
72 .hgtags
@@ -1 +1,73 @@
5f0db1985cc48e34d9af9d2200bc9f52f479359c 1.2.4
+541f78f5e5e7e7a5d3bb5a4807da9e23879a0229 1.2.3
+3ad009efc36ccd52cfe7048dd21c887c76d04695 1.2.2
+edbd41d5bdd6d40d145c87d6b3f5b4a3eb68abca 1.2.1
+16bdea99fe72ab7c8570e0458f8269534c208b70 1.2.0
+9e731a00bd64df93ec8c75a460a04e5352b1af49 1.1.4
+1286eb18029379a27c959ff4013e96a49438f6c4 1.1.3
+21a87d1318c73e274188f223110f191c1de101f3 1.1.2
+d6127931b4c48dc236235aed5442e5146aa1e147 1.1.1
+90b707be708c2a19b986016ec36ed1d665d29cb1 1.1.0
+a25749986abcf503cb6cbd10eba5878201e37baa 1.0.10
+40cbc47b8d8a5ed0751818b3bb8c65cbed28b1c6 1.0.9
+9eace3f5929321b13ec759f418733258bdde802d 1.0.8
+6feeea9b42c3efc7ec5fb047296746a070fd2f55 1.0.7
+7bcec540a89497d8ca109c9f459f254d70e93f79 1.0.6
+6bee349d60fb1f00077e13d19338b08a1914ff02 1.0.5
+2f768609bd03dda8753a46bd10950baa01d54aa6 1.0.4
+e5eeb9a42912c30c40e3633215d629a8ad6b47bf 1.0.3
+fb085d32825309e8522481ed0032afb331c637cb 1.0.2
+cfda66a960d4c1177b4f16b9be7644a776b98c0d 1.0.1
+0c9812c5277ca5d1c4215d47c1127a85d7c9b29e 1.0.0
+82d9700707dc6327d0fc2b83994a462db4c79997 0.12.4
+5cd8fdd20ca4ac85fd61c7bee25402ed6092be3e 0.12.3
+4f743587aaa8a0747a12fc1403cbd581c19156e8 0.12.2
+f79c7e1f3c2883be611ffbaa6b1ce3b99db7796c 0.12.1
+b31f64dbd2ab3810d1fdcfe86d7c757d9b1f0d84 0.12
+7fd7c6574cb56bede1f01587fb8423898b267b09 0.11.10
+6a770618c44fe7044dc17d1b334e697b05ecf633 0.11.9
+efe1c50341a313d97f9975dda159f4d68aac27c3 0.11.8
+e795172c49d86cb12a15d429174e3b3572947f87 0.11.7
+8eca31377f08e95d2cd93731a62477d7182c67b8 0.11.6
+deacfab7c4d3cab41329dba7619063ba80ee8a97 0.11.5
+ef7f72342e9a7c6aa568da806fba5cb526129f7c 0.11.4
+450bb1f396e6f574df9b916c0933dfb0d2a4de69 0.11.3
+0f8942e38c5259e4e518504edd055497961a7e01 0.11.2
+177a96984bca3a2f123d652f8965d52c117bde6f 0.11.1
+a7e57ee326552ba08c6eb4b91b237db9863689e0 0.11
+8c8764557851bcf042d948cf0e57e831bb123f6d 0.10.6
+f3e05466e35a426c0129ca72e516a307180bfb10 0.10.5
+98f231b783d9e875f885d420e09b0ff42eccb9b4 0.10.4
+bb53d9598076064dd143953ece94a9fdd574362f 0.10.3
+000e20d0d889c9fae7309e34c397e3d14f4e4b29 0.10.2
+ac247d7a489cd0b5d3ceab46cca140a3ffcbc9b8 0.10.1
+f619f078326fed0c7993692a3a246a41c7f8ebac 0.10
+7376bc89fcf6ae5ab06c5bb4e93be7dc11ba7fae 0.9.1
+a4f50b290fb832a28aa2cab1c808a9c291965c6a 0.9
+5a8e82518e795a93b7ea2384de71523e5abc6177 0.8.5
+c1150329584d6d580ee9751f31cc5c3cf71b2624 0.8.4
+ff9a004953ff7addcee81a1d99391ccee3be7f29 0.8.3
+a78e527676f16d3f5753e635f07c0aed123b9baa 0.8.2
+2112f14bf9d131a5db6d57ae63e4aba453ba4169 0.8.1
+372af8d4472cbc08f20dd20b370f0c93a74be5d4 0.8
+1a2e9d3f731c80991fd40783c14dec680e720bf0 0.7.3
+f552012e25126f9bfd6440adeac6abdc5f0246aa 0.7.2
+ed431f689347cafaf050c8eae5fd34ec5d538772 0.7.1
+e43181569607c6a25af8c8bc94514f7d380b2d16 0.7
+4ef3a549bcc2566be219b093db01bee2c4373345 0.6.4
+ef7f2275939d32bef6ab231abafd7d3abf4fe38c 0.6.3
+dd9177c1d4ba9bbf177a3d212d0a99cd5bcf792f 0.6.2
+df84dbbff4c20bb643b65007e9994d46146a015c 0.6.1
+e247519534fe44a9efccd50e547f0069881d0271 0.6
+6703f05928857a3670d50e43a7d42481feb63472 0.5.4
+b0bfebc02349484ab34f8ee512626763e34e4747 0.5.3
+221d10b894c9ff5b973e3175585ab0b88465d696 0.5.2
+035cea8df0f1912abeba40bfec214fc9df7a4158 0.5.1
+b0e392d72c62a446f2285f4225f74f7d4f0a6547 0.5
+c288c33c449246adea384297f72cd1d62d4ec0cd 0.4
+70c4c0e72940e00b6f65a9274877cfca4c5d84fb 0.3.3
+3fa167ee61ac862e7aaac96a4ef67d316403fa46 0.3.2
+3630e5c174dbfe0df547ad9b27e45465cb0dc91a 0.2.4
+66dbc8a36361f98432294f91b751f31a8f600412 0.2.3
+9e3c41fbb016ca6ae5d612f46062310f3862ff2e 0.1.2
+23653ab3b7a29e18c5cfc6f1196bf03523329c6d 0.1.1
View
@@ -86,3 +86,5 @@
* Kevin London
* David Novakovic
* Mark Mukherjee
+* Eduardo Rivas
+* Kenneth Falck
View
@@ -189,6 +189,7 @@ You can also add modules to the `Mezzanine Grid on djangopackages.com`_.
* `mezzanine-events`_ - Events plugin for Mezzanine, with geocoding
via Google Maps, iCalendar files, webcal URLs and directions via
Google Calendar/Maps.
+ * `mezzanine-polls`_ - Polls application for Mezzanine.
Donating
========
@@ -296,6 +297,7 @@ Sites Using Mezzanine
* `Sunfluence <http://sunfluence.com>`_
* `ggzpreventie.nl <http://ggzpreventie.nl>`_
* `dakuaiba.com <http://www.dakuaiba.com>`_
+ * `Leprosys <http://www.leprosys.info>`_
Quotes
======
@@ -400,6 +402,7 @@ Quotes
.. _`mezzanine-captcha`: https://github.com/mjtorn/mezzanine-captcha
.. _`mezzanine-bookmarks`: https://github.com/adieu/mezzanine-bookmarks
.. _`mezzanine-events`: https://github.com/stbarnabas/mezzanine-events
+.. _`mezzanine-polls`: https://github.com/sebasmagri/mezzanine_polls
.. PEOPLE WITH QUOTES
@@ -345,21 +345,25 @@ helping you to build advanced menus.
* ``branch_level`` - an integer for the current branch depth
* ``page_branch_in_menu`` - a boolean for whether this branch should
be in the menu (see "filtering menus" below)
- * ``page.has_children`` - a boolean for whether the branch page has
- any child pages
- * ``page.num_children`` - an integer for the number of child pages the
- branch page has
* ``page.in_menu`` - a boolean for whether the branch page should
be in the menu (see "filtering menus" below)
+ * ``page.has_children`` - a boolean for whether the branch page has
+ any child pages at all, disregarding the current menu
+ * ``page.has_children_in_menu`` - a boolean for whether the branch
+ page has any child pages that appear in the current menu
+ * ``page.num_children`` - an integer for the number of child pages the
+ branch page has in total, disregarding the current menu
+ * ``page.num_children_in_menu`` - an integer for the number of child
+ pages the branch page has, that also appear in the current menu
* ``page.is_current_child`` - a boolean for whether the branch page
is a child of the current page being viewed
* ``page.is_current_sibling`` - a boolean for whether the branch page
is a sibling (has the same parent) of the current page being viewed
* ``page.is_current_or_ascendant`` - a boolean for whether the branch
page is the current page being viewed, or an ascendant (parent,
grand-parent, etc) of the current page being viewed
- * ``page.is_current_sibling`` - a boolean for whether the branch page
- is a parimary page (has no parent)
+ * ``page.is_primary`` - a boolean for whether the branch page
+ is a primary page (has no parent)
* ``page.html_id`` - a unique string that can be used as the HTML ID
attribute
* ``page.branch_level`` - an integer for the branch page's depth
@@ -8,7 +8,7 @@
{% else %}
{{ block.super }}
{% url "signup" as signup_url %}
- <p>{% blocktrans with request.GET.next as next %}If you don't have an acount you can <a href="{{ signup_url }}?next={{ next }}">sign up</a> for one now.{% endblocktrans %}</p>
+ <p>{% blocktrans with request.GET.next as next %}If you don't have an account you can <a href="{{ signup_url }}?next={{ next }}">sign up</a> for one now.{% endblocktrans %}</p>
{% url "mezzanine_password_reset" as password_reset_url %}
{% url "profile_update" as profile_update_url %}
{% blocktrans %}<p>You can also <a href="{{ password_reset_url }}?next={{ profile_update_url }}">reset your password</a> if you've forgotten it.</p>{% endblocktrans %}</p>
@@ -10,7 +10,7 @@
{% else %}
<a href="{% url "profile_update" %}">{{ request.user.username }}</a>
{% endif %}
- <a href="{{ settings.LOGOUT_URL }}?next={{ request.path }}"
+ <a href="{% url "logout" %}?next={{ request.path }}"
class="btn btn-small btn-danger btn-account">{% trans "Log out" %}</a>
{% else %}
{% trans "Not logged in" %}
View
@@ -3,6 +3,7 @@
from mezzanine.conf import settings
+
ACCOUNT_URL = getattr(settings, "ACCOUNT_URL", "/account/")
SIGNUP_URL = getattr(settings, "SIGNUP_URL",
"/%s/signup/" % ACCOUNT_URL.strip("/"))
@@ -19,28 +20,33 @@
"/%s/password/verify/" %
ACCOUNT_URL.strip("/"))
-verify_pattern = "/(?P<uidb36>[-\w]+)/(?P<token>[-\w]+)/$"
+_verify_pattern = "/(?P<uidb36>[-\w]+)/(?P<token>[-\w]+)"
+_slash = "/" if settings.APPEND_SLASH else ""
urlpatterns = patterns("mezzanine.accounts.views",
- url("^%s/$" % LOGIN_URL.strip("/"), "login", name="login"),
- url("^%s/$" % LOGOUT_URL.strip("/"), "logout", name="logout"),
- url("^%s/$" % SIGNUP_URL.strip("/"), "signup", name="signup"),
- url("^%s%s" % (SIGNUP_VERIFY_URL.strip("/"), verify_pattern),
+ url("^%s%s$" % (LOGIN_URL.strip("/"), _slash),
+ "login", name="login"),
+ url("^%s%s$" % (LOGOUT_URL.strip("/"), _slash),
+ "logout", name="logout"),
+ url("^%s%s$" % (SIGNUP_URL.strip("/"), _slash),
+ "signup", name="signup"),
+ url("^%s%s%s$" % (SIGNUP_VERIFY_URL.strip("/"), _verify_pattern, _slash),
"signup_verify", name="signup_verify"),
- url("^%s/$" % PROFILE_UPDATE_URL.strip("/"), "profile_update",
- name="profile_update"),
- url("^%s/$" % PASSWORD_RESET_URL.strip("/"), "password_reset",
- name="mezzanine_password_reset"),
- url("^%s%s" % (PASSWORD_RESET_VERIFY_URL.strip("/"), verify_pattern),
+ url("^%s%s$" % (PROFILE_UPDATE_URL.strip("/"), _slash),
+ "profile_update", name="profile_update"),
+ url("^%s%s$" % (PASSWORD_RESET_URL.strip("/"), _slash),
+ "password_reset", name="mezzanine_password_reset"),
+ url("^%s%s%s$" %
+ (PASSWORD_RESET_VERIFY_URL.strip("/"), _verify_pattern, _slash),
"password_reset_verify", name="password_reset_verify"),
- url("^%s/$" % ACCOUNT_URL.strip("/"), "account_redirect",
- name="account_redirect"),
+ url("^%s%s$" % (ACCOUNT_URL.strip("/"), _slash),
+ "account_redirect", name="account_redirect"),
)
if settings.ACCOUNTS_PROFILE_VIEWS_ENABLED:
urlpatterns += patterns("mezzanine.accounts.views",
- url("^%s/$" % PROFILE_URL.strip("/"), "profile_redirect",
- name="profile_redirect"),
- url("^%s/(?P<username>.*)/$" % PROFILE_URL.strip("/"), "profile",
- name="profile"),
+ url("^%s%s$" % (PROFILE_URL.strip("/"), _slash),
+ "profile_redirect", name="profile_redirect"),
+ url("^%s/(?P<username>.*)%s$" % (PROFILE_URL.strip("/"), _slash),
+ "profile", name="profile"),
)
View
@@ -52,7 +52,7 @@ def __init__(self, *args, **kwargs):
def get_feed(self, *args, **kwargs):
# Django 1.3 author/category/tag filtering.
- if VERSION < (1, 4):
+ if VERSION < (1, 4) and args[0]:
attr, value = args[0].split("/", 1)
setattr(self, attr, value)
return super(PostsRSS, self).get_feed(*args, **kwargs)
Binary file not shown.
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Mezzanine\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-07-20 13:57+0400\n"
+"POT-Creation-Date: 2012-09-17 15:07+0400\n"
"PO-Revision-Date: 2012-05-26 18:08+0000\n"
"Last-Translator: Sebastián Ramírez Magrí <sebasmagri@gmail.com>\n"
"Language-Team: Russian (http://www.transifex.net/projects/p/mezzanine/"
@@ -21,6 +21,10 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
+#: admin.py:20
+msgid "Other posts"
+msgstr "Другие заметки"
+
#: defaults.py:20
msgid "bit.ly username"
msgstr "Имя пользователя bit'ly"
@@ -85,19 +89,23 @@ msgstr "Рейтинг"
msgid "Featured Image"
msgstr "Главное изображение"
-#: models.py:31
+#: models.py:28 templates/blog/blog_post_detail.html:67
+msgid "Related posts"
+msgstr "Похожие заметки"
+
+#: models.py:33
msgid "Blog post"
msgstr "Заметка в блоге"
-#: models.py:32
+#: models.py:34
msgid "Blog posts"
msgstr "Заметки в блоге"
-#: models.py:54
+#: models.py:75
msgid "Blog Category"
msgstr "Категория блога"
-#: models.py:55
+#: models.py:76
msgid "Blog Categories"
msgstr "Категории блога"
@@ -198,10 +206,16 @@ msgstr "Авторы"
msgid "Feeds"
msgstr "Ленты"
-#: templates/blog/includes/filter_panel.html:66
+#: templates/blog/includes/filter_panel.html:67
+#: templates/blog/includes/filter_panel.html:71
+#: templates/blog/includes/filter_panel.html:75
+#: templates/blog/includes/filter_panel.html:79
msgid "RSS"
msgstr "RSS"
-#: templates/blog/includes/filter_panel.html:67
+#: templates/blog/includes/filter_panel.html:68
+#: templates/blog/includes/filter_panel.html:72
+#: templates/blog/includes/filter_panel.html:76
+#: templates/blog/includes/filter_panel.html:80
msgid "Atom"
msgstr "Atom"
@@ -64,8 +64,8 @@ <h3>{% trans "Authors" %}</h3>
<h3>{% trans "Feeds" %}</h3>
{% if tag %}
- <a href="{% url "blog_post_feed_tag" tag "rss" %}">{% trans "RSS" %}</a> /
- <a href="{% url "blog_post_feed_tag" tag "atom" %}">{% trans "Atom" %}</a>
+ <a href="{% url "blog_post_feed_tag" tag.slug "rss" %}">{% trans "RSS" %}</a> /
+ <a href="{% url "blog_post_feed_tag" tag.slug "atom" %}">{% trans "Atom" %}</a>
{% endif %}
{% if category %}
<a href="{% url "blog_post_feed_category" category.slug "rss" %}">{% trans "RSS" %}</a> /
View
@@ -1,27 +1,39 @@
from django.conf.urls.defaults import patterns, url
+from mezzanine.conf import settings
+
+
+# Leading and trailing slahes for urlpatterns based on setup.
+_slashes = (
+ "/" if settings.BLOG_SLUG else "",
+ "/" if settings.APPEND_SLASH else "",
+)
# Blog patterns.
urlpatterns = patterns("mezzanine.blog.views",
- url("^feeds/(?P<format>.*)/$", "blog_post_feed", name="blog_post_feed"),
- url("^tag/(?P<tag>.*)/feeds/(?P<format>.*)/$", "blog_post_feed",
- name="blog_post_feed_tag"),
- url("^tag/(?P<tag>.*)/$", "blog_post_list", name="blog_post_list_tag"),
- url("^category/(?P<category>.*)/feeds/(?P<format>.*)/$", "blog_post_feed",
- name="blog_post_feed_category"),
- url("^category/(?P<category>.*)/$", "blog_post_list",
- name="blog_post_list_category"),
- url("^author/(?P<username>.*)/feeds/(?P<format>.*)/$", "blog_post_feed",
- name="blog_post_feed_author"),
- url("^author/(?P<username>.*)/$", "blog_post_list",
- name="blog_post_list_author"),
- url("^archive/(?P<year>\d{4})/(?P<month>\d{1,2})/$", "blog_post_list",
- name="blog_post_list_month"),
- url("^archive/(?P<year>.*)/$", "blog_post_list",
- name="blog_post_list_year"),
- url("^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>.*)/$",
+ url("^%sfeeds/(?P<format>.*)%s$" % _slashes,
+ "blog_post_feed", name="blog_post_feed"),
+ url("^%stag/(?P<tag>.*)/feeds/(?P<format>.*)%s$" % _slashes,
+ "blog_post_feed", name="blog_post_feed_tag"),
+ url("^%stag/(?P<tag>.*)%s$" % _slashes, "blog_post_list",
+ name="blog_post_list_tag"),
+ url("^%scategory/(?P<category>.*)/feeds/(?P<format>.*)%s$" % _slashes,
+ "blog_post_feed", name="blog_post_feed_category"),
+ url("^%scategory/(?P<category>.*)%s$" % _slashes,
+ "blog_post_list", name="blog_post_list_category"),
+ url("^%sauthor/(?P<username>.*)/feeds/(?P<format>.*)%s$" % _slashes,
+ "blog_post_feed", name="blog_post_feed_author"),
+ url("^%sauthor/(?P<username>.*)%s$" % _slashes,
+ "blog_post_list", name="blog_post_list_author"),
+ url("^%sarchive/(?P<year>\d{4})/(?P<month>\d{1,2})%s$" % _slashes,
+ "blog_post_list", name="blog_post_list_month"),
+ url("^%sarchive/(?P<year>.*)%s$" % _slashes,
+ "blog_post_list", name="blog_post_list_year"),
+ url("^%s(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/"
+ "(?P<slug>.*)%s$" % _slashes,
"blog_post_detail", name="blog_post_detail_date"),
- url("^(?P<slug>.*)/$", "blog_post_detail", name="blog_post_detail"),
- url("^$", "blog_post_list", name="blog_post_list"),
+ url("^%s(?P<slug>.*)%s$" % _slashes, "blog_post_detail",
+ name="blog_post_detail"),
+ url("^%s$" % _slashes[1], "blog_post_list", name="blog_post_list"),
)
View
@@ -108,9 +108,9 @@ class OwnableAdmin(admin.ModelAdmin):
"""
Admin class for models that subclass the abstract ``Ownable``
model. Handles limiting the change list to objects owned by the
- logged in user, as well as setting the owner of newly created \
+ logged in user, as well as setting the owner of newly created
objects to the logged in user.
-
+
Remember that this will include the ``user`` field in the required
fields for the admin change form which may not be desirable. The
best approach to solve this is to define a ``fieldsets`` attribute
View
@@ -346,6 +346,16 @@
default=("/admin", "/account"),
)
+register_setting(
+ name="SSL_FORCED_PREFIXES_ONLY",
+ description=_("If ``True``, only URLs specified by the "
+ "``SSL_FORCE_URL_PREFIXES`` setting will be accessible over SSL, "
+ "and all other URLs will be redirected back to HTTP if accessed "
+ "over HTTPS."),
+ editable=False,
+ default=True,
+)
+
register_setting(
name="STOP_WORDS",
description=_("List of words which will be stripped from search queries."),
@@ -173,5 +173,5 @@ def process_request(self, request):
if request.path.startswith(settings.SSL_FORCE_URL_PREFIXES):
if not request.is_secure():
return HttpResponseRedirect("https://%s" % url)
- elif request.is_secure():
+ elif request.is_secure() and settings.SSL_FORCED_PREFIXES_ONLY:
return HttpResponseRedirect("http://%s" % url)
Oops, something went wrong.

0 comments on commit 60fcb56

Please sign in to comment.