Skip to content

Commit

Permalink
Create links for package and individual preorders
Browse files Browse the repository at this point in the history
  • Loading branch information
fluix-dev committed Feb 4, 2020
1 parent 333416e commit 4270e2f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gallery/templates/preorder.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<p class="card-text">This package will get you all of the photos we take of you during a specific event. This usually amounts to more than 20 photos, especially if you dance many times.</p>
</div>
<div class="card-footer text-muted">
<a type="button" class="btn btn-light" style="padding: 2% 44%" href="google.com">Buy</a>
<a type="button" class="btn btn-light" style="padding: 2% 44%" href="{% url 'package' %}">Buy</a>
</div>
</div>

Expand All @@ -22,7 +22,7 @@
<p class="card-text">This package will get you a single photo from a specific event.</p>
</div>
<div class="card-footer text-muted">
<a type="button" class="btn btn-light" style="padding: 2% 44%" href="google.com">Buy</a>
<a type="button" class="btn btn-light" style="padding: 2% 44%" href="{% url 'individual' %}">Buy</a>
</div>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions gallery/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
urlpatterns = [
path('', views.home, name='index'),
path('preorder/', views.preorder, name='preorder'),
path('preorder/package', views.package, name='package'),
path('preorder/individual', views.individual, name='individual'),
path('contact/', views.contact, name='contact'),
path('contact_post/', views.contact_post, name='contact_post'),
path('help/', views.download_help, name='help'),
Expand Down
8 changes: 7 additions & 1 deletion gallery/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from django.conf import settings
from django.http import HttpResponse, Http404
from django.shortcuts import render, get_list_or_404, get_object_or_404
from django.shortcuts import redirect, render, reverse, get_list_or_404, get_object_or_404

from PIL import Image

Expand All @@ -32,6 +32,12 @@ def maintenance(request):
def preorder(request):
return render(request, 'preorder.html', get_navbar_context())

def individual(request):
return redirect(reverse('index'))

def package(request):
return redirect(reverse('index'))

def contact(request):
context = {
'form': ContactForm()
Expand Down

0 comments on commit 4270e2f

Please sign in to comment.