Skip to content

Commit

Permalink
Get the from-scratch experience working again
Browse files Browse the repository at this point in the history
  • Loading branch information
jthemphill committed Mar 31, 2018
1 parent d2d5964 commit d83eb95
Show file tree
Hide file tree
Showing 63 changed files with 19,700 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
tmp
cache
core
static
/static
local_settings.py
*.pyc
passenger_wsgi.py
Expand Down
6 changes: 4 additions & 2 deletions hvz/main/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def clean(self, *args, **kwargs):
class DonateForm(forms.Form):

receiver = forms.ModelChoiceField(
models.Player.current_players().filter(team="Z"),
None,
required=True,
)

Expand All @@ -224,7 +224,9 @@ def __init__(self, *args, donor, **kwargs):

self.donor = donor
self.fields['receiver'].queryset = (
self.fields['receiver'].queryset.exclude(id=donor.id)
models.Player.current_players()
.filter(team="Z")
.exclude(id=donor.id)
)
self.fields['num_brains'].max_value = donor.brains

Expand Down
9 changes: 3 additions & 6 deletions hvz/main/management/commands/newgame.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,17 @@ def handle(self, *args, **options):
else:
start_date += datetime.timedelta((start_date.weekday() - TUESDAY) % 7)

end_date = start_date + datetime.timedelta(SATURDAY - TUESDAY)

if Game.objects.filter(start_date=start_date, end_date=end_date).exists():
if Game.objects.filter(start_date=start_date).exists():
self.stderr.write("You don't need to create a game!")
return

game = Game(start_date=start_date, end_date=end_date)
game = Game(start_date=start_date)
game.full_clean()
game.save()

self.stderr.write(
"Game created from {:%A %d} to {:%A %d}, {:%B %Y}".format(
"Game created from {:%A %d}, {:%B %Y}".format(
start_date,
end_date,
start_date,
)
)
11 changes: 5 additions & 6 deletions hvz/main/management/commands/setup-dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,21 @@
from hvz.main import models

class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option(
def add_arguments(self, parser):
parser.add_argument(
'--auto',
help="Disable interactive terminal input",
action="store_true",
default=False,
),
)
)

def handle(self, *args, **options):

auto = options['auto']

self.stderr.write("Synchronizing the database...")
self.delimit()
call_command('syncdb', interactive = not auto)
call_command('migrate', interactive = not auto)

self.stderr.write("Synchronized!")
self.delimit()
Expand All @@ -35,7 +34,7 @@ def handle(self, *args, **options):
call_command(
'loaddata',
os.path.join(
settings.PROJECT_PATH,
settings.BASE_DIR,
'hvz', 'main', 'fixtures', 'campus.json'
)
)
Expand Down
Binary file added hvz/main/static/images/bases/HVZlogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hvz/main/static/images/bases/logo_old.psd
Binary file not shown.
Binary file added hvz/main/static/images/bases/square_logo_old.psd
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added hvz/main/static/images/concrete_wall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hvz/main/static/images/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hvz/main/static/images/favicon.ico
Binary file not shown.
Binary file added hvz/main/static/images/green_grunge.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hvz/main/static/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hvz/main/static/images/mirrored_squares.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hvz/main/static/images/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hvz/main/static/images/subtle_grunge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hvz/main/static/images/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hvz/main/static/images/zombie_outbreak_edge2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
100 changes: 100 additions & 0 deletions hvz/main/static/sass/_base.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
@import "bootstrap";
@import "constants";
@import "functions";
@import "inputs";
@import "classes";

body {
background-color: $bg_grey;
background-image: url(/static/images/concrete_wall.png);
}

a {
text-decoration: none;
color: $link_color;
}

a:hover {
text-decoration: none;
color: $link_color;
}

html,
button,
input,
select,
textarea {
color: $text_color;
}

#supercontainer {
background-color: white;
background-image: url(/static/images/subtle_grunge.png);
@include box-shadow(0, 2px, 15px, rgba(0, 0, 0, 1));
padding-left: 0;
padding-right: 0;

.row {
margin-left: 0;
margin-right: 0;
padding-bottom: 0;
}
#intro {
margin-bottom: -20px;
}
}

$container_width: 1000px;
#contentContainer {
min-height: 250px;
padding: 1em;
#mainContainer {
padding: 0.25em 1em;
background-color: rgba(255, 255, 255, 0.5);
}
}

@media (max-width: 991px) {
footer {
text-align: center;
}
}
footer {
padding: 1em;

font-size: 0.75em;
color: white;
background-color: $dark_color;
}
@import "logo_styling";

$table_padding_amount: .5em;

th, td {
text-align: left;
padding: $table_padding_amount/2 3*$table_padding_amount/4;

&:not(:last-child) {
border-right: 1px solid adjust-color($bg_grey, $alpha:-0.5);
}
}

tr {
padding: $table_padding_amount;
}

.table-striped tbody tr:nth-child(even) {
background: adjust-color($bg_grey, $alpha:-0.85);
}

.disclaimers p {
font-size: 12px;
}

.scriptonly {
display: none;
}

.hidden {
display: none;
}
Loading

0 comments on commit d83eb95

Please sign in to comment.