Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
Merge 179ca73 into 526aa37
Browse files Browse the repository at this point in the history
  • Loading branch information
stvnrlly committed Dec 9, 2016
2 parents 526aa37 + 179ca73 commit fd06d40
Show file tree
Hide file tree
Showing 13 changed files with 296 additions and 63 deletions.
2 changes: 2 additions & 0 deletions .bandit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[bandit]
exclude: /tests
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ env:
- secure: Oe1nkjWAlCsEAs57YyH+f6goqWmojrfWMiZeFWm8F0nMBunRN9PjHyNs3InTVMjEXj8cfBbC0XPiUU3EXEGdy+uOextmoILY6r15l82Xr+0X8Zmu/wMGXrLMgM9rSOOM6XAijXj/wvfYJVaAP/sLJPliUocQiM+P/4+BnfnT4KcUesabDPTmSC1FXn9AQ7FcjMuagtWq9CXLNtlDhEuD7eGyZg4NXySnvk8Ev22BuIUmjUznmyv6v/ciN6sPm888mO8wyanHqnYM9AYE5vBzLXhSw/EsEBgJlinzsQ0DahiXlnTvi5oCJU/hJk0rS/5Kh/WXIvzGA4fXQ38QCS6HeIz7WTvfxykCw5+nmBq8AbV8DC0QrAh6FfnNZEYRyonw+sjjXIGXMxJxUGMHJ/Tu1PkrblnBDGBNKzB+IV0u8BFsClY0YcGL2Tgjz3Xtqje3ZJFwT2wwSkpWEDON000HPiEmmmRz370UxDPxFESUlDHX98GT8FLOkdAH+oGIxX2BK5UVO14VCtnwtpywYikhzuaFs+AXTFP6to21Yh3Lnk5fO7kQIwYHo5OyXLjWf5VIwZUB/nNnTWO2bGEc+kUzFViaxcLjlA17JLoBzVkuz269PlrtyA1euOqhViOzrNzhroB9alJtpqwZnDOGAXhuqV2Qd/xuu+yvTCwwGtzFzxE=
before_script:
- createdb forest-service-prototype
script: py.test
script:
- pytest --cov=forestserviceprototype --cov=specialuseform
- bandit -r .
after_script:
- npm install -g pa11y-crawl
- pa11y-crawl --run "cd forestserviceprototype && ./manage.py runserver" --wait 10 --ci http://localhost:8000
Expand Down
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ This is a Django application to test out an online permit of the non-commercial

## Guiding documents

This non-commercial group use permit prototype is being developed as part of initial, discovery research for a broader Forest Service ePermitting project. Read more in the [discovery plan](https://github.com/18F/forest-service-prototype/raw/master/docs/discovery-plan.pdf).
This non-commercial group use permit prototype is being developed as part of initial, discovery research for a broader Forest Service ePermitting project. Read more in the [discovery plan](https://github.com/18F/forest-service-prototype/raw/master/docs/discovery-plan.pdf).

As of November 9, we have completed our first round of discovery research on this prototype. Read the [findings and reccomendations](https://github.com/18F/forest-service-prototype/raw/master/docs/round1-findings-reccomendations.pdf) from our first round of feedback sessions on this prototype (none of the changes have been implemented yet).
As of November 9, we have completed our first round of discovery research on this prototype. Read the [findings and reccomendations](https://github.com/18F/forest-service-prototype/raw/master/docs/round1-findings-reccomendations.pdf) from our first round of feedback sessions on this prototype (none of the changes have been implemented yet).

We are now conducting additional research on Christmas tree and outfitter/guide permits, as described in the [discovery plan](https://github.com/18F/forest-service-prototype/raw/master/docs/discovery-plan.pdf).

Expand Down Expand Up @@ -38,6 +38,24 @@ The app should now be running at http://localhost:8000.

Please read through our [contributing guidelines](CONTRIBUTING.md). These guidelines are directions for opening issues and submitting pull requests, and they also detail the coding and design standards we follow.

### Branching

Release branch: `master`
Development branch: `develop`

### Dependencies

This project uses `pip-tools` to manage dependencies. As a result, developers
should edit `requirements.in` and not `requirements.txt`.

For example:

```
echo Django >> requirements.in
pip-compile --output-file requirements.txt requirements.in
pip-sync
```

## Public domain

This project is in the worldwide [public domain](LICENSE.md). As stated in [CONTRIBUTING](CONTRIBUTING.md):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Permit',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('permit_id', models.AutoField(primary_key=True, serialize=False)),
('event_name', models.CharField(max_length=250)),
('organizer_address_1', models.CharField(max_length=250)),
('organizer_address_2', models.CharField(max_length=250)),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-09-23 21:12
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('specialuseform', '0004_auto_20160922_1552'),
]

operations = [
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-09-23 21:58
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('specialuseform', '0005_auto_20160923_2112'),
]

operations = [
migrations.AddField(
model_name='permit',
name='email',
field=models.EmailField(blank=True, max_length=254),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-09-27 14:12
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('specialuseform', '0006_auto_20160923_2158'),
]

operations = [
migrations.AlterField(
model_name='permit',
name='status',
field=models.CharField(choices=[('needs_approval', 'Needs Approval'), ('approved', 'Approved'), ('in_review', 'In Review'), ('not_approved', 'Rejected'), ('user_cancelled', 'User Cancelled')], default='needs_approval', max_length=100),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-09-27 16:48
from __future__ import unicode_literals

from django.db import migrations, models
import localflavor.us.models


class Migration(migrations.Migration):

dependencies = [
('specialuseform', '0007_auto_20160927_1412'),
]

operations = [
migrations.AlterField(
model_name='permit',
name='organizer_address_2',
field=models.CharField(blank=True, max_length=250),
),
migrations.AlterField(
model_name='permit',
name='state',
field=localflavor.us.models.USStateField(),
),
]
154 changes: 120 additions & 34 deletions forestserviceprototype/specialuseform/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,135 @@
from django.contrib.auth.models import User
from localflavor.us import models as localflavor


# Create your models here.
class Permit(models.Model):
STATUS_CHOICES = (
('needs_approval', 'Needs Approval'),
('approved', 'Approved'),
('in_review', 'In Review'),
('not_approved', 'Not Approved')
)
event_name = models.CharField(max_length=250,
help_text='The name of the event')
organizer_address_1 = models.CharField(max_length=250)
organizer_address_2 = models.CharField(max_length=250)
city = models.CharField(max_length=250)
state = localflavor.USStateField(default="OH")
('not_approved', 'Not Approved'),
('user_cancelled', 'User Cancelled'),
)

permit_id = models.AutoField(primary_key=True)
event_name = models.CharField(
max_length=250,
help_text='The name of the event'
)
organizer_address_1 = models.CharField(
max_length=250
)
organizer_address_2 = models.CharField(
max_length=250,
blank=True,
)
city = models.CharField(
max_length=250
)
state = localflavor.USStateField()
zipcode = localflavor.USZipCodeField()
phone_daytime = localflavor.PhoneNumberField()
phone_evening = localflavor.PhoneNumberField(blank=True)
phone_evening = localflavor.PhoneNumberField(
blank=True
)
email = models.EmailField(
blank=True
)
description = models.TextField()
location = models.CharField(max_length=250)
participant_number = models.IntegerField(verbose_name='Number of Participants', help_text='This is the number of people who will directly participate in the event.')
spectator_number = models.IntegerField(blank=True, verbose_name='Number of Spectators', help_text='If your event will have spectators (such as at a sporting event), please note how many additional people will be spectators.')
start_date = models.DateTimeField(default=timezone.now, help_text='Format: MM/DD/YYYY')
end_date = models.DateTimeField(default=timezone.now, help_text='Format: MM/DD/YYYY')
permit_holder_name = models.CharField(max_length=250, help_text='Name of Permit Holder')
permit_holder_signature = models.ImageField(blank=True)
permit_holder_address_1 = models.CharField(max_length=250, verbose_name="Street Address 1")
permit_holder_address_2 = models.CharField(max_length=250, blank=True, verbose_name="Street Address 2")
permit_holder_city = models.CharField(max_length=250, verbose_name="City")
permit_holder_state = localflavor.USStateField(verbose_name="State")
permit_holder_zipcode = localflavor.USZipCodeField(verbose_name="Zipcode")
permit_holder_2_name = models.CharField(max_length=250, help_text='Name of Permit Holder', blank=True)
permit_holder_2_signature = models.ImageField(blank=True)
permit_holder_2_address_1 = models.CharField(max_length=250, verbose_name="Street Address 1", blank=True)
permit_holder_2_address_2 = models.CharField(max_length=250, blank=True, verbose_name="Street Address 2")
permit_holder_2_city = models.CharField(max_length=250, verbose_name="City", blank=True)
permit_holder_2_state = localflavor.USStateField(verbose_name="State", blank=True)
permit_holder_2_zipcode = localflavor.USZipCodeField(verbose_name="Zipcode", blank=True)
created = models.DateTimeField(default=timezone.now)
updated = models.DateTimeField(default=timezone.now)
status = models.CharField(max_length=100,
choices=STATUS_CHOICES,
default='needs_approval')
decision_explanation = models.TextField(blank=True)
location = models.CharField(
max_length=250
)
participant_number = models.IntegerField(
verbose_name='Number of Participants',
help_text='This is the number of people who will directly participate '
'in the event.'
)
spectator_number = models.IntegerField(
blank=True,
verbose_name='Number of Spectators',
help_text='If your event will have spectators (such as at a sporting '
'event), please note how many additional people will be '
'spectators.'
)
start_date = models.DateTimeField(
default=timezone.now,
help_text='Format: MM/DD/YYYY'
)
end_date = models.DateTimeField(
default=timezone.now,
help_text='Format: MM/DD/YYYY'
)
permit_holder_name = models.CharField(
max_length=250,
help_text='Name of Permit Holder'
)
permit_holder_signature = models.ImageField(
blank=True
)
permit_holder_address_1 = models.CharField(
max_length=250,
verbose_name="Street Address 1"
)
permit_holder_address_2 = models.CharField(
max_length=250,
blank=True,
verbose_name="Street Address 2"
)
permit_holder_city = models.CharField(
max_length=250,
verbose_name="City"
)
permit_holder_state = localflavor.USStateField(
verbose_name="State"
)
permit_holder_zipcode = localflavor.USZipCodeField(
verbose_name="Zipcode"
)
permit_holder_2_name = models.CharField(
max_length=250,
help_text='Name of Permit Holder',
blank=True
)
permit_holder_2_signature = models.ImageField(
blank=True
)
permit_holder_2_address_1 = models.CharField(
max_length=250,
verbose_name="Street Address 1",
blank=True
)
permit_holder_2_address_2 = models.CharField(
max_length=250,
blank=True,
verbose_name="Street Address 2"
)
permit_holder_2_city = models.CharField(
max_length=250,
verbose_name="City",
blank=True
)
permit_holder_2_state = localflavor.USStateField(
verbose_name="State",
blank=True
)
permit_holder_2_zipcode = localflavor.USZipCodeField(
verbose_name="Zipcode",
blank=True
)
created = models.DateTimeField(
default=timezone.now
)
updated = models.DateTimeField(
default=timezone.now
)
status = models.CharField(
max_length=100,
choices=STATUS_CHOICES,
default='needs_approval'
)
decision_explanation = models.TextField(
blank=True)

def __str__(self):
return self.event_name
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% extends "specialuseform/base.html" %}

{% block content %}
<h1>Application Cancelled</h1>
<p class="usa-font-lead">
Application #{{ permit.permit_id }}: {{ permit.event_name }}
</p>

<p>Confirming: your permit has been cancelled.</p>

{% endblock content %}
Loading

0 comments on commit fd06d40

Please sign in to comment.