summaryrefslogtreecommitdiffstats
path: root/bn_django
diff options
context:
space:
mode:
authorbnewbold <bnewbold@manus.(none)>2007-02-04 04:31:39 -0800
committerbnewbold <bnewbold@manus.(none)>2007-02-04 04:31:39 -0800
commitf025a9f65ecd76e4442ce62684218ecb81506c9b (patch)
treeb303b156110167249c033751fa1c14ede2f75dc4 /bn_django
parent08ef0f8e464fed2fe8ec20b6c53220aecc025f2d (diff)
downloadbnewnet-f025a9f65ecd76e4442ce62684218ecb81506c9b.tar.gz
bnewnet-f025a9f65ecd76e4442ce62684218ecb81506c9b.zip
basic html design roughed in, django project run and admin started
TODO: ie testing (ugh, fuck that) TODO: get photos section working TODO: ... etc
Diffstat (limited to 'bn_django')
-rw-r--r--bn_django/git_wiki/__init__.py (renamed from bn_django/bn_wiki/__init__.py)0
-rw-r--r--bn_django/git_wiki/models.py (renamed from bn_django/bn_wiki/models.py)0
-rw-r--r--bn_django/git_wiki/views.py (renamed from bn_django/bn_wiki/views.py)0
-rw-r--r--bn_django/settings.py6
-rw-r--r--bn_django/templates/.about.html.swpbin0 -> 12288 bytes
-rw-r--r--bn_django/templates/about.html31
-rw-r--r--bn_django/templates/base.html51
-rw-r--r--bn_django/templates/copyright.html12
-rw-r--r--bn_django/templates/credits.html19
-rw-r--r--bn_django/templates/flatpages/default.html7
-rw-r--r--bn_django/templates/frontpage.html31
-rw-r--r--bn_django/templates/static/directory_index.html13
-rw-r--r--bn_django/urls.py14
13 files changed, 181 insertions, 3 deletions
diff --git a/bn_django/bn_wiki/__init__.py b/bn_django/git_wiki/__init__.py
index e69de29..e69de29 100644
--- a/bn_django/bn_wiki/__init__.py
+++ b/bn_django/git_wiki/__init__.py
diff --git a/bn_django/bn_wiki/models.py b/bn_django/git_wiki/models.py
index 71a8362..71a8362 100644
--- a/bn_django/bn_wiki/models.py
+++ b/bn_django/git_wiki/models.py
diff --git a/bn_django/bn_wiki/views.py b/bn_django/git_wiki/views.py
index 60f00ef..60f00ef 100644
--- a/bn_django/bn_wiki/views.py
+++ b/bn_django/git_wiki/views.py
diff --git a/bn_django/settings.py b/bn_django/settings.py
index 10144d0..282f4c9 100644
--- a/bn_django/settings.py
+++ b/bn_django/settings.py
@@ -59,6 +59,7 @@ MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
'django.middleware.doc.XViewMiddleware',
)
@@ -68,6 +69,7 @@ TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
+ '/home/bnewbold/bn-project/bn_django/templates',
)
INSTALLED_APPS = (
@@ -75,4 +77,8 @@ INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
+ 'django.contrib.admin',
+ 'django.contrib.flatpages',
+ 'bn_django.photos',
+ 'bn_django.git_wiki',
)
diff --git a/bn_django/templates/.about.html.swp b/bn_django/templates/.about.html.swp
new file mode 100644
index 0000000..40f88fd
--- /dev/null
+++ b/bn_django/templates/.about.html.swp
Binary files differ
diff --git a/bn_django/templates/about.html b/bn_django/templates/about.html
new file mode 100644
index 0000000..eb03970
--- /dev/null
+++ b/bn_django/templates/about.html
@@ -0,0 +1,31 @@
+{% extends "base.html" %}
+
+{% block path %}{% endblock %}
+
+{% block title %}About bryannewbold.com{% endblock %}
+
+{% block right_stuff %}
+{% endblock %}
+
+{% block content %}
+<p />
+<div class="lefty_content">
+ <img src="/static/img/orange_small.jpg" />
+ <br />
+ <div class="content_caption">the perp</div>
+</div>
+This website is the web presence of <a href="k/BryanNewbold">Bryan Newbold</a>. It serves as a:
+<dl>
+ <dt /><a href="/knowledge">brain dump</a>
+ <dd /> so I won't forget
+ <dt /><a href="/photos">photo gallery</a>
+ <dt /><a href="/code">browsable code repository</a>
+ <dd /> so people (including myself!) don't have to rewrite
+ <dt />home for other projects
+ <dd /> like... mmmmm
+ <dt />waste of time
+ <dd /> (most importantly!)
+</dl>
+<p />
+If you're curious about the technology that runs the site, see the <a href="/credits">credits</a>.
+{% endblock %}
diff --git a/bn_django/templates/base.html b/bn_django/templates/base.html
new file mode 100644
index 0000000..a87d0a5
--- /dev/null
+++ b/bn_django/templates/base.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<link rel="STYLESHEET" type="text/css" href="style/default.css">
+<link rel="STYLESHEET" type="text/css" href="/style/default.css">
+<title>bryannewbold.com</title>
+</head>
+<body>
+<div id="top_bar">
+ <div id="top_bar_content">
+ <span class="lefty"><a href="/">bryannewbold.com</a></span>
+ <span class="righty"><a href="/knowledge">knowledge</a>&nbsp;
+ <a href="/photos">photos</a>&nbsp;
+ <a href="/code">code</a>&nbsp;
+ <a href="/projects">projects</a>
+ </div>
+</div>
+<div class="content" id="main_title">
+<span class="path">
+{% block path %}{% endblock %}
+</span>
+<h1>{% block title %}Hey Hey Hey!{% endblock %}</h1>
+<div class="right_stuff">
+{% block right_stuff %}
+&nbsp;
+hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey
+hey hey hey
+{% endblock %}
+</div>
+</div>
+
+
+<div class="content" id="main_content">
+{% block content %}
+Here lies content!
+{% endblock %}
+</div>
+<div class="content_footer" id="footer" name="footer">
+<b>
+<a href="/">home</a> &nbsp;&nbsp;
+<a href="/about">about</a> &nbsp;&nbsp;
+<a href="/credits">credits</a> &nbsp;&nbsp;
+<a href="mailto:webmeisterATbryannewbold.com">email the webmaster</a> &nbsp;&nbsp;
+<a href="http://web.mit.edu/">hosted by MIT</a> &nbsp;
+</b>
+<br />
+produced in 2007 by <a href="/k/BryanNewbold">bryan newbold</a>, <a href="/copyright">all rights ignored</a>
+</div>
+</body>
+</html>
diff --git a/bn_django/templates/copyright.html b/bn_django/templates/copyright.html
new file mode 100644
index 0000000..142cdc6
--- /dev/null
+++ b/bn_django/templates/copyright.html
@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block title %}Fuck Copyrights{% endblock %}
+
+{% block right_stuff %}
+{% endblock %}
+
+{% block content %}
+<p />I'm not a big fan of copyrights or licensing. Feel free to use the content and code from this website however you please. I would appreciate attribution or at least letting me know if you're doing something cool, but it's not required.
+<p />If I had to chose a licence it would probably be MIT or BSD style.
+<p />I don't think i've violated any other person's rights, but if you think something is a copied and/or unattributed drop a dime!
+{% endblock %}
diff --git a/bn_django/templates/credits.html b/bn_django/templates/credits.html
new file mode 100644
index 0000000..b96d2a9
--- /dev/null
+++ b/bn_django/templates/credits.html
@@ -0,0 +1,19 @@
+{% extends "base.html" %}
+
+{% block title %}Software credits{% endblock %}
+
+{% block right_stuff %}
+{% endblock %}
+
+{% block content %}
+This site uses a variety of delicious software!
+<h3>operating system</h3>
+<p />It's <a href="http://freebsd.org">freeBSD</a> under the hood when not hosted elsewhere.
+<h3>web framework</h3>
+<p />The site is powered by the <a href="http://djangoproject.com/">django</a> toolkit (which runs on <a href="http://python.org">python</a>).
+<p />I use the <a href="http://www.carcosa.net/jason/software/django/stockphoto/">stockphoto</a> app written by Jason McBrayer for the photos section.
+<h3>text editor</h3>
+<p /><a href="http://vim.org">vim</a>! fuck emacs!
+<h3>versioning system</h3>
+<p />I use git as a revisioning system for the <a href="knowledge">knowledge wiki</a> and my <a href="code">software</a> (including this site!).
+{% endblock %}
diff --git a/bn_django/templates/flatpages/default.html b/bn_django/templates/flatpages/default.html
new file mode 100644
index 0000000..49c773a
--- /dev/null
+++ b/bn_django/templates/flatpages/default.html
@@ -0,0 +1,7 @@
+{% extends "base.html" %}
+
+{% block title %}{{ flatpage.title }}{% endblock %}
+
+{% block content %}
+{{ flatpage.content }}
+{% endblock %}
diff --git a/bn_django/templates/frontpage.html b/bn_django/templates/frontpage.html
new file mode 100644
index 0000000..47a55dd
--- /dev/null
+++ b/bn_django/templates/frontpage.html
@@ -0,0 +1,31 @@
+{% extends "base.html" %}
+
+{% block path %}{% endblock %}
+
+{% block title %}Welcome to a brave new bold world!{% endblock %}
+
+{% block right_stuff %}
+Other sites: : : : : : : : : : : : : :
+<ul>
+ <li /><a href="http://web.mit.edu/bnewbold/www">athena locker</a>
+</ul>
+{% endblock %}
+
+{% block content %}
+ There will be more forthcoming ...
+ There will be more stuff forthcoming ...
+ There will be more forthcoming ...
+ There will be more forthcoming ...
+ There will be more forthcoming ...
+ There will be more forthcoming ...
+ There will be more forthcoming ...
+ There will be more forthcoming ...
+ There will be more forthcoming ...
+ There will be more forthcoming ...
+ There will be more forthcoming ...
+ There will be more forthcoming ...
+ There will be more forthcoming ...
+ There will be more forthcoming ...
+
+
+{% endblock %}
diff --git a/bn_django/templates/static/directory_index.html b/bn_django/templates/static/directory_index.html
new file mode 100644
index 0000000..6df279d
--- /dev/null
+++ b/bn_django/templates/static/directory_index.html
@@ -0,0 +1,13 @@
+{% extends "base.html" %}
+
+{% block title %}
+<h1>Index of {{ directory }}</h1>
+{% endblock %}
+
+{% block content %}
+<ul>
+{% for f in file_list %}
+<li><a href="{{ f }}">{{ f }}</a></li>
+{% endfor %}
+</ul>
+{% endblock %}
diff --git a/bn_django/urls.py b/bn_django/urls.py
index 35b9796..f8b1b62 100644
--- a/bn_django/urls.py
+++ b/bn_django/urls.py
@@ -3,10 +3,18 @@ from django.conf.urls.defaults import *
urlpatterns = patterns('',
# Example:
# (r'^bn_django/', include('bn_django.foo.urls')),
- (r'^knowledge/', include('bn_django.bn_wiki.urls')),
- (r'^code/', include('bn_django.code_browser.urls')),
- (r'^photos/', include('bn_django.photo_gallery.urls')),
+ (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'frontpage.html'}),
+ (r'^about/$', 'django.views.generic.simple.direct_to_template', {'template': 'about.html'}),
+ (r'^credits/$', 'django.views.generic.simple.direct_to_template', {'template': 'credits.html'}),
+ (r'^copyright/$', 'django.views.generic.simple.direct_to_template', {'template': 'copyright.html'}),
+
+
+ (r'^knowledge/', include('bn_django.git_wiki.urls')),
+ (r'^code/', include('bn_django.git_browse.urls')),
+ (r'^photos/', include('bn_django.photos.urls')),
# Uncomment this for admin:
(r'^admin/', include('django.contrib.admin.urls')),
+ (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/home/bnewbold/bn-project/static', 'show_indexes': True}),
+ (r'^style/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/home/bnewbold/bn-project/static/style'}),
)