diff --git a/manage.py b/manage.py new file mode 100755 index 0000000000000000000000000000000000000000..73ba18b4dedf8152c60624389dc56f0a9bd4b41a --- /dev/null +++ b/manage.py @@ -0,0 +1,11 @@ +#! /usr/bin/env python + +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "panikweb.settings") + + from django.core.management import execute_from_command_line + + execute_from_command_line(sys.argv) diff --git a/panikweb/__init__.py b/panikweb/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/panikweb/settings.py b/panikweb/settings.py new file mode 100644 index 0000000000000000000000000000000000000000..33f665ff50ee6f992c49434f154532b213359c54 --- /dev/null +++ b/panikweb/settings.py @@ -0,0 +1,156 @@ +#!/usr/bin/env python +# coding: utf-8 + +import os + +DEBUG = True # Turn off for production +TEMPLATE_DEBUG = DEBUG +DEBUG_TOOLBAR = False + +PROJECT_DIR = os.path.normpath(os.path.dirname(os.path.dirname(__file__))) +ADMINS = ( + # ('Your Name', 'your_email@domain.com'), +) +MANAGERS = ADMINS +DEFAULT_FROM_EMAIL = 'info@radiopanik.org' + +LOGIN_REDIRECT_URL = '/' + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(PROJECT_DIR, 'panikweb.sqlite3'), + 'USER': '', + 'PASSWORD': '', + 'HOST': '', + 'PORT': '', + }, +} + +ACCOUNT_ACTIVATION_DAYS = 7 # Activation window + +#if django.VERSION[:2] < (1, 6): +TEST_RUNNER = 'discover_runner.DiscoverRunner' + +# Local time zone for this installation. Choices can be found here: +# 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 = 'Europe/Brussels' + +# Language code for this installation. All choices can be found here: +# http://www.i18nguy.com/unicode/language-identifiers.html +LANGUAGE_CODE = 'en-us' + +LANGUAGES = ( + ('fr', u'Français'), +) + +SITE_ID = 1 + +# If you set this to False, Django will make some optimizations so as not +# to load the internationalization machinery. +USE_I18N = True + +# Absolute filesystem path to the directory that will hold user-uploaded files. +# Example: "/home/media/media.lawrence.com/media/" +MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media') + +# URL that handles the media served from MEDIA_ROOT. Make sure to use a +# trailing slash. +# Examples: "http://media.lawrence.com/media/", "http://example.com/media/" +MEDIA_URL = '' + +# Absolute path to the directory static files should be collected to. +# Don't put anything in this directory yourself; store your static files +# in apps' "static/" subdirectories and in STATICFILES_DIRS. +# Example: "/home/media/media.lawrence.com/static/" +STATIC_ROOT = os.path.join(PROJECT_DIR, 'staticroot') + +# URL prefix for static files. +# Example: "http://media.lawrence.com/static/" +STATIC_URL = '/static/' + +# Additional locations of static files +STATICFILES_DIRS = ( + # Put strings here, like "/home/html/static" or "C:/www/django/static". + # Always use forward slashes, even on Windows. + # Don't forget to use absolute paths, not relative paths. +) + +# List of finder classes that know how to find static files in +# various locations. +STATICFILES_FINDERS = ( + 'django.contrib.staticfiles.finders.FileSystemFinder', + 'django.contrib.staticfiles.finders.AppDirectoriesFinder', +# 'django.contrib.staticfiles.finders.DefaultStorageFinder', +) + +# Make this unique, and don't share it with anybody. +SECRET_KEY = '3qm&@6264-=st16)7_xa*ds+31e0mqqs@+*!ud7gzt$tq!b^qn' + +# List of callables that know how to import templates from various sources. +TEMPLATE_LOADERS = ( + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', +# 'django.template.loaders.eggs.load_template_source', +) + +MIDDLEWARE_CLASSES = ( + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.locale.LocaleMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + #'request.middleware.RequestMiddleware', +) + +ROOT_URLCONF = 'panikweb.urls' + +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. +) + +INSTALLED_APPS = ( + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'django.contrib.admin', + 'django.contrib.admindocs', + 'panikweb_templates', + 'jquery', + 'registration', + 'ckeditor', + 'datetimewidget', + 'emissions', + 'newsletter', +) + +CKEDITOR_UPLOAD_PATH = os.path.join(MEDIA_ROOT, 'uploads') +CKEDITOR_UPLOAD_PREFIX = '/media/uploads/' + + +try: + from local_settings import * +except ImportError, e: + pass + +if DEBUG and DEBUG_TOOLBAR: + MIDDLEWARE_CLASSES += ( + 'debug_toolbar.middleware.DebugToolbarMiddleware', + ) + INSTALLED_APPS += ( + 'debug_toolbar', + ) + DEBUG_TOOLBAR_CONFIG = { + 'INTERCEPT_REDIRECTS': False, + } + + diff --git a/panikweb/urls.py b/panikweb/urls.py new file mode 100644 index 0000000000000000000000000000000000000000..0c8be089f1513e8ab96b134c471f6ab8f4866937 --- /dev/null +++ b/panikweb/urls.py @@ -0,0 +1,24 @@ +from django.conf.urls import patterns, include, url +from django.views.generic import RedirectView +from django.core.urlresolvers import reverse_lazy + +from django.contrib import admin +admin.autodiscover() + +urlpatterns = patterns('', + url(r'^$', 'panikweb.views.home', name='home'), + url(r'^emissions/', include('emissions.urls')), + url(r'^ckeditor/', include('ckeditor.urls')), + + url(r'^accounts/', include('registration.backends.default.urls')), + url(r'^admin/', include(admin.site.urls)), + url(r'^admin/doc/', include('django.contrib.admindocs.urls')), +) + +from django.contrib.staticfiles.urls import staticfiles_urlpatterns +urlpatterns += staticfiles_urlpatterns() + +try: + from local_urls import * +except ImportError, e: + pass diff --git a/panikweb/views.py b/panikweb/views.py new file mode 100644 index 0000000000000000000000000000000000000000..eac7fd21f6f5b1a7bc620b99840202e7e5387f19 --- /dev/null +++ b/panikweb/views.py @@ -0,0 +1,6 @@ +from django.views.generic.base import TemplateView + +class Home(TemplateView): + template_name = 'home.html' + +home = Home.as_view() diff --git a/panikweb_templates/__init__.py b/panikweb_templates/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/panikweb_templates/static/css/style.css b/panikweb_templates/static/css/style.css new file mode 100644 index 0000000000000000000000000000000000000000..05df1d4784f6c54c5db0bc3b4619b56cc0cbecdd --- /dev/null +++ b/panikweb_templates/static/css/style.css @@ -0,0 +1,4 @@ +body { + background: #eef; + color: #333; +} diff --git a/panikweb_templates/templates/base.html b/panikweb_templates/templates/base.html new file mode 100644 index 0000000000000000000000000000000000000000..f326c79ab578b5f71d959a645c40b1cd6f15f4ff --- /dev/null +++ b/panikweb_templates/templates/base.html @@ -0,0 +1,21 @@ +{% load url from future %}{% load i18n %} + + + {% block title %}Radio Panik{% endblock %} + + + + + {% block head %}{% endblock %} + {% block extrascripts %}{% endblock %} + + + + +

Radio Panik — 105.4

+ + {% block content %} + {% endblock %} + + + diff --git a/panikweb_templates/templates/home.html b/panikweb_templates/templates/home.html new file mode 100644 index 0000000000000000000000000000000000000000..abe335037f6d934e4e150497ba6702970a28d804 --- /dev/null +++ b/panikweb_templates/templates/home.html @@ -0,0 +1,7 @@ +{% extends "base.html" %} + +{% block content %} + +

Plop

+ +{% endblock %} diff --git a/panikweb_templates/templates/panikdb/base.html b/panikweb_templates/templates/panikdb/base.html new file mode 100644 index 0000000000000000000000000000000000000000..94d9808cc760156cb7ab46e326c0267f3406125e --- /dev/null +++ b/panikweb_templates/templates/panikdb/base.html @@ -0,0 +1 @@ +{% extends "base.html" %} diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..d7aa1c11c72a325062c2372764dbb90fe2e7017b --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +Django<1.6 +django-ckeditor +git+https://github.com/toastdriven/django-haystack.git diff --git a/setup.py b/setup.py new file mode 100644 index 0000000000000000000000000000000000000000..10c777d1781e22ec67c8276ed2c34fa3da794262 --- /dev/null +++ b/setup.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python + +from setuptools import setup + +setup(name='panikweb', + version='0.1', + description='Radio Panik Website', + author='Frederic Peters', + author_email='fpeters@0d.be', + url='http://www.radiopanik.org', + packages=[ + 'emissions', + 'newsletter', + ], + install_requires=[ + 'django', + 'django-jquery', + 'django-registration', + 'django-datetime-widget', + ], + license='GPL', + classifiers=['Development Status :: 3 - Alpha', + 'Environment :: Web Environment', + 'Framework :: Django', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: GNU General Public License (GPL) License', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Topic :: Internet :: WWW/HTTP', + 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', + ], + )