Initialised with djangocms-installer for Dj 1.6
This commit is contained in:
		
						commit
						7fced7cbae
					
				
					 10 changed files with 316 additions and 0 deletions
				
			
		
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,3 @@ | |||
| /static | ||||
| /media | ||||
| *.pyc | ||||
							
								
								
									
										0
									
								
								mamweb/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								mamweb/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										192
									
								
								mamweb/settings.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										192
									
								
								mamweb/settings.py
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,192 @@ | |||
| import os | ||||
| gettext = lambda s: s | ||||
| """ | ||||
| Django settings for mamweb project. | ||||
| 
 | ||||
| For more information on this file, see | ||||
| https://docs.djangoproject.com/en/1.6/topics/settings/ | ||||
| 
 | ||||
| For the full list of settings and their values, see | ||||
| https://docs.djangoproject.com/en/1.6/ref/settings/ | ||||
| """ | ||||
| 
 | ||||
| # Build paths inside the project like this: os.path.join(BASE_DIR, ...) | ||||
| import os | ||||
| BASE_DIR = os.path.dirname(os.path.dirname(__file__)) | ||||
| 
 | ||||
| 
 | ||||
| # Quick-start development settings - unsuitable for production | ||||
| # See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/ | ||||
| 
 | ||||
| # SECURITY WARNING: keep the secret key used in production secret! | ||||
| SECRET_KEY = 'mj+$6#xw$a8l0!l$qk^mwm@&x+(!*vp5**8j*naxe5*0l_kjv*' | ||||
| 
 | ||||
| # SECURITY WARNING: don't run with debug turned on in production! | ||||
| DEBUG = True | ||||
| 
 | ||||
| TEMPLATE_DEBUG = True | ||||
| 
 | ||||
| ALLOWED_HOSTS = [] | ||||
| 
 | ||||
| 
 | ||||
| # Application definition | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| ROOT_URLCONF = 'mamweb.urls' | ||||
| 
 | ||||
| WSGI_APPLICATION = 'mamweb.wsgi.application' | ||||
| 
 | ||||
| 
 | ||||
| # Database | ||||
| # https://docs.djangoproject.com/en/1.6/ref/settings/#databases | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| # Internationalization | ||||
| # https://docs.djangoproject.com/en/1.6/topics/i18n/ | ||||
| 
 | ||||
| LANGUAGE_CODE = 'cs' | ||||
| 
 | ||||
| TIME_ZONE = 'Europe/Prague' | ||||
| 
 | ||||
| USE_I18N = True | ||||
| 
 | ||||
| USE_L10N = True | ||||
| 
 | ||||
| USE_TZ = True | ||||
| 
 | ||||
| 
 | ||||
| # Static files (CSS, JavaScript, Images) | ||||
| # https://docs.djangoproject.com/en/1.6/howto/static-files/ | ||||
| 
 | ||||
| STATIC_URL = '/static/' | ||||
| MEDIA_URL = '/media/' | ||||
| MEDIA_ROOT = os.path.join(BASE_DIR, 'media') | ||||
| STATIC_ROOT = os.path.join(BASE_DIR, 'static') | ||||
| 
 | ||||
| STATICFILES_DIRS = ( | ||||
|     os.path.join(BASE_DIR, 'mamweb', 'static'), | ||||
| ) | ||||
| SITE_ID = 1 | ||||
| 
 | ||||
| TEMPLATE_LOADERS = ( | ||||
|     'django.template.loaders.filesystem.Loader', | ||||
|     'django.template.loaders.app_directories.Loader', | ||||
|     'django.template.loaders.eggs.Loader' | ||||
| ) | ||||
| 
 | ||||
| MIDDLEWARE_CLASSES = ( | ||||
|     'django.contrib.sessions.middleware.SessionMiddleware', | ||||
|     'django.middleware.csrf.CsrfViewMiddleware', | ||||
|     'django.contrib.auth.middleware.AuthenticationMiddleware', | ||||
|     'django.contrib.messages.middleware.MessageMiddleware', | ||||
|     'django.middleware.locale.LocaleMiddleware', | ||||
|     'django.middleware.doc.XViewMiddleware', | ||||
|     'django.middleware.common.CommonMiddleware', | ||||
|     'django.middleware.clickjacking.XFrameOptionsMiddleware', | ||||
|     'cms.middleware.user.CurrentUserMiddleware', | ||||
|     'cms.middleware.page.CurrentPageMiddleware', | ||||
|     'cms.middleware.toolbar.ToolbarMiddleware', | ||||
|     'cms.middleware.language.LanguageCookieMiddleware' | ||||
| ) | ||||
| 
 | ||||
| TEMPLATE_CONTEXT_PROCESSORS = ( | ||||
|     'django.contrib.auth.context_processors.auth', | ||||
|     'django.contrib.messages.context_processors.messages', | ||||
|     'django.core.context_processors.i18n', | ||||
|     'django.core.context_processors.debug', | ||||
|     'django.core.context_processors.request', | ||||
|     'django.core.context_processors.media', | ||||
|     'django.core.context_processors.csrf', | ||||
|     'django.core.context_processors.tz', | ||||
|     'sekizai.context_processors.sekizai', | ||||
|     'django.core.context_processors.static', | ||||
|     'cms.context_processors.cms_settings' | ||||
| ) | ||||
| 
 | ||||
| TEMPLATE_DIRS = ( | ||||
|     os.path.join(BASE_DIR, 'mamweb', 'templates'), | ||||
| ) | ||||
| 
 | ||||
| INSTALLED_APPS = ( | ||||
|     'djangocms_admin_style', | ||||
|     'djangocms_text_ckeditor', | ||||
|     'django.contrib.auth', | ||||
|     'django.contrib.contenttypes', | ||||
|     'django.contrib.sessions', | ||||
|     'django.contrib.admin', | ||||
|     'django.contrib.sites', | ||||
|     'django.contrib.sitemaps', | ||||
|     'django.contrib.staticfiles', | ||||
|     'django.contrib.messages', | ||||
|     'cms', | ||||
|     'mptt', | ||||
|     'menus', | ||||
|     'south', | ||||
|     'sekizai', | ||||
|     'djangocms_style', | ||||
|     'djangocms_column', | ||||
|     'djangocms_file', | ||||
|     'djangocms_flash', | ||||
|     'djangocms_googlemap', | ||||
|     'djangocms_inherit', | ||||
|     'djangocms_link', | ||||
|     'djangocms_picture', | ||||
|     'djangocms_teaser', | ||||
|     'djangocms_video', | ||||
|     'reversion', | ||||
|     'mamweb' | ||||
| ) | ||||
| 
 | ||||
| LANGUAGES = ( | ||||
|     ## Customize this | ||||
|     ('cs', gettext('cs')), | ||||
|     ('en', gettext('en')), | ||||
| ) | ||||
| 
 | ||||
| CMS_LANGUAGES = { | ||||
|     ## Customize this | ||||
|     'default': { | ||||
|         'public': True, | ||||
|         'hide_untranslated': False, | ||||
|         'redirect_on_fallback': True, | ||||
|     }, | ||||
|     1: [ | ||||
|         { | ||||
|             'public': True, | ||||
|             'code': 'cs', | ||||
|             'hide_untranslated': False, | ||||
|             'name': gettext('cs'), | ||||
|             'redirect_on_fallback': True, | ||||
|         }, | ||||
|         { | ||||
|             'public': True, | ||||
|             'code': 'en', | ||||
|             'hide_untranslated': False, | ||||
|             'name': gettext('en'), | ||||
|             'redirect_on_fallback': True, | ||||
|         }, | ||||
|     ], | ||||
| } | ||||
| 
 | ||||
| CMS_TEMPLATES = ( | ||||
|     ## Customize this | ||||
|     ('page.html', 'Page'), | ||||
|     ('feature.html', 'Page with Feature') | ||||
| ) | ||||
| 
 | ||||
| CMS_PERMISSION = True | ||||
| 
 | ||||
| CMS_PLACEHOLDER_CONF = {} | ||||
| 
 | ||||
| DATABASES = { | ||||
|     'default': | ||||
|         {'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'project.db', 'HOST': 'localhost', 'USER': '', 'PASSWORD': '', 'PORT': ''} | ||||
| } | ||||
| 
 | ||||
| SOUTH_MIGRATION_MODULES = { | ||||
|     'reversion': 'reversion.south_migrations', | ||||
| } | ||||
							
								
								
									
										38
									
								
								mamweb/templates/base.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								mamweb/templates/base.html
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,38 @@ | |||
| {% load cms_tags staticfiles sekizai_tags menu_tags %} | ||||
| <!DOCTYPE html> | ||||
| <html> | ||||
|   <head> | ||||
|     <title>{% block title %}This is my new project home page{% endblock title %}</title> | ||||
|     <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||||
|     {% render_block "css" %} | ||||
|     <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css"> | ||||
|     <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css"> | ||||
|   </head> | ||||
|   <body style="padding-top:60px"> | ||||
|     {% cms_toolbar %} | ||||
|         <div class="container"> | ||||
|           <div class="navbar navbar-default" role="navigation"> | ||||
|             <div class="navbar-header"> | ||||
|               <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> | ||||
|                 <span class="sr-only">Toggle navigation</span> | ||||
|                 <span class="icon-bar"></span> | ||||
|                 <span class="icon-bar"></span> | ||||
|                 <span class="icon-bar"></span> | ||||
|               </button> | ||||
|               <a class="navbar-brand" href="#">Project name</a> | ||||
|             </div> | ||||
|             <div class="navbar-collapse collapse"> | ||||
|               <ul class="nav navbar-nav"> | ||||
|                 {% show_menu 0 1 100 100 "menu.html" %} | ||||
|               </ul> | ||||
|             </div> | ||||
|           </div> | ||||
|         {% block content %} | ||||
|         {% endblock content %} | ||||
|         </div> | ||||
|     <script src="http://code.jquery.com/jquery.js"></script> | ||||
|     <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script> | ||||
|     {% render_block "js" %} | ||||
|   </body> | ||||
| </html> | ||||
| 
 | ||||
							
								
								
									
										11
									
								
								mamweb/templates/feature.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								mamweb/templates/feature.html
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,11 @@ | |||
| {% extends "base.html" %} | ||||
| {% load cms_tags staticfiles sekizai_tags menu_tags %} | ||||
| 
 | ||||
| {% block content %} | ||||
| <div class="jumbotron"> | ||||
|   {% placeholder "feature" %} | ||||
| </div> | ||||
| <div> | ||||
|   {% placeholder "content" %} | ||||
| </div> | ||||
| {% endblock content %} | ||||
							
								
								
									
										18
									
								
								mamweb/templates/menu.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								mamweb/templates/menu.html
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,18 @@ | |||
| {% load i18n menu_tags cache %} | ||||
| 
 | ||||
| {% for child in children %} | ||||
| 
 | ||||
| 
 | ||||
| <li class="{% if child.ancestor %}ancestor{% endif %}{% if child.selected %} active{% endif %}{% if child.children %} dropdown{% endif %}"> | ||||
|     {% if child.children %}<a class="dropdown-toggle" data-toggle="dropdown" href="#">{{ child.get_menu_title }} <span class="caret"></span></a> | ||||
|     <ul class="dropdown-menu"> | ||||
|         {% show_menu from_level to_level extra_inactive extra_active template "" "" child %} | ||||
|     </ul> | ||||
|     {% else %} | ||||
|     <a href="{{ child.get_absolute_url }}"><span>{{ child.get_menu_title }}</span></a> | ||||
|     {% endif %} | ||||
| </li> | ||||
| 
 | ||||
| {% if class and forloop.last and not forloop.parentloop %} | ||||
| {% endif %} | ||||
| {% endfor %} | ||||
							
								
								
									
										8
									
								
								mamweb/templates/page.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								mamweb/templates/page.html
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | |||
| {% extends "base.html" %} | ||||
| {% load cms_tags staticfiles sekizai_tags menu_tags %} | ||||
| 
 | ||||
| {% block content %} | ||||
| <div> | ||||
|   {% placeholder "content" %} | ||||
| </div> | ||||
| {% endblock content %} | ||||
							
								
								
									
										22
									
								
								mamweb/urls.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								mamweb/urls.py
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,22 @@ | |||
| from django.conf.urls import *  # NOQA | ||||
| from django.conf.urls.i18n import i18n_patterns | ||||
| from django.contrib.staticfiles.urls import staticfiles_urlpatterns | ||||
| from django.contrib import admin | ||||
| from django.conf import settings | ||||
| from cms.sitemaps import CMSSitemap | ||||
| 
 | ||||
| admin.autodiscover() | ||||
| 
 | ||||
| urlpatterns = i18n_patterns('', | ||||
|     url(r'^admin/', include(admin.site.urls)),  # NOQA | ||||
|     url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', | ||||
|         {'sitemaps': {'cmspages': CMSSitemap}}), | ||||
|     url(r'^', include('cms.urls')), | ||||
| ) | ||||
| 
 | ||||
| # This is only needed when using runserver. | ||||
| if settings.DEBUG: | ||||
|     urlpatterns = patterns('', | ||||
|         url(r'^media/(?P<path>.*)$', 'django.views.static.serve',  # NOQA | ||||
|             {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}), | ||||
|         ) + staticfiles_urlpatterns() + urlpatterns  # NOQA | ||||
							
								
								
									
										14
									
								
								mamweb/wsgi.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								mamweb/wsgi.py
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,14 @@ | |||
| """ | ||||
| WSGI config for mamweb project. | ||||
| 
 | ||||
| It exposes the WSGI callable as a module-level variable named ``application``. | ||||
| 
 | ||||
| For more information on this file, see | ||||
| https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ | ||||
| """ | ||||
| 
 | ||||
| import os | ||||
| os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mamweb.settings") | ||||
| 
 | ||||
| from django.core.wsgi import get_wsgi_application | ||||
| application = get_wsgi_application() | ||||
							
								
								
									
										10
									
								
								manage.py
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										10
									
								
								manage.py
									
									
									
									
									
										Executable file
									
								
							|  | @ -0,0 +1,10 @@ | |||
| #!/usr/bin/env python | ||||
| import os | ||||
| import sys | ||||
| 
 | ||||
| if __name__ == "__main__": | ||||
|     os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mamweb.settings") | ||||
| 
 | ||||
|     from django.core.management import execute_from_command_line | ||||
| 
 | ||||
|     execute_from_command_line(sys.argv) | ||||
		Loading…
	
		Reference in a new issue
	
	 Tomas Gavenciak
						Tomas Gavenciak