Compare commits
5 Commits
3d69f68f1a
...
4f9645c579
Author | SHA1 | Date | |
---|---|---|---|
|
4f9645c579 | ||
|
9ba05f8357 | ||
|
dcf9cc14f2 | ||
|
acffe24156 | ||
|
0f4cc6f1c5 |
@ -34,9 +34,11 @@ INSTALLED_APPS = (
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.sites',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'librebudget_core'
|
||||
'registration',
|
||||
'librebudget_core',
|
||||
)
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
@ -54,6 +56,11 @@ ROOT_URLCONF = 'librebudget.urls'
|
||||
WSGI_APPLICATION = 'librebudget.wsgi.application'
|
||||
|
||||
|
||||
# Site
|
||||
|
||||
SITE_ID = 1
|
||||
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
|
||||
|
||||
@ -82,3 +89,10 @@ USE_TZ = True
|
||||
# https://docs.djangoproject.com/en/1.7/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
|
||||
# Registration
|
||||
|
||||
ACCOUNT_ACTIVATION_DAYS = 1
|
||||
|
||||
LOGIN_REDIRECT_URL = '/'
|
||||
|
@ -1,7 +1,9 @@
|
||||
from django.conf.urls import patterns, include, url
|
||||
from django.contrib import admin
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url(r'', include('core.urls')),
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
url(r'', include('librebudget_core.urls')),
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
url(r'^accounts/', include('registration.urls')),
|
||||
)
|
||||
|
8
librebudget_core/static/css/main.css
Normal file
8
librebudget_core/static/css/main.css
Normal file
@ -0,0 +1,8 @@
|
||||
body {
|
||||
padding-top: 50px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
nav + .container {
|
||||
margin-top: 16px;
|
||||
}
|
1
librebudget_core/templates/base.html
Normal file
1
librebudget_core/templates/base.html
Normal file
@ -0,0 +1 @@
|
||||
{% extends 'librebudget_core/layout.html' %}
|
22
librebudget_core/templates/librebudget_core/index.html
Normal file
22
librebudget_core/templates/librebudget_core/index.html
Normal file
@ -0,0 +1,22 @@
|
||||
{% extends 'librebudget_core/layout.html' %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block css %}
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.1.1/gh-fork-ribbon.min.css" />
|
||||
<style type="text/css">
|
||||
/* Move down content because we have a fixed navbar that is 50px tall */
|
||||
.icon {
|
||||
float: right;
|
||||
width: 32px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
</style>
|
||||
{% endblock css %}
|
||||
|
||||
{% block main %}
|
||||
{% if user and user.is_authenticated and user.is_active %}
|
||||
{% include 'librebudget_core/index_member.html' %}
|
||||
{% else %}
|
||||
{% include 'librebudget_core/index_guest.html' %}
|
||||
{% endif %}
|
||||
{% endblock main %}
|
@ -1,23 +1,5 @@
|
||||
{% extends 'core/layout.html' %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block css %}
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.1.1/gh-fork-ribbon.min.css" />
|
||||
<style type="text/css">
|
||||
/* Move down content because we have a fixed navbar that is 50px tall */
|
||||
body {
|
||||
padding-top: 50px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.icon {
|
||||
float: right;
|
||||
width: 32px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
</style>
|
||||
{% endblock css %}
|
||||
|
||||
{% block main %}
|
||||
<!-- Fork me logo -->
|
||||
<div class="github-fork-ribbon-wrapper right">
|
||||
<div class="github-fork-ribbon">
|
||||
@ -51,4 +33,4 @@
|
||||
<p><a class="btn btn-default" href="#" role="button">View details »</a></p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock main %}
|
||||
</div>
|
@ -0,0 +1,8 @@
|
||||
{% load staticfiles %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h1>Account Summary</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -7,6 +7,7 @@
|
||||
<title>LibreBudget</title>
|
||||
|
||||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'css/main.css' %}">
|
||||
{% block css %}{% endblock css %}
|
||||
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
@ -30,29 +31,52 @@
|
||||
</a>
|
||||
</div>
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<form class="navbar-form navbar-right">
|
||||
{% if user and user.is_authenticated and user.is_active %}
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="{% url 'auth_logout' %}">Sign out</a></li>
|
||||
</ul>
|
||||
{% else %}
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<p class="navbar-btn">
|
||||
<a class="btn btn-primary" href="{% url 'registration_register' %}">Register</a>
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-right" action="{% url 'auth_login' %}" method="POST">
|
||||
{% csrf_token %}
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="Email" class="form-control">
|
||||
<input type="text" placeholder="Username" class="form-control" name="username">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="password" placeholder="Password" class="form-control">
|
||||
<input type="password" placeholder="Password" class="form-control" name="password">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success">Sign in</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div><!--/.navbar-collapse -->
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
{% block main %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<h1>{%block title %}{% endblock title%}</h1>
|
||||
{% block content %}
|
||||
{% endblock content %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock main %}
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="container">
|
||||
<footer>
|
||||
<p>Copyright © <a href="//ianonavy.com">Ian Adam Naval</a> 2015. All rights reserved.</p>
|
||||
<div>Icons made by <a href="http://www.flaticon.com/authors/yannick" title="Yannick">Yannick</a>, <a href="http://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="http://www.flaticon.com" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a></div>
|
||||
</footer>
|
||||
</div> <!-- /container -->
|
||||
</div>
|
||||
|
||||
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
|
@ -1,8 +1,8 @@
|
||||
from django.conf.urls import patterns, include, url
|
||||
from django.contrib import admin
|
||||
from django.conf.urls import patterns, url
|
||||
|
||||
from core import views
|
||||
from librebudget_core import views
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url(r'^$', views.home, name='home'),
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
url(r'^$', views.HomeView.as_view(), name="home"),
|
||||
)
|
||||
|
@ -1,5 +1,5 @@
|
||||
from django.shortcuts import render
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
|
||||
def home(request):
|
||||
return render(request, 'core/index.html')
|
||||
class HomeView(TemplateView):
|
||||
template_name = "librebudget_core/index.html"
|
||||
|
@ -1,4 +0,0 @@
|
||||
django==1.8.1
|
||||
selenium==2.45.0
|
||||
beautifulsoup4==4.3.2
|
||||
django-dotenv==1.3.0
|
22
setup.py
22
setup.py
@ -1,9 +1,17 @@
|
||||
from distutils.core import setup
|
||||
|
||||
setup(name='librebudget',
|
||||
version='0.1',
|
||||
description='Free personal finance tool',
|
||||
author='Ian Adam Naval',
|
||||
author_email='ianonavy@gmail.com',
|
||||
url='https://git.ianonavy.com/ianonavy/librebudget',
|
||||
packages=['librebudget', 'librebudget_core'])
|
||||
setup(
|
||||
name='librebudget',
|
||||
version='0.1',
|
||||
description='Free personal finance tool',
|
||||
author='Ian Adam Naval',
|
||||
author_email='ianonavy@gmail.com',
|
||||
url='https://git.ianonavy.com/ianonavy/librebudget',
|
||||
install_requires=[
|
||||
"django==1.8.1",
|
||||
"selenium==2.45.0",
|
||||
"beautifulsoup4==4.3.2",
|
||||
"django-dotenv==1.3.0",
|
||||
"django-registration-redux==1.2",
|
||||
],
|
||||
packages=['librebudget', 'librebudget_core'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user