Skip to content

Commit dad08af

Browse files
committed
Add simple form for importing web analytics
1 parent cd5764d commit dad08af

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

reports/forms.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from django import forms
2+
3+
from versions.models import Version
4+
5+
6+
class ImportWebAnalyticsForm(forms.Form):
7+
version = forms.ModelChoiceField(
8+
Version.objects.get_dropdown_versions(),
9+
widget=forms.Select(attrs={"class": "dropdown !mb-0 h-[38px]"}),
10+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{% extends "base.html" %}
2+
3+
{% block content %}
4+
<main class="content">
5+
<div class="py-3 px-3 md:mt-3 md:px-0">
6+
<h3 class="mb-4">Import Web Statistics</h3>
7+
<form method="post">
8+
{% csrf_token %}
9+
{{ form }}
10+
<div class="flex flex-row my-4">
11+
<input class="py-2 px-3 text-sm text-white rounded bg-orange cursor-pointer" type="submit" value="Import">
12+
</div>
13+
</form>
14+
</div>
15+
</main>
16+
{% endblock %}

0 commit comments

Comments
 (0)