-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add SiteConfiguration * Add views and urls * Fix "active" nav class implementation * Add site config to experiment config endpoint * Fix mypy issues * Add T&Cs API endpoint
- Loading branch information
Showing
26 changed files
with
357 additions
and
11 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
18 changes: 18 additions & 0 deletions
18
flare_portal/experiments/migrations/0028_participant_agreed_to_terms_and_conditions.py
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,18 @@ | ||
# Generated by Django 3.1.4 on 2020-12-22 05:26 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("experiments", "0027_module_ordering"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="participant", | ||
name="agreed_to_terms_and_conditions", | ||
field=models.BooleanField(default=False), | ||
), | ||
] |
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
Empty file.
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,33 @@ | ||
# Generated by Django 3.1.4 on 2020-12-21 16:33 | ||
|
||
from typing import List, Tuple | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies: List[Tuple[str, str]] = [] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="SiteConfiguration", | ||
fields=[ | ||
( | ||
"id", | ||
models.AutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("terms_and_conditions", models.TextField(blank=True)), | ||
], | ||
options={ | ||
"abstract": False, | ||
}, | ||
), | ||
] |
Empty file.
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,10 @@ | ||
from django.db import models | ||
|
||
from solo.models import SingletonModel | ||
|
||
|
||
class SiteConfiguration(SingletonModel): | ||
terms_and_conditions = models.TextField(blank=True) | ||
|
||
def __str__(self) -> str: | ||
return "Site configuration" |
41 changes: 41 additions & 0 deletions
41
flare_portal/site_config/templates/site_config/siteconfiguration_form.html
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,41 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block title %}Update global FLARe settings{% endblock title %} | ||
|
||
{% block content %} | ||
<div class="container"> | ||
<div class="page-header"> | ||
<h1 class="page-title">Update global FLARe settings</h1> | ||
</div> | ||
<div class="row"> | ||
<div class="col-lg-6"> | ||
<div class="card"> | ||
<form action="" method="POST"> | ||
{% csrf_token %} | ||
|
||
<div class="card-body"> | ||
{% if form.non_field_errors %} | ||
<div class="card-alert alert alert-danger my-3"> | ||
{% for error in form.non_field_errors %}{{ error }}{% endfor %} | ||
</div> | ||
{% endif %} | ||
|
||
{% for field in form %} | ||
{% include "includes/form-group.html" %} | ||
{% endfor %} | ||
|
||
</div> | ||
|
||
<div class="card-footer"> | ||
<div class="d-flex"> | ||
<div class="btn-list ml-auto"> | ||
<button type="submit" class="btn btn-primary">Save</button> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock content %} |
Empty file.
Oops, something went wrong.