Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 04dc7fcd30 | |||
| 09546212b9 | |||
| b1cd7dee40 | |||
| c772e1de06 | |||
| 4332a750d1 |
@@ -148,7 +148,7 @@ class CompensationActionAdmin(admin.ModelAdmin):
|
||||
|
||||
admin.site.register(Compensation, CompensationAdmin)
|
||||
admin.site.register(EcoAccount, EcoAccountAdmin)
|
||||
admin.site.register(EcoAccountDeduction, EcoAccountDeductionAdmin)
|
||||
#admin.site.register(EcoAccountDeduction, EcoAccountDeductionAdmin)
|
||||
|
||||
# For a more cleaner admin interface these rarely used admin views are not important for deployment
|
||||
#admin.site.register(Payment, PaymentAdmin)
|
||||
|
||||
@@ -16,4 +16,5 @@ class EmaAdmin(AbstractCompensationAdmin):
|
||||
"teams",
|
||||
]
|
||||
|
||||
|
||||
admin.site.register(Ema, EmaAdmin)
|
||||
|
||||
@@ -151,7 +151,7 @@ class ResubmissionAdmin(BaseResourceAdmin):
|
||||
|
||||
|
||||
# Outcommented for a cleaner admin backend on production
|
||||
admin.site.register(Geometry, GeometryAdmin)
|
||||
#admin.site.register(Geometry, GeometryAdmin)
|
||||
#admin.site.register(Parcel, ParcelAdmin)
|
||||
#admin.site.register(District, DistrictAdmin)
|
||||
#admin.site.register(Municipal, MunicipalAdmin)
|
||||
|
||||
@@ -275,4 +275,7 @@ Similar to bootstraps 'shadow-lg'
|
||||
}
|
||||
.tree-label.badge{
|
||||
font-size: 90%;
|
||||
}
|
||||
.alert{
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
@@ -93,14 +93,23 @@ class ClientProxyParcelWFS(BaseClientProxyView):
|
||||
auth = HTTPDigestAuth(CLIENT_PROXY_AUTH_USER, CLIENT_PROXY_AUTH_PASSWORD)
|
||||
|
||||
content, response_code = self.perform_url_call(url, auth=auth)
|
||||
body = json.loads(content)
|
||||
error_detected = response_code != 200
|
||||
error_code = f"response code:{response_code}"
|
||||
try:
|
||||
body = json.loads(content)
|
||||
except JSONDecodeError:
|
||||
body = {}
|
||||
error_code = "json invalid"
|
||||
error_detected = True
|
||||
|
||||
body["crs"] = {
|
||||
"type": "name",
|
||||
"properties": {
|
||||
"name": "urn:ogc:def:crs:EPSG::25832"
|
||||
"name": "urn:ogc:def:crs:EPSG::25832",
|
||||
}
|
||||
}
|
||||
if response_code != 200:
|
||||
if error_detected:
|
||||
body["crs"]["properties"]["msg"] = f"Error detected ({error_code})"
|
||||
return JsonResponse({
|
||||
"status_code": response_code,
|
||||
"content": body,
|
||||
|
||||
@@ -17,6 +17,9 @@ class ServerMessageAdmin(admin.ModelAdmin):
|
||||
search_fields = [
|
||||
"subject"
|
||||
]
|
||||
ordering = [
|
||||
"-publish_on"
|
||||
]
|
||||
|
||||
def save_model(self, request, obj, form, change):
|
||||
obj.save(user=request.user)
|
||||
|
||||
@@ -27,7 +27,18 @@
|
||||
<div class="col">
|
||||
{% for message in messages %}
|
||||
<div class="row alert alert-{{ message.tags }}">
|
||||
{{ message }}
|
||||
<div>
|
||||
<span class="mr-3">
|
||||
{% if "danger" in message.tags %}
|
||||
{% fa5_icon 'exclamation' %}
|
||||
{% elif "info" in message.tags %}
|
||||
{% fa5_icon 'info' %}
|
||||
{% elif "success" in message.tags %}
|
||||
{% fa5_icon 'check' %}
|
||||
{% endif %}
|
||||
</span>
|
||||
{{ message }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
@@ -53,6 +53,9 @@
|
||||
{{ user.username }}
|
||||
</div>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
{% if user.is_staff or user.is_superuser %}
|
||||
<a class="dropdown-item" target="_blank" href="{% url 'admin:index' %}">{% fa5_icon 'tools' %} {% trans 'Admin' %}</a>
|
||||
{% endif %}
|
||||
<a class="dropdown-item" href="{% url 'user:index' %}">{% fa5_icon 'cogs' %} {% trans 'Settings' %}</a>
|
||||
<a class="dropdown-item" href="{% url 'logout' %}">{% fa5_icon 'sign-out-alt' %} {% trans 'Logout' %}</a>
|
||||
</div>
|
||||
|
||||
@@ -23,13 +23,22 @@
|
||||
{% endblock %}
|
||||
</header>
|
||||
<div class="container-fluid mt-3 px-5">
|
||||
<div class="">
|
||||
{% for message in messages %}
|
||||
<div class="row alert alert-{{ message.tags }}">
|
||||
<div class="row alert alert-{{ message.tags }}">
|
||||
<div>
|
||||
<span class="mr-3">
|
||||
{% if "danger" in message.tags %}
|
||||
{% fa5_icon 'exclamation' %}
|
||||
{% elif "info" in message.tags %}
|
||||
{% fa5_icon 'info' %}
|
||||
{% elif "success" in message.tags %}
|
||||
{% fa5_icon 'check' %}
|
||||
{% endif %}
|
||||
</span>
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user