-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #671 from kartoza/develop
Updates (#670)
- Loading branch information
Showing
8 changed files
with
34 additions
and
7 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
Submodule gwml2
updated
from b5bf72 to 4898bb
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 |
---|---|---|
@@ -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
18
django_project/igrac/migrations/0012_sitepreference_banner.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.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'), | ||
), | ||
] |
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
2 changes: 1 addition & 1 deletion
2
django_project/igrac/templates/geonode-mapstore-client/snippets/hero.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
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 |
---|---|---|
@@ -1 +1 @@ | ||
4.4.9 | ||
4.4.10 |