Charly
𝑵𝑬𝑹𝒇 • Noah Dìaz
What is django
𝑵𝑬𝑹𝒇 • Noah Dìaz
but I don't know where to start.
Shainkey
"error": "SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column \"is_active\" of relation \"user_login_log\" violates not-null constraint\nDETAIL: Failing row contains (5, null, 538565, 2025-08-07 15:57:43+05:30, null, null, ::1, 8865987209, 1).\nThe SQL being executed was: INSERT INTO \"public\".\"user_login_log\" (\"otp\", \"otp_generated_time\", \"otp_verified_time\", \"ip\", \"mobile_number\", \"user_id\") VALUES ('538565', '2025-08-07 15:57:43 +05:30', NULL, '::1', '8865987209', 1)
Charly
"error": "SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column \"is_active\" of relation \"user_login_log\" violates not-null constraint\nDETAIL: Failing row contains (5, null, 538565, 2025-08-07 15:57:43+05:30, null, null, ::1, 8865987209, 1).\nThe SQL being executed was: INSERT INTO \"public\".\"user_login_log\" (\"otp\", \"otp_generated_time\", \"otp_verified_time\", \"ip\", \"mobile_number\", \"user_id\") VALUES ('538565', '2025-08-07 15:57:43 +05:30', NULL, '::1', '8865987209', 1)
Well the issue is clear, you need to pass a is_active value
Shainkey
Okay, understood. But when I define a default value in a BooleanField in Django, does it automatically imply that null=True and blank=True are being set?
Charly
Shainkey
Okay thank u
Suryo Adhy Chandra
Suayip
Hi everyone,
I have been working on a new Filter backend for Django REST framework.
The de-facto library for filtering and query parameter handling is django-filter, but I had some use cases where it fell short. Here are some features:
- You use serializer fields to do parsing and validation. No more need to deal with Django forms and widgets.
- You can group your filters. Grouping allows you to customize interactions between your filters.
- You can use the constraint system to perform validation between your filters.
- You can create nested filters with child filters (as seen in code snippet).
... and more. In the documentation, I explain the reasoning behind these choices as well as presenting some real-world examples. Check it out:
http://github.com/realsuayip/rest-filters
I would like to see your comments on it. I'm open to suggestions and
recommendations. Thanks!
from rest_filters import Filter, FilterSet
from rest_framework import serializers
class UserFilterSet(FilterSet[User]):
username = Filter(serializers.CharField(min_length=2), lookup="icontains")
company = Filter(
namespace=True,
children=[
Filter(
serializers.IntegerField(min_value=1),
lookup="id",
),
Filter(
serializers.CharField(min_length=2),
lookup="name__icontains",
param="name",
),
],
)
created = Filter(
serializers.DateTimeField(),
namespace=True,
children=[
Filter(lookup="gte"),
Filter(lookup="lte"),
],
)
Isaac
Can I get help
I am trying yo run a django code
But no matter the views I create
The django install worked successfully is the only thing showing
Charly
Isaac
There are no errors it runs perfectly
Isaac
Just that the view is not changing
Charly
Isaac
I can't send pictures or screen shots here
Foroutan
Isaac
Charly
Foroutan
I did
did you include that in the main urls.py?
Isaac
https://dpaste.org/e289S/raw
Charly
Isaac
https://dpaste.org/VQnfH
Isaac
Isaac
I.S
hello guys I need a help
I open my web server through this link address 192.168.124.213:8000
and I wanna to open by this link 192.168.124.213 could you help me with this ? I wanna do that with nginx in Ubuntu Server
Doragonsureiyā
I.S
my webserver work in django
clouded
I.S
ok
~ ᴍᴇʜᴅɪ
Hello, I’m just startin’ out in web dev, tryna build a Django app. You think it’s normal to use vue.js for the Front-end and Django holdin’ it down in the Server-side?
Alexander
Hi everyone!
Is anyone here using django-ninja together with django-debug-toolbar?
Is it possible to see the number of SQL queries when calling an endpoint through the Swagger UI?
~ ᴍᴇʜᴅɪ
Charly
Дмитрий
Alexander
Use request.queries
Thank you!
I just found a solution, in debug toolbar is possible to see requests history, than its possible to see Info about each of the last requests
Дмитрий
You can Just Print to console request.Queries just in view
∴
Good morning. Do you guys recommend using default sqlite database in production?
.
∴
Hadi
Suryo Adhy Chandra
Lion
razorblade23
Postgresql is best for all these things
It really depends on the usecase
That is why we have so many database solutions
There is no magic bullet.
You pick the one that meets the needs of your product
Lion
razorblade23
Yes, you're right. But for me mongodb & postgresql both works fine
They are battle tested and have been around for quite some time
It would be really bad if they did not work as expected...
But they are not the only solutions out there.
Again, it really depends on what you are building.
One of my projects uses 3 types of databases
SQL based (postgres), NoSQL (mongo) and Redis
It really depends what you are doing
Lion
Toheeb Àdúràmọ́mi
Good day, geeks.
Where do we recommend a total beginner to start back-end engineering choosing Django as a framework?
Suryo Adhy Chandra
~
Hello, I have Django with django_celery_beat and ASGI/Channels. Periodic tasks were set and are in the enable table (enabled=True), but they are not executed on schedule, even if every second is enabled, in the celery-beat logs there are no messages like Scheduler: Sending urgent task <task.name>. Tell me, what could be the reason for such behavior, so that the tasks are launched again?
Toheeb Àdúràmọ́mi
Didar
I finished my restaurant project, but I have problems with creating dashboard can you give me some advice.
Charly
Suayip
Suryo Adhy Chandra
Charly
Suryo Adhy Chandra
because some of the item in dashboard maybe frequently updated.
cmwii
Tenzing
For django deployment which is the best practice should I follow.
clouded
Dhurke Sahdmadhi
How can I convert my django project into a compiled executable like go. I understand the limitations of py but need something similar. I am using gunicorn + nginx for reference
Maxim
Doragonsureiyā
Khaled
Dhurke Sahdmadhi
Let me clarify I want to achieve consistency and isolation also some degree of obfuscation
clouded
Dhurke Sahdmadhi
The server may be accessed by another person wanting to share resources.
SHEIKH HAFIJUL ALI
SHEIKH HAFIJUL ALI
Like what are you trying to achieve with these restrictions in place?