diff --git a/ldvspec/lofardata/migrations/0003_increase_filter_name.py b/ldvspec/lofardata/migrations/0003_increase_filter_name.py new file mode 100644 index 0000000000000000000000000000000000000000..04e28a59cb13096d8b7d9c25088bf3c26824fb68 --- /dev/null +++ b/ldvspec/lofardata/migrations/0003_increase_filter_name.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.4 on 2022-07-21 13:21 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('lofardata', '0002_defines_dataproduct'), + ] + + operations = [ + migrations.AlterField( + model_name='dataproductfilter', + name='field', + field=models.CharField(max_length=100), + ), + ] diff --git a/ldvspec/lofardata/models.py b/ldvspec/lofardata/models.py index 882475e59bc4c1f53fe7916b2b76c7630bbb4f75..2c51cce17d577b5477d45e1ef8606e1119716735 100644 --- a/ldvspec/lofardata/models.py +++ b/ldvspec/lofardata/models.py @@ -63,6 +63,6 @@ class DataProduct(models.Model): class DataProductFilter(models.Model): - field = models.CharField(max_length=20) + field = models.CharField(max_length=100) name = models.CharField(max_length=20) lookup_type = models.CharField(max_length=100) diff --git a/ldvspec/lofardata/templates/lofardata/base.html b/ldvspec/lofardata/templates/base.html similarity index 100% rename from ldvspec/lofardata/templates/lofardata/base.html rename to ldvspec/lofardata/templates/base.html diff --git a/ldvspec/lofardata/templates/lofardata/index.html b/ldvspec/lofardata/templates/lofardata/index.html index f41e698a5f62e759ff9087f7512d9892bb64452f..92cd6d0b52c78a4dbf3378bcfea57f73a35fd9fb 100644 --- a/ldvspec/lofardata/templates/lofardata/index.html +++ b/ldvspec/lofardata/templates/lofardata/index.html @@ -1,4 +1,4 @@ -{% extends 'lofardata/base.html' %} +{% extends 'lofardata/../base.html' %} {% load static %} {% block myBlock %} diff --git a/ldvspec/lofardata/templates/registration/login.html b/ldvspec/lofardata/templates/registration/login.html new file mode 100644 index 0000000000000000000000000000000000000000..6ed19e3c86dfabdbdda5e6edecf52f1ad4da5c55 --- /dev/null +++ b/ldvspec/lofardata/templates/registration/login.html @@ -0,0 +1,36 @@ +{% extends 'lofardata/../base.html' %} + +{% load static %} + +{% block myBlock %} + +{% if form.errors %} +<p>Your username and password didn't match. Please try again.</p> +{% endif %} + +{% if next %} + {% if user.is_authenticated %} + <p>Your account doesn't have access to this page. To proceed, + please login with an account that has access.</p> + {% else %} + <p>Please login to see this page.</p> + {% endif %} +{% endif %} + +<form class="form-signin" action="{% url 'login' %}" method="post" id="login-form"> + {% csrf_token %} + <h2 class="form-signin-heading">{{ message }}</h2> + <label for="id_username" class="sr-only">Email address</label> + <input type="text" name="username" id="id_username" class="form-control" placeholder="User Name" required autofocus> + <label for="id_password" class="sr-only">Password</label> + <input type="password" name="password" id="id_password" class="form-control" placeholder="Password" required> + <div class="checkbox"> + <label> + <input type="checkbox" value="remember-me"> Remember me + </label> + </div> + <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button> +</form> + + +{% endblock %} \ No newline at end of file diff --git a/ldvspec/lofardata/urls.py b/ldvspec/lofardata/urls.py index 877dee282177eba1850856f5a56b5de9f9e29471..e8fdbc8e042d4739eb6652283e48dd6efa12ff23 100644 --- a/ldvspec/lofardata/urls.py +++ b/ldvspec/lofardata/urls.py @@ -23,7 +23,5 @@ urlpatterns = [ version="0.0.1" ), name='openapi-schema'), # GUI - #path('', views.IndexView.as_view(), name='index'), path('', views.index, name='index'), - -] \ No newline at end of file +]