Doragonsureiyā
Telling me better to learn. I just started a week for Django
Looks like you need an offtopic group, please continue this conversation at @pythonofftopic as it's not related to Python
Doragonsureiyā
Bro I'm doing interships , contact and all I still don't know css , hardly html
Looks like you need an offtopic group, please continue this conversation at @pythonofftopic as it's not related to Python
Manikanta Nynala
Error
moment_rider
@Vaibhav_135 can you help for same?
Vaibhav
@Vaibhav_135 can you help for same?
You can build some import functionality in admin and process from their .. pretty straight forward tbh
moment_rider
Achcha Thanks!
Arav
While integrating razorpay in my project af even after sucessfull payment compeletion Its is redirected to payment failure page but the payment captured in razorpay dash board.
Moe (محمد)
Hello, I have a M2M relationship with user model and product model, and i have a One2Many relationship between the product model and the category model How can i access the information of the category model from the user model?
Abhishek
Hi, I have users who can be reported and I need to save information of the report. So my user report model looks like this class UserReportLog(models.Model): reported_by = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.SET_NULL, null=True) reported_at = models.DateTimeField(auto_now_add=True) should I add another foreign key to the user who was reported ? which will make it class UserReportLog(models.Model): reported_user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.SET_NULL, null=True) reported_by = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.SET_NULL, null=True) reported_at = models.DateTimeField(auto_now_add=True) Currently there's a many to many field in the user model userReportBy = models.ManyToManyField( UserReportLog, related_name="userReported", blank=True ) I'm not sure which is the best practice
Ranken
Hello everyone my api can register a user but cannot generate token when trying to login.... I used the djangorestframework-jwt package..... It returns a Json response as follows: { "detail" : "No active account found with given credentials" } What can I do???
Ranken
use simple-jwt
That's the alias for the package "djangorestframework-jwt"...... I used it
Literary
Can anyone help me in paypal integration in drf
Ranken
François.𝘀𝗵𝗼𝗽 📦💰
Hello Please can i send img of my problem here ?
Doragonsureiyā
Hello Please can i send img of my problem here ?
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
Martín
hello, I'm having a problem with Django fields, specifically with model fields which are autogenerated ids in the database I'm running tests and it seems like the database is creating the table for a model but when inserting the first row, the object id is null in the model (after doing an inspectdb) I have this line: item_id = models.BigIntegerField(primary_key=True) I also tried with BigAutoField and using auto_created=True I detected that Django in the test database is not executing this ALTER SENTENCE, which is in the legacy database: ALTER TABLE market.item ALTER COLUMN item_id ADD GENERATED BY DEFAULT AS IDENTITY(...) how should I define the field in the model in order to achieve this autogenerated feature when the test database is created????
Igor'
<form action="{% url 'test' date_from='2021-10-21' date_to='2021-10-21' %}" method="get"> {% csrf_token %} {{ 'from' }}{{ form.start_date }}<br> {{ 'to' }}{{ form.end_date }} <button class="btn btn-info btn-sm" type="submit"> Get a statement for the period </button> </form> Goodnight. How do I correctly substitute the values to be sent to the view Django my date?
Igor'
Need input arguments in date_from and date date_to. It needs to be taken from form.start_date and form.end_date. How can I write this correctly?
Anonymous
Hi all, using django rest framework. Once I get a request from user we would like to send 202 and process the request in background. How csn we do this?
इमरान عمران Imran
hi, I'm getting module not found error in "import dj_database_url" while pushing the code on heroku, I've used pip install dj_database_url in my virtualenv, still getting this error
Shilpy
Postgres
from django.contrib.postgres.fields import ArrayField class MyModal (models.Model): array_field=ArrayField(models.IntegerField(null=True,blank=True),null=True,blank=True) Try this
Muhammadamin
so I need integer field in my model and I should change this type to listfield into serializer
Shilpy
so I need integer field in my model and I should change this type to listfield into serializer
If in case this doesn't work, then try adding many=True in Serializer field
इमरान عمران Imran
yes
Shilpy
Created requirements.txt file?
इमरान عمران Imran
yeah
इमरान عمران Imran
import dj_databse_url ... DATABASES = { 'default': dj_databse_url.config() }
इमरान عمران Imran
my settings.py file
Shilpy
django_heroku.settings(locals()) del DATABASES['default']['OPTIONS']['sslmode'] Add this at end of the file
Arezoo
Hi do you have any YouTube link for advance django and drf?
...
Good morning guys, please does anyone have a tutorial on Django Channels, thanks
David
Hi everyone, I have a question for yours. I'm starting an API with Django and DRF, in your experience where is the better way to put the business logic? In an intermediate abstraction (service, selectors, repositories, or something) Or put the business logic in the model managers Greetings from 🇲🇽
Anonymous
how can automatically logout auser after n minutes inactive in django SESSION_COOKIE_AGE — it automatically logout without seeing whether it is inactive or not?????????
Ranken
Please how how can I implement a download endpoint for my api.... I want to be able to download the images and videos sent to the frontend.....
Yogesh
Hey hii everyone so I am working on an application and in that I implemented a feature in which user can signup using Facebook Google and as per all auth library I done the same but still I am not able.to signup using Facebook ,I tried ngrok but it didn't workout for me
Yogesh
If anyone can guide me then it will be a great help for me
Yogesh
Anyone ??
Doragonsureiyā
Anyone ??
Maybe anyone is here, yes, but they are not obliged to read everyone's message here neither to reply to everyone's message, if someone wants to reply to your message, they will do that, just don't try to draw attention to your message writing "anyone?" every 5 minutes, that will lead you to be warned for SPAM/Flood, just be patient or use Google/DuckDuckGo to research about your question instead of wasting time here waiting for people to do your work. Have a nice day 😊
анатолий
Can I get a link to an example of yours?
i don't have anything specific. but you know how to use static in django, right?
анатолий
it's easy. you create static directory in your app, put files there, and create link in your view like localhost/app/static/file.ext
mike
In drf ,which is better to use viewset or generic API view?
mike
Both have their usecase
Can I get any reference for these usecases
анатолий
Can I get any reference for these usecases
i believe you can use something like model view set until you understand they aren't enough for you.
Chandra
How to integrate django rest api with flutter?
Abdulloh
Hello my django project is working with react can I use django admin panel seperately (from frontend which was written in react) and is it safe way?
Piyush
Hello everyone ! I want to know how to return a HTML file in function based view in DRF. Thanks in advance.
Anonymous
You can trigger the processing in a separate thread or someplace else and send response. Depends on processing
Anonymous
You can trigger the processing in a separate thread or someplace else and send response. Depends on processing
Ok but how? Once request comes how to send response and then start processing?
Pythonero
Hi. Somebody been integrated payoneer with django
عبید اللہ
How to fix this error (Contact form error) data not save in my database 👇 "POST /contact HTTP/1.1" 200 4662
Maxim
How to fix this error (Contact form error) data not save in my database 👇 "POST /contact HTTP/1.1" 200 4662
it's not an error status 200 is the best status one can get https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200
Anonymous
Ok but how? Once request comes how to send response and then start processing?
Is it long process,?why do you want to process after sending response
Maxim
data not save in my database
you're going to have to find out why you didn't give us information that could have helped
Anonymous
Is it long process,?why do you want to process after sending response
The incoming request needs to send http calls to external systems. So instead of saying it's a long process, it would be nice to point to some references material or solution
Anonymous
You can use decoupling, like SQS , lambda/api gateway
Anonymous
How will api gateway help in sending 202 accepted? And processing the request in background?
Rohan
Can use celery here