base template
This commit is contained in:
parent
10a5fe613f
commit
27704831a6
6
nsupdate/main/urls.py
Normal file
6
nsupdate/main/urls.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
from django.conf.urls import patterns, include, url
|
||||||
|
from django.views.generic import TemplateView
|
||||||
|
|
||||||
|
urlpatterns = patterns('',
|
||||||
|
url(r'^$', TemplateView.as_view(template_name="base.html")),
|
||||||
|
)
|
@ -11,8 +11,8 @@ MANAGERS = ADMINS
|
|||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': {
|
||||||
'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
|
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
|
||||||
'NAME': '', # Or path to database file if using sqlite3.
|
'NAME': 'nsupdate.sqlite', # Or path to database file if using sqlite3.
|
||||||
# The following settings are not used with sqlite3:
|
# The following settings are not used with sqlite3:
|
||||||
'USER': '',
|
'USER': '',
|
||||||
'PASSWORD': '',
|
'PASSWORD': '',
|
||||||
@ -23,13 +23,13 @@ DATABASES = {
|
|||||||
|
|
||||||
# Hosts/domain names that are valid for this site; required if DEBUG is False
|
# Hosts/domain names that are valid for this site; required if DEBUG is False
|
||||||
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
|
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
|
||||||
ALLOWED_HOSTS = []
|
ALLOWED_HOSTS = ['nsupdate.info', 'www.nsupdate.info']
|
||||||
|
|
||||||
# Local time zone for this installation. Choices can be found here:
|
# Local time zone for this installation. Choices can be found here:
|
||||||
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
||||||
# although not all choices may be available on all operating systems.
|
# although not all choices may be available on all operating systems.
|
||||||
# In a Windows environment this must be set to your system time zone.
|
# In a Windows environment this must be set to your system time zone.
|
||||||
TIME_ZONE = 'America/Chicago'
|
TIME_ZONE = 'Europe/Berlin'
|
||||||
|
|
||||||
# Language code for this installation. All choices can be found here:
|
# Language code for this installation. All choices can be found here:
|
||||||
# http://www.i18nguy.com/unicode/language-identifiers.html
|
# http://www.i18nguy.com/unicode/language-identifiers.html
|
||||||
@ -120,10 +120,10 @@ INSTALLED_APPS = (
|
|||||||
'django.contrib.sites',
|
'django.contrib.sites',
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
# Uncomment the next line to enable the admin:
|
'django.contrib.admin',
|
||||||
# 'django.contrib.admin',
|
'south',
|
||||||
# Uncomment the next line to enable admin documentation:
|
'nsupdate',
|
||||||
# 'django.contrib.admindocs',
|
'main',
|
||||||
)
|
)
|
||||||
|
|
||||||
# A sample logging configuration. The only tangible logging
|
# A sample logging configuration. The only tangible logging
|
||||||
|
3
nsupdate/nsupdate/static/css/nsupdate.css
Normal file
3
nsupdate/nsupdate/static/css/nsupdate.css
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.content {
|
||||||
|
margin-top: 40px;
|
||||||
|
}
|
47
nsupdate/nsupdate/templates/base.html
Normal file
47
nsupdate/nsupdate/templates/base.html
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{% load static from staticfiles %}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="author" content="nsupdate.info team">
|
||||||
|
|
||||||
|
<title>{% block title %}nsupdate.info{% endblock %}</title>
|
||||||
|
|
||||||
|
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<link href="{% static 'css/nsupdate.css' %}" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
|
<div class="container">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<a class="navbar-brand" href="#">nsupdate.info</a>
|
||||||
|
</div>
|
||||||
|
<div class="collapse navbar-collapse">
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<li class="active"><a href="#">Home</a></li>
|
||||||
|
<li><a href="#about">About</a></li>
|
||||||
|
<li><a href="#contact">Contact</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container content">
|
||||||
|
{% block content %}
|
||||||
|
<h1>Heyho!</h1>
|
||||||
|
<p>Welcome to the base template. Extend this template in all other
|
||||||
|
templates and override the content block</p>
|
||||||
|
{% endblock %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -1,17 +1,17 @@
|
|||||||
from django.conf.urls import patterns, include, url
|
from django.conf.urls import patterns, include, url
|
||||||
|
from django.views.generic import TemplateView
|
||||||
|
|
||||||
# Uncomment the next two lines to enable the admin:
|
from django.contrib import admin
|
||||||
# from django.contrib import admin
|
admin.autodiscover()
|
||||||
# admin.autodiscover()
|
|
||||||
|
|
||||||
urlpatterns = patterns('',
|
urlpatterns = patterns('',
|
||||||
# Examples:
|
url(r'^admin/', include(admin.site.urls)),
|
||||||
# url(r'^$', 'nsupdate.views.home', name='home'),
|
url(r'^', include('main.urls')),
|
||||||
# url(r'^nsupdate/', include('nsupdate.foo.urls')),
|
|
||||||
|
|
||||||
# Uncomment the admin/doc line below to enable admin documentation:
|
|
||||||
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
|
||||||
|
|
||||||
# Uncomment the next line to enable the admin:
|
|
||||||
# url(r'^admin/', include(admin.site.urls)),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
|
|
||||||
|
if settings.DEBUG:
|
||||||
|
urlpatterns += patterns('django.contrib.staticfiles.views',
|
||||||
|
url(r'^static/(?P<path>.*)$', 'serve'),
|
||||||
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user