Skip to content

Commit 3cc00b1

Browse files
authored
Added Audio Input with multiple languages and Deadline with remainder (#13)
* Added Audio Input with multiple languages and Deadline with remainder * Removed __pycache__ files, used black for formatting, Documented the required modules and functions * Removed __pycache__ files * Removed sql/add.sql
1 parent 7ea781a commit 3cc00b1

28 files changed

+418
-164
lines changed
-139 Bytes
Binary file not shown.
-180 Bytes
Binary file not shown.
-548 Bytes
Binary file not shown.
-534 Bytes
Binary file not shown.
-426 Bytes
Binary file not shown.
-1.34 KB
Binary file not shown.

FirstApp/apps.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from django.apps import AppConfig
22

3-
43
class FirstappConfig(AppConfig):
5-
name = 'FirstApp'
4+
name = "FirstApp" # Name of the app (used for app registration)

FirstApp/forms.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
from django.forms import ModelForm
2-
from .models import Wish
3-
class WishForm(ModelForm):
1+
from django import forms
2+
from .models import Wish
3+
4+
class WishForm(forms.ModelForm):
45
class Meta:
5-
model=Wish
6-
fields='__all__'
6+
model = Wish
7+
fields = ["wishtitle", "mywish", "deadline"] # Fields displayed in the form
8+
widgets = {"deadline": forms.DateInput(attrs={"type": "date"})} # Custom date input widget

FirstApp/migrations/0001_initial.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,23 @@ class Migration(migrations.Migration):
77

88
initial = True
99

10-
dependencies = [
11-
]
10+
dependencies = []
1211

1312
operations = [
1413
migrations.CreateModel(
15-
name='Wish',
14+
name="Wish",
1615
fields=[
17-
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
18-
('title', models.CharField(max_length=250)),
19-
('body', models.CharField(max_length=1000)),
16+
(
17+
"id",
18+
models.AutoField(
19+
auto_created=True,
20+
primary_key=True,
21+
serialize=False,
22+
verbose_name="ID",
23+
),
24+
),
25+
("title", models.CharField(max_length=250)),
26+
("body", models.CharField(max_length=1000)),
2027
],
2128
),
2229
]

FirstApp/migrations/0002_auto_20190911_2242.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
class Migration(migrations.Migration):
77

88
dependencies = [
9-
('FirstApp', '0001_initial'),
9+
("FirstApp", "0001_initial"),
1010
]
1111

1212
operations = [
1313
migrations.RenameField(
14-
model_name='wish',
15-
old_name='body',
16-
new_name='mywish',
14+
model_name="wish",
15+
old_name="body",
16+
new_name="mywish",
1717
),
1818
migrations.RenameField(
19-
model_name='wish',
20-
old_name='title',
21-
new_name='wishtitle',
19+
model_name="wish",
20+
old_name="title",
21+
new_name="wishtitle",
2222
),
2323
]

0 commit comments

Comments
 (0)