Hi Gavin,
You passed pk from URL.
class TeamInfo(APIView):
#...
def get(self, request, pk): # Add pk to params
club_pk = self.kwargs.get('pk') # get the pk
#...
return Response({
'club_pk': club_pk
})
Will pass the
Not sure I understand about the "pass that session key variable into the
URL argument". But if you want the URL
(http://127.0.0.1:8000/club_home//teams/) works, change this path:
urlpatterns = [
path('/teams/', views.club_home, name='club_home'),
]
On Sun, Mar 10, 2019 at 10:57 PM Gavin Boy
Hi Ciuni,
Maybe your url already is path('updateTabacchi/', I think
question is {{ form }}.
{{ form }} is to render fields without id. Add the if you want to
get the id from request.POST:
{% csrf_token %}
{{ form}}
On Fri, Feb 8, 2019 at 4:30 PM Giuseppe Ciuni
wrote:
> Hi gu
Hi Mikko,
*t = timezone.now()* just get UTC timezone when USE_TZ=True.
Modify as follows:
tzinfo = pytz.timezone('end user's timezone')
timezone.activate(tzinfo)
t = timezone.localtime(timezone.now())
On Fri, Feb 8, 2019 at 12:50 PM Mikko Meronen
wrote:
> Hi Alvaro,
>
> If I do
4 matches
Mail list logo