Ad
It is my first live demo project please incate all pros and cons in post comments
ggg
can you send setup.cfg file? so i can recommend using ruff linter
# flake8 and pycodestyle don't support pyproject.toml # https://github.com/PyCQA/flake8/issues/234 # https://github.com/PyCQA/pycodestyle/issues/813 [flake8] max-line-length = 119 exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules,venv,.venv extend-ignore = E203 [pycodestyle] max-line-length = 119 exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules,venv,.venv
ggg
So when I add F401 to "extend-ignore" -> flake8 does not see it.
ggg
So this does not work -> extend-ignore = E203,F401
ggg
How are you running flake8?
When i run -> git commit -> i have flake8 as pre-commit hook
ali
Hello friends, when I try to create an image in Docker, it gives me this error. Do you know what I should do?
ali
this is the error I get : ERROR: failed to solve: python:3.10-alpine: failed to do request: Head "https://registry-1.docker.io/v2/library/python/manifests/3.10-alpine": net/http: TLS handshake timeout
William
Hello can someone explain to me auth_user table is_active field
DePyraxe
Hey guyz, it's a better choice to start with Django as begginer in web development?
Anonymous
I was just testing my django project Using python manage.py test job am getting a db error for a perticular module "job" Below is the error message, Can anyone help Destroying old test database for alias 'default'... Traceback (most recent call last): File "/home/konsultera/carbon_backend/carbonenv/lib/python3.8/site-packages/django/db/backends/utils.py", line 87, in _execute return self.cursor.execute(sql) psycopg2.errors.UndefinedTable: relation "job" does not exist The above exception was the direct cause of the following exception: Traceback (most recent call last): File "manage.py", line 22, in <module> main() File "manage.py", line 18, in main self._execute_with_wrappers( File "/home/konsultera/carbon_backend/carbonenv/lib/python3.8/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers return executor(sql, params, many, context) File "/home/konsultera/carbon_backend/carbonenv/lib/python3.8/site-packages/django/db/backends/utils.py", line 87, in _execute return self.cursor.execute(sql) File "/home/konsultera/carbon_backend/carbonenv/lib/python3.8/site-packages/django/db/utils.py", line 91, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "/home/konsultera/carbon_backend/carbonenv/lib/python3.8/site-packages/django/db/backends/utils.py", line 87, in _execute return self.cursor.execute(sql) django.db.utils.ProgrammingError: relation "job" does not exist
Lords
Hello everyone is it possible to connect mongodb and Django and use orm
Doragonsureiyā
Hello everyone is it possible to connect mongodb and Django and use orm
Do you want to use Django with MongoDB? Then you shouldn't Please read this article: https://daniel.feldroy.com/when-to-use-mongodb-with-django.html
Davysongs
Alex
i have a url ...:8100/endpoint/#id_token=wsfe33... i want to capture the id_token . the problem is that from my urls it is pointing to a functions in views and server side cant capture after # . How can i get the id_token
Alex
can urls.py path() function call a html
Mister
Hello I have a problem with cache. I want to delete a cache of my decorator page. But it's not working. I use cache.clear() I not working again.
ali
Internet connection problem?
No , my internet connection is good but I use vpn . Do you think the problem is with vpn?
Rodrigo
Hello everyone, good morning, my name is Rodrigo and I am really new to Django. I would like some help to understand how to achieve my goal with tips like: 1- Is it possible? 2- What's the best way to proceed? 3- Packages or example codes. I am trying to create an application for a form builder where the user can select various different components in a many-to-many relationship in the desired order, one below the other, so that later this database can be used to render HTML with subdata of the selected components. Descriptive example: I created a models.py file containing a parent component Component and child components such as NameComponent, BirthDateComponent, and DescriptionComponent. Each child is a database with specific individual information that will have its own properties. class Component(models.Model): content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE) object_id = models.PositiveIntegerField() content_object = GenericForeignKey('content_type', 'object_id') position = models.PositiveIntegerField() class Meta: abstract = True ordering = ['position'] class NameComponent(Component): value = models.TextField() class BirthDateComponent(Component): value = models.TextField() shows = models.BooleanField(default=False) class DescriptionComponent(Component): value = models.TextField() html_rendering = models.TextField() html_css = models.TextField() These components will be associated with a model in a many-to-many relationship with the form to be created, which in this case is called person in this example. class Person(models.Model): name_components = GenericRelation(NameComponent) birthdate_components = GenericRelation(BirthDateComponent) description_components = GenericRelation(DescriptionComponent) However, I didn't want to make an association of person with each separate component, but rather with the “parent”. Currently, my Add person screen in Django admin declares a many-to-many inline` for each component separately following a fixed order of the separate components. ``` class NameComponentInline(GenericTabularInline): model = NameComponent extra = 1 ordering = ['position'] class BirthDateComponentInline(GenericTabularInline): model = BirthDateComponent extra = 1 ordering = ['position'] class DescriptionComponentInline(GenericTabularInline): model = DescriptionComponent extra = 1 ordering = ['position'] class PersonAdmin(admin.ModelAdmin): inlines = [NameComponentInline, BirthDateComponentInline, DescriptionComponentInline] ``` I needed and wanted a Django admin screen where I would add a single inline with existing fields between the association of person and components and a dropdown box to select which component the user would like and in what order
Sree
Helllo friends. For my django application i want to add live video class section. Is it better to use channels for setting live class or using other external services? Please suggest any better services.
Vorke
Hello guys, I am working on a car listing web application using django. What is a good practice to increase page loading speed. Currently I display 30 cars on the landing page, and it takes a while to fully load. Thank you.
Alireza
Gotcha!, thanks
Search for django n + 1 query Also ( select related, prefetch_related, defer, only ) Also you can make frequently used endpoint faster with cache
Vorke
Thank you very much for the insight!
Rodrigo
Hello everyone, good morning, my name is Rodrigo and I am really new to Django. I would like some help to understand how to achieve my goal with tips like: 1- Is it possible? 2- What's the best way to proceed? 3- Packages or example codes. I am trying to create an application for a form builder where the user can select various different components in a many-to-many relationship in the desired order, one below the other, so that later this database can be used to render HTML with subdata of the selected components. Descriptive example: I created a models.py file containing a parent component Component and child components such as NameComponent, BirthDateComponent, and DescriptionComponent. Each child is a database with specific individual information that will have its own properties. class Component(models.Model): content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE) object_id = models.PositiveIntegerField() content_object = GenericForeignKey('content_type', 'object_id') position = models.PositiveIntegerField() class Meta: abstract = True ordering = ['position'] class NameComponent(Component): value = models.TextField() class BirthDateComponent(Component): value = models.TextField() shows = models.BooleanField(default=False) class DescriptionComponent(Component): value = models.TextField() html_rendering = models.TextField() html_css = models.TextField() These components will be associated with a model in a many-to-many relationship with the form to be created, which in this case is called person in this example. class Person(models.Model): name_components = GenericRelation(NameComponent) birthdate_components = GenericRelation(BirthDateComponent) description_components = GenericRelation(DescriptionComponent) However, I didn't want to make an association of person with each separate component, but rather with the “parent”. Currently, my Add person screen in Django admin declares a many-to-many inline` for each component separately following a fixed order of the separate components. ``` class NameComponentInline(GenericTabularInline): model = NameComponent extra = 1 ordering = ['position'] class BirthDateComponentInline(GenericTabularInline): model = BirthDateComponent extra = 1 ordering = ['position'] class DescriptionComponentInline(GenericTabularInline): model = DescriptionComponent extra = 1 ordering = ['position'] class PersonAdmin(admin.ModelAdmin): inlines = [NameComponentInline, BirthDateComponentInline, DescriptionComponentInline] ``` I needed and wanted a Django admin screen where I would add a single inline with existing fields between the association of person and components and a dropdown box to select which component the user would like and in what order
I've changed the approach and got to where I needed finaly... thnks anyway.
Shan
python - Json nested object array data request post method in Django - Stack Overflow https://stackoverflow.com/questions/77643136/json-nested-object-array-data-request-post-method-in-django
Subavani
Hello I want code for serializer mutation using crud operation pls Help mee
Siddharth
Anyone could help on this ?
Use the API parameters and pass the data, like your header and body parameters
Anonymous
Hello, I am facing some issue with celery .delay, I have searched stackoverflow but those solutions are not working for me the tasks are being received but not executed with .delay [tasks] . email_service.tasks.send_email . media_clone_handler.tasks.async_media_cloning . media_handler.tasks.move_s3_media . user_auth.tasks.notification_for_subscription . user_auth.tasks.send_email_celery . user_auth.tasks.send_email_for_password [2023-12-12 15:46:21,694: INFO/MainProcess] Task user_auth.tasks.notification_for_subscription[9dbb7d55-8c7c-48ce-8bf4-f011fe4ba4f2] received [2023-12-12 15:46:34,028: INFO/SpawnPoolWorker-9] child process 18492 calling self.run() my redis server is also running on port 6379 any help would be appreciated
None
Has anyone ever logged in with google in drf? There is a good tutorial for this job, can you introduce it?
AB
Hello
AB
What is your opinion about Django is it good
Charly
What is your opinion about Django is it good
That's a dumb question on a Django group
Charly
Imagine people this is not good and still using it
Ahmad
Hello guys I send firebase notification Every things working But silent notification not working in ios when app is in background
AB
That's a dumb question on a Django group
I am asking the experts Or I will go to node group
Charly
To ask the questions
Ask them, but is equally dumb
Charly
😒😒😒
Is good just look at the member count here
Charly
I doubt someone here telling you is not good
AB
Is good just look at the member count here
If I study Django I will become python developer I know node js And I am studying AI
Charly
AB
How to become python developer
Charly
How to become python developer
By learn python and develop python apps
AB
What is kind of apps
AB
Like machine learning apps
Charly
What is kind of apps
Any apps is not specific and this group is for Django that question is not Django related
Alex
If I study Django I will become python developer I know node js And I am studying AI
All i can say is you are focusing too much on endgoal, which itself is biggest roadblock to learning and progress
AB
Okay I appreciate your time
Dutchq
I am asking the experts Or I will go to node group
Personally I find it abit difficult to get arround I dnt know if it's the tutorials am following
Anonymous
Hello, I am facing some issue with celery .delay, I have searched stackoverflow but those solutions are not working for me the tasks are being received but not executed with .delay [tasks] . email_service.tasks.send_email . media_clone_handler.tasks.async_media_cloning . media_handler.tasks.move_s3_media . user_auth.tasks.notification_for_subscription . user_auth.tasks.send_email_celery . user_auth.tasks.send_email_for_password [2023-12-12 15:46:21,694: INFO/MainProcess] Task user_auth.tasks.notification_for_subscription[9dbb7d55-8c7c-48ce-8bf4-f011fe4ba4f2] received [2023-12-12 15:46:34,028: INFO/SpawnPoolWorker-9] child process 18492 calling self.run() my redis server is also running on port 6379 any help would be appreciated
this is what i get when debugged [2023-12-12 16:08:20,791: INFO/MainProcess] mingle: all alone [2023-12-12 16:08:20,811: INFO/MainProcess] celery@MSI ready. [2023-12-12 16:08:20,815: INFO/MainProcess] Task user_auth.tasks.notification_for_subscription[9dbb7d55-8c7c-48ce-8bf4-f011fe4ba4f2] received [2023-12-12 16:08:21,071: INFO/SpawnPoolWorker-5] child process 22036 calling self.run() [2023-12-12 16:08:21,071: INFO/SpawnPoolWorker-3] child process 12040 calling self.run() [2023-12-12 16:08:21,072: INFO/SpawnPoolWorker-2] child process 18936 calling self.run() [2023-12-12 16:08:21,089: INFO/SpawnPoolWorker-1] child process 15068 calling self.run() [2023-12-12 16:08:21,108: INFO/SpawnPoolWorker-8] child process 6080 calling self.run() [2023-12-12 16:08:41,417: DEBUG/MainProcess] recreated blocker with handle 20 [2023-12-12 16:08:41,418: DEBUG/MainProcess] recreated blocker with handle 24 [2023-12-12 16:08:41,418: DEBUG/MainProcess] recreated blocker with handle 24 [2023-12-12 16:08:44,353: INFO/SpawnPoolWorker-10] child process 20588 calling self.run() [2023-12-12 16:08:44,353: INFO/SpawnPoolWorker-9] child process 19520 calling self.run()
Dutchq
Please I am trying to load data from a cvs file to my data Base but now the app name used in the cvs file is not same as mine so it keeps giving me errors how do I solve that please
Ahmad
Hi How can i send voip notifcation in djand
Ahmad
Django
Dutchq
More details
I have a csv file and I want to load it into my database, now the command that I am trying to use to load or from the terminal sends and error showing that the application name is not same as mine, so I change the app name to that of the csv file but still send an error
Abhijit
I am not able to proceed.. I have made a project in which I have uploaded an Excel file in an excel file I have various user emails I'd . Based on email I'd , I have made a check box to tick the particular email and SEND a Mail by clicking particular user email in django .. I am sharing the code pls correct me
Abhijit
Ok
Nagu
Hi any ts r ap here
Nagu
I need help about python + django configuration
Nagu
Dm pls
Mirco
Dm pls
No DMs, write here
Siddharth
Ig u need to put SMTP in settings