Skip to content

Commit

Permalink
Заглушка для фронтенда
Browse files Browse the repository at this point in the history
  • Loading branch information
f213 committed Jun 25, 2016
1 parent ef3a314 commit 51ca8bf
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "elk/static/vendor/"
}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,10 @@ ENV/

# Rope project settings
.ropeproject


# frontend

elk/static/vendor

node_modules/
7 changes: 7 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "elk-back-office",
"dependencies": {
"Likely": "ilyabirman-likely#~2.0.8",
"bootstrap": "^3.3.6"
}
}
5 changes: 2 additions & 3 deletions elk/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

DATABASES = {
'default': env.db(), # Raises ImproperlyConfigured exception if DATABASE_URL not in os.environ
'extra': env.db('SQLITE_URL', default='sqlite:////tmp/my-tmp-sqlite.db')
}

INSTALLED_APPS = [
'elk',
'crm',
'products',
'hub',
Expand Down Expand Up @@ -67,9 +67,8 @@

public_root = root.path('public/')

MEDIA_ROOT = public_root('media')
MEDIA_URL = 'media/'
STATIC_ROOT = public_root('static')

STATIC_URL = '/static/'

SECRET_KEY = env('SECRET_KEY') # Raises ImproperlyConfigured exception if SECRET_KEY not in os.environ
Expand Down
1 change: 1 addition & 0 deletions elk/static/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bower_components
1 change: 1 addition & 0 deletions elk/static/1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>test</h1>
23 changes: 23 additions & 0 deletions elk/templates/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>{% block title %}ELK{% endblock %}</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" href="/static/vendor/bootstrap/dist/css/bootstrap.min.css">
</head>
<body>
<div class=".container">
{% block navbar %}
{% endblock %}
{% block content %}
{% endblock %}
</div>
<script src="/static/vendor/jquery/dist/jquery.min.js"></script>
<script src="/static/vendor/bootstrap/dist/js/bootstrap.js"></script>

</body>
</html>
8 changes: 8 additions & 0 deletions elk/templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{% extends 'base.html' %}

{% block content %}
<div class="jumbotron">
<h1>Hi there</h1>
<p>Nothing to see here, sorry for that.</p>
</div>
{% endblock %}
2 changes: 2 additions & 0 deletions elk/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import include, url
from django.views.generic import TemplateView
from django.contrib import admin

urlpatterns = [
url(r'^admin/', admin.site.urls),
url('^markdown/', include('django_markdown.urls')),
url(r'^$', TemplateView.as_view(template_name='index.html')),
]

0 comments on commit 51ca8bf

Please sign in to comment.