Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into cms-features
* master: added BSD license Update master use django-forms-bootstrap fixed account links on homepage fixed staticfiles settings removed homepage use of ifsetting_tag updated urls updated templates updated imports to reflect new layout updated imports to reflect new layout updated settings updated manage.py updated requirements to 1.4 / DUA and latest versions updated project layout for 1.4 (without content changes) Conflicts: requirements/base.txt symposion/settings.py symposion_project/urls.py
- Loading branch information
Showing
45 changed files
with
214 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Copyright (c) 2010-2012, Eldarion, Inc. and contributors | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
* Neither the name of Eldarion, Inc. nor the names of its contributors may | ||
be used to endorse or promote products derived from this software without | ||
specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
SYMPOSION | ||
A Django project for conference websites. | ||
|
||
A Pinax project sponsored by Eldarion and the Python Software Foundation. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env python | ||
import os, sys | ||
|
||
if __name__ == "__main__": | ||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "symposion.settings") | ||
|
||
from django.core.management import execute_from_command_line | ||
|
||
execute_from_command_line(sys.argv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from django.contrib import admin | ||
|
||
from mptt.admin import MPTTModelAdmin | ||
|
||
from cms.models import Page | ||
|
||
|
||
class PageAdmin(MPTTModelAdmin): | ||
prepopulated_fields = {"slug": ("title",)} | ||
list_display = ("title", "published", "status") | ||
|
||
admin.site.register(Page, PageAdmin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
from datetime import datetime | ||
|
||
from django.db import models | ||
from django.utils.translation import ugettext_lazy as _ | ||
|
||
from markitup.fields import MarkupField | ||
|
||
from taggit.managers import TaggableManager | ||
|
||
from mptt.models import MPTTModel, TreeForeignKey | ||
from mptt.utils import drilldown_tree_for_node | ||
|
||
import reversion | ||
|
||
|
||
class ContentBase(models.Model): | ||
|
||
STATUS_CHOICES = ( | ||
(1, _("Draft")), | ||
(2, _("Public")), | ||
) | ||
|
||
title = models.CharField(max_length=100) | ||
slug = models.CharField(max_length=100, blank=True, null=True) | ||
body = MarkupField() | ||
|
||
tags = TaggableManager(blank=True) | ||
|
||
status = models.IntegerField(choices=STATUS_CHOICES, default=2) | ||
published = models.DateTimeField(default=datetime.now) | ||
created = models.DateTimeField(editable=False, default=datetime.now) | ||
updated = models.DateTimeField(editable=False, default=datetime.now) | ||
|
||
class Meta: | ||
abstract = True | ||
|
||
|
||
class Page(MPTTModel, ContentBase): | ||
|
||
parent = TreeForeignKey("self", null=True, blank=True, related_name="children") | ||
ordering = models.PositiveIntegerField(default=1) | ||
path = models.TextField(blank=True, editable=False) | ||
|
||
def __unicode__(self): | ||
return self.title | ||
|
||
def save(self, calculate_path=True, *args, **kwargs): | ||
super(Page, self).save(*args, **kwargs) | ||
if calculate_path: | ||
self.calculate_path() | ||
|
||
def calculate_path(self): | ||
self.path = "" | ||
for page in drilldown_tree_for_node(self): | ||
if page == self: | ||
self.path += page.slug | ||
break | ||
else: | ||
self.path += "%s/" % page.slug | ||
self.save(calculate_path=False) | ||
|
||
class MPTTMeta: | ||
order_insertion_by = ["ordering", "title"] | ||
|
||
reversion.register(Page) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from django.shortcuts import render_to_response, get_object_or_404 | ||
from django.template import RequestContext | ||
|
||
from cms.models import Page | ||
|
||
|
||
def page(request, slug): | ||
|
||
page = get_object_or_404(Page, path=slug) | ||
siblings = page.get_siblings(include_self=True) | ||
|
||
return render_to_response("cms/page_detail.html", { | ||
"page": page, | ||
"siblings": siblings, | ||
}, context_instance=RequestContext(request)) |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
symposion_project/apps/conference/admin.py → symposion/conference/admin.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
symposion_project/apps/sponsorship/admin.py → symposion/sponsorship/admin.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...nsorship/templatetags/sponsorship_tags.py → ...nsorship/templatetags/sponsorship_tags.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% load i18n %} | ||
<div class="legal"> | ||
<a href="http://pinax.github.com/symposion/"><b>symposion</b></a>: | ||
a Pinax project sponsored by | ||
<a href="http://eldarion.com/">Eldarion</a> | ||
and the | ||
<a href="http://www.python.org/psf/">Python Software Foundation</a>. | ||
</div> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{% extends "subnav_base.html" %} | ||
|
||
{% block subnav %} | ||
<ul class="nav nav-list"> | ||
<li class="nav-header">{{ page.parent }}</li> | ||
{% for sibling in siblings %} | ||
{% if sibling == page %} | ||
<li>{{ sibling }}</li> | ||
{% else %} | ||
<li><a href="{% url cms_page sibling.path %}">{{ sibling }}</a> | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
{% endblock %} | ||
|
||
{% block body %} | ||
<h1>{{ page.title }}</h1> | ||
{{ page.body }} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.