Skip to content

Commit

Permalink
Merge pull request #671 from kartoza/develop
Browse files Browse the repository at this point in the history
Updates (#670)
  • Loading branch information
meomancer authored Mar 21, 2024
2 parents a3a988c + d8d1fc4 commit 69e690d
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 7 deletions.
2 changes: 1 addition & 1 deletion deployment/.env
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ PYTHONPATH=/home/web/django_project:/geonode
USE_DEFAULT_GEOSERVER_STYLE=False
INITIAL_FIXTURES=True

VERSION=4.4.9
VERSION=4.4.10
ISTSOS_VERSION=2.4.1-2

# ------ GEOSERVER ------
Expand Down
2 changes: 1 addition & 1 deletion django_project/gwml2
Submodule gwml2 updated from b5bf72 to 4898bb
9 changes: 8 additions & 1 deletion django_project/igrac/context_processors.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
from django.conf import settings

from igrac.models.site_preference import SitePreference
from .utilities import get_default_filter_by_group


def extra_context(request):
"""Global values to pass to templates"""
banner_url = None
pref = SitePreference.objects.first()
if pref and pref.banner:
banner_url = pref.banner.url

defaults = dict(
DEFAULT_GROUP_FILTER=get_default_filter_by_group(request.user),
GOOGLE_ANALYTIC_KEY=settings.GOOGLE_ANALYTIC_KEY
GOOGLE_ANALYTIC_KEY=settings.GOOGLE_ANALYTIC_KEY,
BANNER_URL=banner_url
)

return defaults
18 changes: 18 additions & 0 deletions django_project/igrac/migrations/0012_sitepreference_banner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.20 on 2024-03-21 03:14

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('igrac', '0011_registrationpage'),
]

operations = [
migrations.AddField(
model_name='sitepreference',
name='banner',
field=models.ImageField(blank=True, null=True, upload_to='images'),
),
]
4 changes: 4 additions & 0 deletions django_project/igrac/models/site_preference.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ class SitePreference(Preferences):
related_name='preference_ggmn_layer',
on_delete=models.SET_NULL
)
banner = models.ImageField(
upload_to='images',
null=True, blank=True,
)
2 changes: 0 additions & 2 deletions django_project/igrac/static/css/base-igrac.css
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ body.igrac-home {

.banner {
position: relative;
/* Hide banner image due to copyright issue */
/* background-image: url(img/coverfoto.jpg); */
background-repeat: no-repeat;
background-size: cover;
background-position: top center;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% load i18n %}
<div class="banner">
<div class="banner" {% if BANNER_URL %}style="background-image: url({{ BANNER_URL }})"{% endif %}>
<div class="container">
<div class="row">
<div class="col-md-7">
Expand Down
2 changes: 1 addition & 1 deletion django_project/version/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.4.9
4.4.10

0 comments on commit 69e690d

Please sign in to comment.