From f025a9f65ecd76e4442ce62684218ecb81506c9b Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sun, 4 Feb 2007 04:31:39 -0800 Subject: basic html design roughed in, django project run and admin started TODO: ie testing (ugh, fuck that) TODO: get photos section working TODO: ... etc --- bn_django/bn_wiki/__init__.py | 0 bn_django/bn_wiki/models.py | 3 -- bn_django/bn_wiki/views.py | 1 - bn_django/git_wiki/__init__.py | 0 bn_django/git_wiki/models.py | 3 ++ bn_django/git_wiki/views.py | 1 + bn_django/settings.py | 6 +++ bn_django/templates/.about.html.swp | Bin 0 -> 12288 bytes bn_django/templates/about.html | 31 ++++++++++++++ bn_django/templates/base.html | 51 ++++++++++++++++++++++++ bn_django/templates/copyright.html | 12 ++++++ bn_django/templates/credits.html | 19 +++++++++ bn_django/templates/flatpages/default.html | 7 ++++ bn_django/templates/frontpage.html | 31 ++++++++++++++ bn_django/templates/static/directory_index.html | 13 ++++++ bn_django/urls.py | 14 +++++-- 16 files changed, 185 insertions(+), 7 deletions(-) delete mode 100644 bn_django/bn_wiki/__init__.py delete mode 100644 bn_django/bn_wiki/models.py delete mode 100644 bn_django/bn_wiki/views.py create mode 100644 bn_django/git_wiki/__init__.py create mode 100644 bn_django/git_wiki/models.py create mode 100644 bn_django/git_wiki/views.py create mode 100644 bn_django/templates/.about.html.swp create mode 100644 bn_django/templates/about.html create mode 100644 bn_django/templates/base.html create mode 100644 bn_django/templates/copyright.html create mode 100644 bn_django/templates/credits.html create mode 100644 bn_django/templates/flatpages/default.html create mode 100644 bn_django/templates/frontpage.html create mode 100644 bn_django/templates/static/directory_index.html (limited to 'bn_django') diff --git a/bn_django/bn_wiki/__init__.py b/bn_django/bn_wiki/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/bn_django/bn_wiki/models.py b/bn_django/bn_wiki/models.py deleted file mode 100644 index 71a8362..0000000 --- a/bn_django/bn_wiki/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/bn_django/bn_wiki/views.py b/bn_django/bn_wiki/views.py deleted file mode 100644 index 60f00ef..0000000 --- a/bn_django/bn_wiki/views.py +++ /dev/null @@ -1 +0,0 @@ -# Create your views here. diff --git a/bn_django/git_wiki/__init__.py b/bn_django/git_wiki/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/bn_django/git_wiki/models.py b/bn_django/git_wiki/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/bn_django/git_wiki/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/bn_django/git_wiki/views.py b/bn_django/git_wiki/views.py new file mode 100644 index 0000000..60f00ef --- /dev/null +++ b/bn_django/git_wiki/views.py @@ -0,0 +1 @@ +# Create your views here. 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 Binary files /dev/null and b/bn_django/templates/.about.html.swp 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 %} +

+

+ +
+
the perp
+
+This website is the web presence of Bryan Newbold. It serves as a: +
+
brain dump +
so I won't forget +
photo gallery +
browsable code repository +
so people (including myself!) don't have to rewrite +
home for other projects +
like... mmmmm +
waste of time +
(most importantly!) +
+

+If you're curious about the technology that runs the site, see the credits. +{% 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 @@ + + + + + +bryannewbold.com + + +

+ +
+
+ +{% block path %}{% endblock %} + +

{% block title %}Hey Hey Hey!{% endblock %}

+
+{% block right_stuff %} +  +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 %} +
+
+ + +
+{% block content %} +Here lies content! +{% endblock %} +
+ + + 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 %} +

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. +

If I had to chose a licence it would probably be MIT or BSD style. +

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! +

operating system

+

It's freeBSD under the hood when not hosted elsewhere. +

web framework

+

The site is powered by the django toolkit (which runs on python). +

I use the stockphoto app written by Jason McBrayer for the photos section. +

text editor

+

vim! fuck emacs! +

versioning system

+

I use git as a revisioning system for the knowledge wiki and my software (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: : : : : : : : : : : : : : +

+{% 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 %} +

Index of {{ directory }}

+{% endblock %} + +{% block content %} + +{% 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.*)$', 'django.views.static.serve', {'document_root': '/home/bnewbold/bn-project/static', 'show_indexes': True}), + (r'^style/(?P.*)$', 'django.views.static.serve', {'document_root': '/home/bnewbold/bn-project/static/style'}), ) -- cgit v1.2.3