Skip to content

Commit

Permalink
Rebased intranet project onto basic project
Browse files Browse the repository at this point in the history
  • Loading branch information
brosner committed Jul 21, 2010
1 parent 0ff0db7 commit d5f2e4a
Show file tree
Hide file tree
Showing 13 changed files with 97 additions and 101 deletions.
Empty file.
6 changes: 6 additions & 0 deletions pinax/projects/intranet_project/apps/profiles/admin.py
@@ -0,0 +1,6 @@
from django.contrib import admin

from profiles.models import Profile


admin.site.register(Profile)
11 changes: 11 additions & 0 deletions pinax/projects/intranet_project/apps/profiles/models.py
@@ -0,0 +1,11 @@
from django.db import models
from django.utils.translation import ugettext_lazy as _

from idios.models import ProfileBase


class Profile(ProfileBase):
name = models.CharField(_("name"), max_length=50, null=True, blank=True)
about = models.TextField(_("about"), null=True, blank=True)
location = models.CharField(_("location"), max_length=40, null=True, blank=True)
website = models.URLField(_("website"), null=True, blank=True, verify_exists=False)
13 changes: 13 additions & 0 deletions pinax/projects/intranet_project/media/README
@@ -0,0 +1,13 @@
This directory is used to store static assets for your project. User media files
(FileFields/ImageFields) are not stored here.

The convention for this directory is:

* css/ — stores CSS files
* js/ — stores Javascript files
* img/ — stores image files

This directory is accessed at /site_media/static/ in runserver when SERVE_MEDIA
is True. It is built with build_static for production environments.

See http://pinaxproject.com/docs/dev/media.html for more information.
29 changes: 15 additions & 14 deletions pinax/projects/intranet_project/requirements/base.txt
Expand Up @@ -8,36 +8,37 @@
Django==1.2.1
Pinax

python-dateutil==1.4.1
python-openid==2.2.5
django-debug-toolbar==0.8.3
django-staticfiles==0.2.0

django-mailer==0.1.0
django-email-confirmation==0.2.dev2
django-timezones==0.2.dev1
django-ajax-validation==0.1.3
pytz==2010h
django-openid==0.2.3.dev1
django-uni-form==0.7.0

django-announcements==0.1.2
django-pagination==1.0.7
django-notification==0.1.4
idios==0.1.dev6

docutils==0.6
smartypants==1.6.0.3
Markdown==2.0.3
textile==2.1.4
diff-match-patch==20090804
django-atomformat==0.1.1.dev1
creole==1.1

django-notification==0.1.4
django-openid==0.2.3.dev1
django-email-confirmation==0.1.4
django-mailer==0.1.0
django-announcements==0.1.2
django-pagination==1.0.7
django-timezones==0.2.dev1
django-tagging==0.3.1
django-threadedcomments==0.5.2
django-ajax-validation==0.1.3
django-avatar==1.0.4
django-uni-form==0.7.0
django-wikiapp==0.2.0
django-attachments==0.3.1
django-markup==0.3
django-bookmarks==0.1.0
django-filter==0.5.3
django-staticfiles==0.2.0
django-groups==0.1.dev10
django-tagging-ext==0.2.0
django-debug-toolbar==0.8.3
django-voting==0.1
48 changes: 24 additions & 24 deletions pinax/projects/intranet_project/settings.py
Expand Up @@ -39,16 +39,15 @@
}

# Local time zone for this installation. Choices can be found here:
# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
# although not all variations may be possible on all operating systems.
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = "US/Eastern"

# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
# http://blogs.law.harvard.edu/tech/stories/storyReader$15
LANGUAGE_CODE = "en"
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = "en-us"

SITE_ID = 1

Expand All @@ -60,8 +59,9 @@
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = os.path.join(PROJECT_ROOT, "site_media", "media")

# URL that handles the media served from MEDIA_ROOT.
# Example: "http://media.lawrence.com"
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = "/site_media/media/"

# Absolute path to the directory that holds static files like app media.
Expand Down Expand Up @@ -102,7 +102,6 @@
"groups.middleware.GroupAwareMiddleware",
"pinax.apps.account.middleware.LocaleMiddleware",
"pinax.apps.account.middleware.AuthenticatedMiddleware",
"django.middleware.doc.XViewMiddleware",
"pagination.middleware.PaginationMiddleware",
"pinax.middleware.security.HideSensistiveFieldsMiddleware",
"debug_toolbar.middleware.DebugToolbarMiddleware",
Expand All @@ -127,9 +126,10 @@

"pinax.core.context_processors.pinax_settings",

"pinax.apps.account.context_processors.account",

"notification.context_processors.notification",
"announcements.context_processors.site_wide_announcements",
"pinax.apps.account.context_processors.account",
]

INSTALLED_APPS = [
Expand All @@ -147,30 +147,30 @@

# external
"notification", # must be first
"staticfiles",
"debug_toolbar",
"mailer",
"uni_form",
"django_openid",
"ajax_validation",
"timezones",
"emailconfirmation",
"mailer",
"announcements",
"pagination",
"idios",
"groups",
"timezones",
"ajax_validation",
"bookmarks",
"avatar",
"tagging",
"threadedcomments",
"wiki",
"uni_form",
"django_markup",
"attachments",
"django_filters",
"staticfiles",
"debug_toolbar",
"tagging_ext",
"voting",

# Pinax
"pinax.apps.basic_profiles",
"pinax.apps.account",
"pinax.apps.signup_codes",
"pinax.apps.topics",
Expand All @@ -179,6 +179,7 @@
"pinax.apps.tasks",

# project
"profiles",
]

FIXTURE_DIRS = [
Expand All @@ -200,16 +201,9 @@
]
WIKI_MARKUP_CHOICES = MARKUP_CHOICES

AUTH_PROFILE_MODULE = "basic_profiles.Profile"
AUTH_PROFILE_MODULE = "profiles.Profile"
NOTIFICATION_LANGUAGE_MODULE = "account.Account"

EMAIL_CONFIRMATION_DAYS = 2
EMAIL_DEBUG = DEBUG
CONTACT_EMAIL = "feedback@example.com"
SITE_NAME = "Pinax"
LOGIN_URL = "/account/login/"
LOGIN_REDIRECT_URLNAME = "home"

ACCOUNT_OPEN_SIGNUP = False
ACCOUNT_REQUIRED_EMAIL = False
ACCOUNT_EMAIL_VERIFICATION = False
Expand All @@ -225,6 +219,12 @@
"django.contrib.auth.backends.ModelBackend",
]

LOGIN_URL = "/account/login/" # @@@ any way this can be a url name?
LOGIN_REDIRECT_URLNAME = "home"

EMAIL_CONFIRMATION_DAYS = 2
EMAIL_DEBUG = DEBUG

AUTHENTICATED_EXEMPT_URLS = [
r"^/account/signup/$",
r"^/account/password_reset",
Expand Down
26 changes: 0 additions & 26 deletions pinax/projects/intranet_project/templates/account/base.html

This file was deleted.

4 changes: 2 additions & 2 deletions pinax/projects/intranet_project/templates/account/login.html
Expand Up @@ -94,9 +94,9 @@
<div class="logo"><img src="{{ STATIC_URL }}pinax/img/logo.png" alt="Pinax" /></div>
</div>

{% include "account/userpass_login.html" %}
{% include "account/_userpass_login.html" %}

{% include "account/openid_login.html" %}
{% include "account/_openid_login.html" %}

</div>
<script src="{{ STATIC_URL }}pinax/js/jquery-1.3.2.min.js" type="text/javascript"></script>
Expand Down
5 changes: 4 additions & 1 deletion pinax/projects/intranet_project/templates/homepage.html
Expand Up @@ -2,9 +2,12 @@

{% load i18n %}

{% block head_title %}Homepage{% endblock %}
{% block head_title %}{% trans "Welcome" %}{% endblock %}

{% block body_class %}home{% endblock %}

{% block body %}

<h1>{% trans "Welcome to Pinax" %}</h1>

<p>
Expand Down
23 changes: 8 additions & 15 deletions pinax/projects/intranet_project/templates/site_base.html
@@ -1,8 +1,6 @@
{% extends "base.html" %}

{% load i18n %}
{% load account_tags %}
{% load openid_tags %}

{% block extra_head_base %}
<link rel="stylesheet" href="{{ STATIC_URL }}css/site_tabs.css" />
Expand All @@ -15,16 +13,12 @@
{% block extra_head %}{% endblock %}
{% endblock %}

{% block logo_link_image %}<a href="{% url home %}"><img src="{{ STATIC_URL }}pinax/img/logo.png" alt="Pinax"/></a>{% endblock %}

{% block login %}
{% if user.is_authenticated %}
{% ifopenid %}<img src="{{ STATIC_URL }}images/openid-icon.png" alt="Logged in with OpenID" />{% endifopenid %}<b>{% user_display user %}</b> | <a href="{% url acct_email %}">{% trans "Account" %}</a> | {% if user.is_staff %}<a href="/admin/">{% trans "Admin" %}</a> | {% endif %}<a href="/openid/logout/?next={% url acct_logout %}">{% trans "Logout" %}</a>
{% else %}
<a href="{% url acct_login %}">{% trans "Login" %}</a>
{% endif %}
{% include "_account_bar.html" %}
{% endblock %}

{% block logo_link_image %}<a href="{% url home %}"><img src="{{ STATIC_URL }}pinax/img/logo.png" alt="Pinax"/></a>{% endblock %}

{% block right_tabs %}
{% if user.is_authenticated %}
<ul class="tabs">{% spaceless %}
Expand All @@ -38,14 +32,13 @@
{% endif %}
{% endblock %}

{% block footer %}
<div class="legal">All information on this site is Company Confidential unless otherwise specified.</div>
{% endblock %}

{% block extra_body_base %}
<script src="{{ STATIC_URL }}jquery-1.3.min.js" type="text/javascript"></script>
<script src="{{ STATIC_URL }}tasks/js/tasks.js" type="text/javascript"></script>
<script src="{{ STATIC_URL }}pinax/js/topics.js" type="text/javascript"></script>
<script src="{{ STATIC_URL }}js/comments.js" type="text/javascript"></script>
{% block extra_body %}{% endblock %}
{% endblock %}

{% block footer %}
<div class="legal">All information on this site is Company Confidential unless otherwise specified.</div>
{% endblock %}
{% endblock %}
33 changes: 14 additions & 19 deletions pinax/projects/intranet_project/urls.py
Expand Up @@ -14,32 +14,27 @@
from pinax.apps.topics.models import Topic



handler500 = "pinax.views.server_error"


urlpatterns = patterns("",
url(r"^$", direct_to_template, {
"template": "homepage.html",
}, name="home"),

url(r"^admin/invite_user/$", "pinax.apps.signup_codes.views.admin_invite_user", name="admin_invite_user"),
url(r"^account/signup/$", "pinax.apps.signup_codes.views.signup", name="acct_signup"),

(r"^account/", include("pinax.apps.account.urls")),
(r"^openid/(.*)", PinaxConsumer()),
(r"^profiles/", include("pinax.apps.basic_profiles.urls")),
(r"^notices/", include("notification.urls")),
(r"^announcements/", include("announcements.urls")),
(r"^tagging_utils/", include("pinax.apps.tagging_utils.urls")),
(r"^attachments/", include("attachments.urls")),
(r"^bookmarks/", include("bookmarks.urls")),
(r"^tasks/", include("pinax.apps.tasks.urls")),
(r"^topics/", include("pinax.apps.topics.urls")),
(r"^comments/", include("threadedcomments.urls")),
(r"^wiki/", include("wiki.urls")),

(r"^admin/", include(admin.site.urls)),
url(r"^admin/", include(admin.site.urls)),
url(r"^account/", include("pinax.apps.account.urls")),
url(r"^openid/(.*)", PinaxConsumer()),
url(r"^profiles/", include("idios.urls")),
url(r"^notices/", include("notification.urls")),
url(r"^announcements/", include("announcements.urls")),
url(r"^tagging_utils/", include("pinax.apps.tagging_utils.urls")),
url(r"^attachments/", include("attachments.urls")),
url(r"^bookmarks/", include("bookmarks.urls")),
url(r"^tasks/", include("pinax.apps.tasks.urls")),
url(r"^topics/", include("pinax.apps.topics.urls")),
url(r"^comments/", include("threadedcomments.urls")),
url(r"^wiki/", include("wiki.urls")),
)


Expand Down Expand Up @@ -73,5 +68,5 @@

if settings.SERVE_MEDIA:
urlpatterns += patterns("",
(r"", include("staticfiles.urls")),
url(r"", include("staticfiles.urls")),
)

0 comments on commit d5f2e4a

Please sign in to comment.