I have the following model:
from django.contrib.gis.db import models as g
class Neighborhoods(Model):
area = g.PolygonField()
def point(self):
#TODO:something better than this horrible hack of 2 db round trip
return
Neighborhoods.objects.annotate(p=Centroid("area")).
On 04/09/19 10:24, Julien Enselme wrote:
> Did you do the reverse with 'reviews:detail'?
>>>
reverse("review:detail")
Traceback (mo
On 04/09/19 10:24, Julien Enselme wrote:
> Did you do the reverse with 'reviews:detail'?
>>>
reverse("review:detail")
Traceback (mo
Applied your suggestion,now I get
django.urls.exceptions.NoReverseMatch: Reverse for 'detail' not found.
'detail' is not a valid view function or pattern name.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and st
I did put reviews/urls.py:
from django.urls import path, include
from . import views as v
app_name="review"
urlpatterns = [
path("", v.ReviewsDetail.as_view(), name="detail"),
]
Also if I replace name parameter with namespace I get:
TypeError: _path() got an unexpected keyword argument 'namesp
I have in mysite/urls.py:
from django.contrib import admin
from django.urls import include, path
from django.contrib.auth import views as auth_views
from django.conf import settings
from .views import *
urlpatterns = [
path('admin/', admin.site.urls, name="admin"),
path("places/", include
I have the following files:
#views.py
from django.views.generic.edit import FormView
from django.views.generic.base import TemplateView
from braces.views import AnonymousRequiredMixin, CsrfExemptMixin
#exempting from Csfr as the worst it can do is making lots of new users
class LogonView(CsrfEx
7 matches
Mail list logo