forked from rhizomedotorg/classic.rhizome.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f9df694
Showing
2,303 changed files
with
258,891 additions
and
0 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,11 @@ | ||
*.pyc | ||
*.DS_Store | ||
site_media/ | ||
search_index/ | ||
sitemaps/ | ||
logs/ | ||
venv/ | ||
.sass-cache/ | ||
rhizome/local_settings.py | ||
local_settings.py | ||
fabfile.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
|
||
/rza | ||
|
||
staffuser | ||
123 | ||
|
||
export CFLAGS=-Qunused-arguments | ||
export CPPFLAGS=-Qunused-arguments | ||
|
||
Installation | ||
============ | ||
|
||
clone repo | ||
|
||
```bash | ||
virtualenv venv | ||
``` | ||
|
||
note: 2.6.5 or newer | ||
if multiple versions on system, specify w/ -p flag: | ||
|
||
```bash | ||
virtualenv -p /usr/local/bin/python venv | ||
``` | ||
|
||
```bash | ||
sh sysop_setup_local.sh | ||
``` | ||
|
||
```bash | ||
Could not access or create artbase CouchDB database | ||
``` | ||
|
||
```bash | ||
Failed to install index for... | ||
``` | ||
|
Empty file.
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,17 @@ | ||
from django.contrib import admin | ||
from models import Press, StaffMember | ||
|
||
|
||
class PressAdmin(admin.ModelAdmin): | ||
|
||
class Meta: | ||
model = Press | ||
|
||
class StaffMemberAdmin(admin.ModelAdmin): | ||
raw_id_fields = ('user',) | ||
|
||
class Meta: | ||
model = StaffMember | ||
|
||
admin.site.register(Press,PressAdmin) | ||
admin.site.register(StaffMember,StaffMemberAdmin) |
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,55 @@ | ||
import datetime | ||
|
||
from django.db import models | ||
from django.contrib.auth.models import User | ||
from django.utils.html import strip_tags | ||
|
||
from countries.models import Country, UsState | ||
from utils.helpers import clean_html | ||
|
||
class StaffMember(models.Model): | ||
user = models.ForeignKey(User, null=True, blank=True) | ||
first_name = models.CharField(max_length = 100) | ||
last_name = models.CharField(max_length = 100) | ||
position = models.CharField(max_length = 100) | ||
bio = models.TextField() | ||
email = models.EmailField() | ||
url = models.URLField(max_length = 255,null=True,blank=True) | ||
|
||
def __unicode__(self): | ||
return '%s' % (self.email) | ||
|
||
|
||
def save(self, *args, **kwargs): | ||
''' On save, clean HTML ''' | ||
self.bio = clean_html(self.bio) | ||
super(StaffMember, self).save(*args, **kwargs) | ||
|
||
def press_upload_to(self, filename): | ||
title = filename.split('.')[0] | ||
extension = filename.split('.')[-1] | ||
#add check extension logic | ||
self.image = 'about/press/%s.%s' % (title,extension) | ||
return 'about/press/%s.%s' % (title,extension) | ||
|
||
class Press(models.Model): | ||
publication = models.CharField(max_length = 255) | ||
article_title = models.CharField(max_length = 255) | ||
article_url = models.URLField(max_length = 255) | ||
publication_date = models.DateField() | ||
excerpt = models.TextField() | ||
article_full_text = models.TextField(null=True, blank=True) | ||
document = models.FileField(null=True, blank=True,upload_to = press_upload_to) | ||
|
||
def __unicode__(self): | ||
return '%s on %s' % (self.publication, self.publication_date) | ||
|
||
class Meta: | ||
verbose_name = "Press Clipping" | ||
verbose_name_plural = "Press Clippings" | ||
|
||
def save(self, *args, **kwargs): | ||
''' On save, clean HTML ''' | ||
self.excerpt = clean_html(self.excerpt) | ||
self.article_full_text = clean_html(self.article_full_text) | ||
super(Press, self).save(*args, **kwargs) |
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 @@ | ||
from django.conf.urls.defaults import patterns, url | ||
from about.views import about, policy, press | ||
|
||
urlpatterns = patterns('', | ||
url(r'^$', about, name='about-about'), | ||
url(r'^policy/$', policy, name='about-policy'), | ||
url(r'^press/$', press, name='about-press'), | ||
) |
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 @@ | ||
from django.template.context import RequestContext | ||
from django.shortcuts import render_to_response | ||
from utils.template import RhizomePaginator | ||
|
||
from about.models import StaffMember, Press | ||
|
||
|
||
def about(request): | ||
return render_to_response('about/about.html', { | ||
'breadcrumb': (('About', None),), | ||
'staff_members': StaffMember.objects.all().order_by('last_name'), | ||
}, RequestContext(request)) | ||
|
||
def press(request): | ||
press = Press.objects.all().order_by('-publication_date') | ||
press_paginator = RhizomePaginator(press, per_page=15, url=request.get_full_path()) | ||
press_paginator.set_current_page(request.GET.get('page')) | ||
|
||
return render_to_response('about/press.html', { | ||
'breadcrumb': (('Press', None),), | ||
'press_paginator': press_paginator, | ||
}, RequestContext(request)) | ||
|
||
def policy(request): | ||
return render_to_response('about/policy.html', { | ||
'breadcrumb': (('Policy', None),), | ||
}, RequestContext(request)) |
Empty file.
Oops, something went wrong.