-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the ability to edit information pages
- Loading branch information
Showing
18 changed files
with
274 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Generated by Django 2.2 on 2020-03-19 01:45 | ||
|
||
from django.db import migrations | ||
from django.template.loader import get_template | ||
from django.contrib.sites.models import Site | ||
|
||
|
||
def setup_pages(apps, schema_editor): | ||
FlatPage = apps.get_model('flatpages', 'FlatPage') | ||
|
||
source = get_template("contact_us.html").template.source.split("</readme> -->")[1] | ||
fp = FlatPage.objects.create(url='/contact-us/', title='Contact Us', content=source) | ||
fp.sites.add(1) | ||
|
||
source = get_template("resources.html").template.source.split("</readme> -->")[1] | ||
fp = FlatPage.objects.create(url='/extra/resources/', title='Resources', content=source) | ||
fp.sites.add(1) | ||
|
||
source = get_template("hunt_info.html").template.source.split("</readme> -->")[1] | ||
fp = FlatPage.objects.create(url='/hunt-info/', title='Current Hunt Info', content=source) | ||
fp.sites.add(1) | ||
return | ||
|
||
|
||
def remove_pages(apps, schema_editor): | ||
FlatPage = apps.get_model('flatpages', 'FlatPage') | ||
FlatPage.objects.filter(url='/contact-us/').delete() | ||
FlatPage.objects.filter(url='/extra/resources/').delete() | ||
FlatPage.objects.filter(url='/hunt-info/').delete() | ||
return | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('huntserver', '0053_auto_20200310_1503'), | ||
('flatpages', '0001_initial'), | ||
('sites', '0002_alter_domain_unique'), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(setup_pages, remove_pages) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 2.2 on 2020-03-19 23:30 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('flatpages', '0001_initial'), | ||
('huntserver', '0054_auto_20200318_2145'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='FlatPageProxyObject', | ||
fields=[ | ||
], | ||
options={ | ||
'verbose_name': 'info page', | ||
'verbose_name_plural': 'info pages', | ||
'proxy': True, | ||
'indexes': [], | ||
'constraints': [], | ||
}, | ||
bases=('flatpages.flatpage',), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,11 @@ | ||
{% extends "info_base.html" %} | ||
{% load hunt_tags %} | ||
<!-- <readme> This file is the source for the contact-us info page when creating the server. | ||
Don't edit this file after server creation, use the admin editor instead </readme> --> | ||
|
||
{% block includes %} | ||
<script src="{{ STATIC_URL }}jquery.min.js"></script> | ||
{% endblock includes %} | ||
|
||
{% block content %} | ||
|
||
<div class="container"> | ||
<h1> Contact Us </h1> | ||
<div id='qa'> | ||
<p> | ||
Email the <a href="mailto:{% contact_email %}?subject=Puzzle%20Hunt%20Question">HALP?! LINE</a> ({% contact_email %}) with "Puzzle Hunt" somewhere in the subject line. | ||
</p> | ||
<p>Visit us on our <a href="https://www.facebook.com/groups/puzzlehuntCMU">Facebook Page</a>. | ||
You can also find us on <a href="https://thebridge.cmu.edu/organization/puzzlehuntcmu">The Bridge</a>.</p> | ||
</div> | ||
</div> | ||
{% endblock content %} | ||
<h1> Contact Us </h1> | ||
<div id='qa'> | ||
<p> | ||
Email the <a href="mailto:{% contact_email %}?subject=Puzzle%20Hunt%20Question">HALP?! LINE</a> ({% contact_email %}) with "Puzzle Hunt" somewhere in the subject line. | ||
</p> | ||
<p>Visit us on our <a href="https://www.facebook.com/groups/puzzlehuntCMU">Facebook Page</a>. | ||
You can also find us on <a href="https://thebridge.cmu.edu/organization/puzzlehuntcmu">The Bridge</a>.</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{% extends "info_base.html" %} | ||
{% load hunt_tags %} | ||
|
||
{% block includes %} | ||
<script src="{{ STATIC_URL }}jquery.min.js"></script> | ||
{% endblock includes %} | ||
|
||
{% block content %} | ||
|
||
<div class="container"> | ||
{{ flatpage.content|render_with_context }} | ||
</div> | ||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,56 @@ | ||
{% extends "info_base.html" %} | ||
{% load humanize %} | ||
{% load hunt_tags %} | ||
|
||
{% block includes %} | ||
<script src="{{ STATIC_URL }}jquery.min.js"></script> | ||
{% endblock includes %} | ||
|
||
{% block content %} | ||
|
||
<div class="container"> | ||
<h1 class="title">{{curr_hunt.hunt_name}}</h1> | ||
<h2 class="title">{{ curr_hunt.display_start_date|date:" m/d/y " }} {{ curr_hunt.display_start_date|time:"h:iA" }} - {{ curr_hunt.display_end_date|time:"h:iA" }}<br> | ||
Starts in {{ curr_hunt.location }}</h3> | ||
<div id='qa'> | ||
<h2>What are the puzzles like?</h2> | ||
<p>For examples of the kinds of puzzles we'll give you, check out our <a href="{% url 'huntserver:previous_hunts' %}">Past Hunts</a></p> | ||
<p>Or these similar hunts:</p> | ||
<ul> | ||
<li><a href="http://www.collegepuzzlechallenge.com/">Microsoft College Puzzle Challenge</a></li> | ||
<li><a href="http://www.mit.edu/~puzzle/">The MIT Mystery Hunt</a></li> | ||
</ul> | ||
<h2>Sounds fun! How does my team win?</h2> | ||
<p> | ||
Each puzzle yields a solution (like a word or a phrase). You'll be combining answers to | ||
puzzles with a mechanic that will be explained more on the day of the hunt. | ||
Eventually players reach the endgame, a bonus round for those who | ||
complete the puzzles the fastest. | ||
</p> | ||
<h2>How do I register?</h2> | ||
<p>Register your team of {{curr_hunt.team_size|apnumber}} (or fewer if you want) <a href="{% url 'huntserver:registration' %}">here!</a> | ||
</p> | ||
|
||
<h2>What should I bring?</h2> | ||
<p> | ||
<ul> | ||
<li>A team of no more than {{curr_hunt.team_size|apnumber}} people. Humans only, please. Robots are discouraged; they mess up the sensors.</li> | ||
<li>Laptops. All of our puzzles will be online. </li> | ||
<li>Scissors. These will be helpful. </li> | ||
|
||
</ul> | ||
</p> | ||
<!-- <readme> This file is the source for the resources info page when creating the server. | ||
Don't edit this file after server creation, use the admin editor instead </readme> --> | ||
|
||
<h2>How long will it last?</h2> | ||
<p>The hunt is expected to run 8 hours. If there isn't a winner by 8 hours in (rare), we'll inform all teams to keep playing and continue until there's a winner.</p> | ||
|
||
<h2>Will there be food?</h2> | ||
<p> | ||
Yes, there will be food, usually pizza. If you have dietary restrictions, please list them in the appropriate box when registering. | ||
</p> | ||
|
||
<h2>Is there anything else I should know?</h2> | ||
<p> | ||
<ul> | ||
<li>There may be some running around campus required.</li> | ||
<li>You CAN register a partial team and we'll do our best to try to match all of the partial teams on the day of.</li> | ||
<li>Nothing on this and the registration page is a puzzle crucial for completing the hunt. No, really, this is not a puzzle.</li> | ||
</ul> | ||
</p> | ||
|
||
<h2>Wait, I have more questions!</h2> | ||
<p>Email the <a href="mailto:{% contact_email %}?subject=Puzzle%20Hunt%20Question">HALP?! LINE</a> ({% contact_email %}) with "Puzzle Hunt" somewhere in the subject line.</p> | ||
</div> | ||
</div> | ||
{% endblock content %} | ||
{% load humanize %} | ||
<h1 class="title">{{curr_hunt.hunt_name}}</h1> | ||
<h2 class="title">{{ curr_hunt.display_start_date|date:" m/d/y " }} {{ curr_hunt.display_start_date|time:"h:iA" }} - {{ curr_hunt.display_end_date|time:"h:iA" }}<br> | ||
Starts in {{ curr_hunt.location }}</h3> | ||
<div id='qa'> | ||
<h2>What are the puzzles like?</h2> | ||
<p>For examples of the kinds of puzzles we'll give you, check out our <a href="{% url 'huntserver:previous_hunts' %}">Past Hunts</a></p> | ||
<p>Or these similar hunts:</p> | ||
<ul> | ||
<li><a href="http://www.collegepuzzlechallenge.com/">Microsoft College Puzzle Challenge</a></li> | ||
<li><a href="http://www.mit.edu/~puzzle/">The MIT Mystery Hunt</a></li> | ||
</ul> | ||
<h2>Sounds fun! How does my team win?</h2> | ||
<p> | ||
Each puzzle yields a solution (like a word or a phrase). You'll be combining answers to | ||
puzzles with a mechanic that will be explained more on the day of the hunt. | ||
Eventually players reach the endgame, a bonus round for those who | ||
complete the puzzles the fastest. | ||
</p> | ||
<h2>How do I register?</h2> | ||
<p>Register your team of {{curr_hunt.team_size|apnumber}} (or fewer if you want) <a href="{% url 'huntserver:registration' %}">here!</a> | ||
</p> | ||
|
||
<h2>What should I bring?</h2> | ||
<p> | ||
<ul> | ||
<li>A team of no more than {{curr_hunt.team_size|apnumber}} people. Humans only, please. Robots are discouraged; they mess up the sensors.</li> | ||
<li>Laptops. All of our puzzles will be online. </li> | ||
<li>Scissors. These will be helpful. </li> | ||
|
||
</ul> | ||
</p> | ||
|
||
<h2>How long will it last?</h2> | ||
<p>The hunt is expected to run 8 hours. If there isn't a winner by 8 hours in (rare), we'll inform all teams to keep playing and continue until there's a winner.</p> | ||
|
||
<h2>Will there be food?</h2> | ||
<p> | ||
Yes, there will be food, usually pizza. If you have dietary restrictions, please list them in the appropriate box when registering. | ||
</p> | ||
|
||
<h2>Is there anything else I should know?</h2> | ||
<p> | ||
<ul> | ||
<li>There may be some running around campus required.</li> | ||
<li>You CAN register a partial team and we'll do our best to try to match all of the partial teams on the day of.</li> | ||
<li>Nothing on this and the registration page is a puzzle crucial for completing the hunt. No, really, this is not a puzzle.</li> | ||
</ul> | ||
</p> | ||
|
||
<h2>Wait, I have more questions!</h2> | ||
<p>Email the <a href="mailto:{% contact_email %}?subject=Puzzle%20Hunt%20Question">HALP?! LINE</a> ({% contact_email %}) with "Puzzle Hunt" somewhere in the subject line.</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
{% extends 'base.html' %} | ||
{% load bootstrap_tags %} | ||
{% load static %} | ||
{% load flatpages %} | ||
|
||
{% block base_includes %} | ||
<link rel="stylesheet" type="text/css" href="{% static "huntserver/info_base.css" %}"> | ||
<link rel="stylesheet" type="text/css" href="{% static "huntserver/navbar.css" %}"> | ||
{% endblock base_includes %} | ||
|
||
{% block left-header %} | ||
{% get_flatpages '/extra/' as flatpages %} | ||
<li class='{% active_page request "index" %} visible-sm visible-xs'><a href="{% url 'huntserver:index' %}"> Homepage </a></li> | ||
<li class='{% active_page request "current_hunt_info" %}'><a href="{% url 'huntserver:current_hunt_info' %}"> Hunt Info</a></li> | ||
<li class='{% active_page request "current_hunt" %}'><a href="{% url 'huntserver:current_hunt' %}"> Current Hunt </a></li> | ||
<li class='{% active_page request "current_hunt_info" %}'><a href="{% url 'huntserver:current_hunt_info' %}"> Hunt Info</a></li> | ||
<li class='{% active_page request "previous_hunts" %}'><a href="{% url 'huntserver:previous_hunts' %}"> Previous Hunts </a></li> | ||
<li class='{% active_page request "resources" %}'><a href="{% url 'huntserver:resources' %}"> Puzzle Resources </a></li> | ||
{% for page in flatpages|dictsort:"url" %} | ||
<li class='{% active_page request page.url %}'><a href="/info{{ page.url }}"> {{ page.title }} </a></li> | ||
{% endfor %} | ||
<li class='{% active_page request "contact_us" %}'><a href="{% url 'huntserver:contact_us' %}"> Contact Us </a></li> | ||
{% endblock %} |
Oops, something went wrong.