Skip to content

Commit

Permalink
new style
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithan committed Apr 29, 2012
1 parent f9e228b commit d12e9e2
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 17 deletions.
2 changes: 2 additions & 0 deletions training/core/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
{% if user.is_authenticated %}
<li><a href="{% url 'core_profile_view' username=user.username %}">Profile</a></li>
<li><a href="{% url 'logout' %}">Log out</a></li>
{% else %}
<li><a href="{% url 'core_register_dailymile' %}">Log in</a></li>
{% endif %}
</ul>
</div>
Expand Down
13 changes: 11 additions & 2 deletions training/core/templates/core/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@

{% block content %}
<div class="row">
<div class="span6">
<p>This site is a side project of <a href="http://wraithan.net/">Wraithan</a>. It was written as a means to an end for his own needs. Please feel free to submit feature requests and bug reports on <a href="http://github.com/wraithan/dailymile-training/issues">Github</a>.</p>
<div class="span12">
<dl>
<dt>Why does this site exist?</dt>
<dd>Dailymile doesn't have anything that lets someone set recurring goals. They have challenges, which are great for what they are, but I didn't want to end up creating a challenge for each type of exercise I did each week.</dd>
<dt>Do you have a roadmap for what is coming next?</dt>
<dd>The <a href="http://github.com/wraithan/dailymile-training/issues">issue tracker</a> is where I am keeping that list. I wont have an ordered list as things will likely get developed as I need them.</dd>
<dt>The site is broken or I have a feature suggestion!</dt>
<dd>Please feel free to submit feature requests and bug reports on <a href="http://github.com/wraithan/dailymile-training/issues">Github</a>.</dd>
<dt>Who wrote this?</dt>
<dd>This site is a side project of <a href="http://wraithan.net/">Wraithan</a>.</dd>
</dl>
</div>
</div>
{% endblock content %}
18 changes: 9 additions & 9 deletions training/core/templates/core/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
{% load url from future %}

{% block content %}
<p>Ohai</p>


{% if user.is_authenticated %}
<p>Go to your <a href="{% url 'core_profile_view_self' %}">profile</a></p>

<p><a href="{% url 'logout' %}">Log out</a></p>
{% else %}
<p>Log in using <a href="{% url 'core_register_dailymile' %}">Dailymile</a></p>
{% if params.from == 'logout' %}
<div class="alert alert-info">
<p><strong>Logged Out!</strong> You've been successfully logged out</p>
</div>
{% endif %}
<div class="hero-unit">
<h1>Weekly Training</h1>
<p>This is a site that lets you create weekly goals for yourself. Then takes your workouts on Dailymile and organizes them into your goals!</p>
<p><a href="{% url 'about' %}" class="btn btn-primary">Learn More</a></p>
</div>
{% endblock content %}
2 changes: 1 addition & 1 deletion training/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def register_dailymile_callback(request):
if 'state' in request.GET.keys():
if request.GET['state'] == 'website':
HttpResponseRedirect(reverse('core_website_success'))
return HttpResponseRedirect(reverse('index'))
return HttpResponseRedirect(reverse('core_profile_view_self'))


@render_to('core/profile.html')
Expand Down
15 changes: 10 additions & 5 deletions training/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@
TemplateView.as_view(template_name='core/index.html'),
name='index'),

url(r'^loggedout$',
TemplateView.as_view(template_name='core/index.html'),
kwargs={'from': 'logout'},
name='loggedout'),

url(r'^logout$',
'django.contrib.auth.views.logout',
{'next_page': '/loggedout'},
name='logout'),

url(r'^about$',
TemplateView.as_view(template_name='core/about.html'),
name='about'),
Expand All @@ -23,11 +33,6 @@
'training.core.views.register_dailymile_callback',
name='core_register_dailymile_callback'),

url(r'^logout$',
'django.contrib.auth.views.logout',
{'next_page': '/'},
name='logout'),

url(r'^profile/me$',
'training.core.views.profile_view_self',
name='core_profile_view_self'),
Expand Down

0 comments on commit d12e9e2

Please sign in to comment.