Skip to content

Commit

Permalink
- Fix custom apps build
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Mar 29, 2023
1 parent 2fe4e2a commit 6f5d1e0
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 5 deletions.
23 changes: 23 additions & 0 deletions src/mad_geonode4/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,17 @@
#
#########################################################################

from django.conf.urls import url, include
from django.views.generic import TemplateView

from geonode.urls import urlpatterns


from oca import HomePage
from partenaire.api import PartenaireResource

part_res= PartenaireResource()

'''
# You can register your own urlpatterns here
urlpatterns = [
Expand All @@ -28,3 +37,17 @@
name='home'),
] + urlpatterns
'''
urlpatterns += [
## include your urls here
url(r'^partenaire/', include('partenaire.urls')),
]

urlpatterns = [
# url(r'^/?$',
# TemplateView.as_view(template_name='site_index.html'),
# name='home'),
url(r'^oca',
HomePage.as_view(),
name='home'),
# url(r'^/?$', HomePage.as_view(), name='home'),
] + urlpatterns
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ <h4 class="field-content"><a href="">{{part.nom_organisation}}</a></h4>
</div>
</div>
</article>
{% endverbatim %}
{% endverbatim %}
4 changes: 2 additions & 2 deletions src/partenaire/templates/partenaire/partenaire_list.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "site_base.html" %}
{% extends "geonode_base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load static %}

{% block body_class %}partenaires{% endblock %}

Expand Down
4 changes: 2 additions & 2 deletions src/partenaire/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
from partenaire.models import Partenaire
from django.http import HttpResponse
from django.http import Http404
from django.shortcuts import render_to_response
from django.shortcuts import render


def index(request):
partenaire_list = Partenaire.objects.all()
return render_to_response('partenaire/partenaire_liste.html',
return render(request, 'partenaire/partenaire_liste.html',
RequestContext(request, {'partenaire_list': partenaire_list}))

0 comments on commit 6f5d1e0

Please sign in to comment.