Hello Olivier,
Since JSON objects can only have string keys[0] I'd suggest you always use
strings
as dict keys on the Python side to avoid having to deal with both cases.
Another solution would to subclass JSONField to override the from_db_value
method
to turn keys into integer when retrieved f
i want to do something like
datetime.date.fromordinal(int(date_applied))
to convert date from julian to gregorian date, just wondering it this can
be done in template?
On Wed, Apr 25, 2018 at 1:56 PM, sum abiut wrote:
> Current i have a for loop
>
>
> Date
>
> {% for a in results %}
>
> {{a
Current i have a for loop
Date
{% for a in results %}
{{a.date_applied}}
{%endfor%)
currently the date is in julian date. i wan to convert the date to
gregorian date. Is there a way to do that in the template.
On Wed, Apr 25, 2018 at 1:50 PM, sum abiut wrote:
> I have a function that quer
I have a function that query the db and extract and display data on a
template
def bydate_display(request):
if "selectdate" in request.POST and "selectdate1" in request.POST and
"selectaccount" in request.POST:
selected_date = request.POST["selectdate"]
selected_date1 = reques
Using Django 1.11, Python 2.7, PostGres, and JSONField I'm getting behavior
I don't expect.
It seems when JSONField values are initially saved/accessed in memory,
they're python "integers", but when saved to the database and then
re-accessed, the values are now in string format.
*What about ho
Using Django 1.11, Python 2.7, PostGres, and JSONField I'm getting behavior
I don't expect.
It seems when JSONField values are initially saved/accessed in memory,
they're python "integers", but when saved to the database and then
re-accessed, the values are now in string format.
*What about ho
Thanks heaps Larry
On Tue, Apr 24, 2018 at 10:40 PM, Larry Martell
wrote:
> I think you are looking for the range function
>
> https://docs.djangoproject.com/en/dev/ref/models/querysets/#range
>
>
> On Mon, Apr 23, 2018 at 11:54 PM sum abiut wrote:
>
>> I have two date picker fields that i want
If i don't remove contrib from middleware, Csrf header will be missing and
that's a problem
On Tue, Apr 24, 2018, 9:02 PM Avraham Serour wrote:
> I wouldn't use two settings to only achieve this, you can add multiple
> auth classes which django will try in a loop.
>
> You can add the JWT and a c
I wouldn't use two settings to only achieve this, you can add multiple auth
classes which django will try in a loop.
You can add the JWT and a custom class which can baseclass the
login/password auth and only allow superusers to login
On Tue, Apr 24, 2018 at 6:18 PM, Prakash D wrote:
> Hi I'm t
Hi I'm trying to port an existing application (which uses Django admin
portal) to JWT authentication system so I can support native mobile
clients.
My proposed solution is having two manage.py files (will run on seaparate
port numbers) and two settings.py files which will have different url
I have a Django project which uses django's contrib library for session
management using cookies (for both Admin panel and User authentication).
Now I'm migrating to JWT token based authentication system. I do not want
to re-build an admin portal.
My current settings.py looks like this
MID
Have any of you tried creating a recommendation system using the django
framework
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googl
Whats the best way to implement breadcrumbs in a django template? I'd like
something that will track where the user came from and can offer putting
the link back in something like an
Thanks
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
The debug suggest that it only tried to match the admin pattern but
nothing else,
that sugggests to me that you missed this bit in the mysite/urls.py
from django.contrib import admin
from django.urls import include, path
urlpatterns = [
path('polls/', include('polls.urls')),
Hi,
django.middleware.security.SecurityMiddleware is missing in your settings.py
file in the middleware section.
Read the Django docs for more details on what they each one of the security
options do.
https://docs.djangoproject.com/en/2.0/ref/middleware/
Sent from my mobile device
> On Apr
Look like url is missing. try to add this line to urls.py
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),]
On Tuesday, April 24, 2018 at 5:04:33 PM UTC+5:30, aljom...@live.com wrote:
>
> hi. i'm new to django dev. so i'm following the tut
I think you are looking for the range function
https://docs.djangoproject.com/en/dev/ref/models/querysets/#range
On Mon, Apr 23, 2018 at 11:54 PM sum abiut wrote:
> I have two date picker fields that i want the users to select from date to
> end date. and i want to display data between the two
Hi All,
I'm new here and I'm having getting my django to run... Any help?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.
hi. i'm new to django dev. so i'm following the tutorial at
https://docs.djangoproject.com/en/2.0/intro/tutorial01/
i copied and pasted the code samples so as not to introduce typing mistakes.
everything works fine until i reached the "polls" section. i get below errors:
Page not found (404)
Re
19 matches
Mail list logo