ZeroCool
In Laravel I liked DOMPDF because you just design an html file and you can render that as a PDF report
.
Hi, what is the best library for make PDF report in django?
I like using PDFMake due to the flexibility of my use case. It’s a server side JS library though, all defined in JS. So far works fine with Django, just a bit extra steps on loading images.
BALU
Can you guys write a code for list of videos with dynamic sliders and upload option. And user will get points while watching videos....?
👑 Dharmzeey
Please, I am using drf simple jwt But I want to make the access token available for every request as long as user logs in And I want a way to make the access token refresh every 5 minutes with the refresh token without the user having to ask the user to log in Please any way to do that or any documentation
👑 Dharmzeey
u have to refresh token in front end
Please do you have any documentation for that or a blog post
👑 Dharmzeey
u have to refresh token in front end
Also, I am building the api for a reactive Native app
Kunal..
I wish to deploy my projects (Previously on Heroku before it ended its free tier) , I tried render but it does not allow more than 1 postgresql server for free at a time. Are there any other option using which I can deploy my personal projects ?
Kunal..
Or can i use a same deployed db for multiple projects
Alexey
Also, I am building the api for a reactive Native app
yes, u have to make with each request check6 that access token is expired, if so then get new access token, and make same request with new access token
Caleb
Please, I am using drf simple jwt But I want to make the access token available for every request as long as user logs in And I want a way to make the access token refresh every 5 minutes with the refresh token without the user having to ask the user to log in Please any way to do that or any documentation
first set your Simple_JWT access_token life time to 5 mins, then in the frontend you can optionally check if the access_token has expired to issue another one with the refresh_token or when an API request fails u can check to see if the token has expired then issue another one using the refresh token then make the previous request again
Bujji
Hi I have created a rest API to generate a report in pdf format with the request details. . .as a response it will send some key and values along with the file path So now when I click the link it either can be downloaded or it can be viewed through browser In local it is downloading when I give the path in browser. . . So how can I achieve this in server can anyone help me with this issue???
Shikha
Hi I am starting with django but i don't know from where to start and which resources to follow
Shikha
Please help
Ewuru
I need help I try to import config from decouple, after installing python-decouple. What am seeing is importError : cannot import name config from decouple
Nαψαภ
Hi I am starting with django but i don't know from where to start and which resources to follow
You can follow codemy (https://www.youtube.com/@Codemycom) to get basic understanding about django.
Saeid
hi i have created custom user model that normal user register and login only with phone number while superuser register and login with username and password. but in admin panel when i want to add normal user, it gives me an error that password is required. how can i do this? should we use two auth system for normal user and superuser?
Saeid
look at set_unusable_password()
thnx, i set that but it doesnt work
amir
hello can some one explain how to have 2 path for template
.
hello guys Im new to python... this is my first time trying to run a web application with flask. I've almost built all its source, I just stocked on creating database part, with SQLALCHEMY
.
this is the Django group, not a Flask group
oh , sorry for that I thought I can also ask about flask , thanks for your mention
Doragonsureiyā
hello guys Im new to python... this is my first time trying to run a web application with flask. I've almost built all its source, I just stocked on creating database part, with SQLALCHEMY
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
Shomesh
N ok qp
Maxim
N ok qp
what?
Prabhu
Please suggest cheapest website to buy domain & host python django project or free vps hosting
Doragonsureiyā
Please suggest cheapest website to buy domain & host python django project or free vps hosting
Adding the word Django to your Off-Topic question doesn't magically turn it to a Django related question, so move to @PythonOfftopic group and ask there.
Igor
Hi, guys. I need your advice. I've got a flat table in my DB which is actually a materialized view. Let's say I want to update a model which feeds that materialized view. What is the best approach to trigger refresh of the view? For example I've updated some models and I want to have refreshed information from the materialized view at once.
Pasha
Hey there! Can someone help? I have in help_models.py from django.db import models from .models import Recipe class RecipeBaseModel(models.Model): recipe = models.ForeignKey( Recipe, verbose_name='рецепт', on_delete=models.CASCADE, ) class Meta: abstract = True want to use it in models.py class AmountOfIngredient(RecipeBaseModel): but then try makemigrations have got err: ImportError: cannot import name 'Recipe' from 'recipes.models' (/Users/pavelserdiukov/Documents/Dev/foodgram-project-react/backend/recipes/models.py) how can I fix it?
Lav
Hey, Can someone help me in Django. Its easy and simple problem. Just need minor help
Doragonsureiyā
Lav
I have one text field and submit button. After submitting, I want thank you message in my webpage. But currently, all the data is appearing on same screen including Thank you. *I need help in applying if condition for message*
Lav
As a learner. Can someone help me in debugging the above code. Unable to implement the above solutions
Lav
Their is 1 submit button on screen. When user click on same. Thank you message will show. Currently, thank you message is showing without clicking submit button
Doragonsureiyā
Their is 1 submit button on screen. When user click on same. Thank you message will show. Currently, thank you message is showing without clicking submit button
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
Ewuru
https://nekobin.com/zaqopuluju
Lav
We need the code
How Can I send?
Charly
How Can I send?
https://t.me/django/240447
Ewuru
https://nekobin.com/zaqopuluju
Having problem with the code: importerError: cannot import name config from decouple
Lav
HTML https://linkode.org/#ITXoAxlSlsBUkXSsAPhJz4 views.py https://linkode.org/#mq0AaPPRezbwpFtbMD2Qg6
Ewuru
pip install python-decouple
I have install python-decouple
Charly
HTML https://linkode.org/#ITXoAxlSlsBUkXSsAPhJz4 views.py https://linkode.org/#mq0AaPPRezbwpFtbMD2Qg6
You don't have any conditional on the template nor the view to do what you want
pixelead0
I have installed python-decouple
https://stackoverflow.com/questions/62580240/django-cannot-import-name-config-from-decouple
Carlos
Good everning, some one can help with validation inside the serializer?
ZeroCool
Hi, any course or tutorial that you recommend on Middleware?, I am using a custom user model
Charly
Hi, any course or tutorial that you recommend on Middleware?, I am using a custom user model
A full course about an specific functionality of a library? I don't think it exists Better to start with the documetnation: https://docs.djangoproject.com/en/4.1/topics/http/middleware/
Doragonsureiyā
Good everning, some one can help with validation inside the serializer?
No one can help you until you explain your difficulties.
Iron Man
Hey guys I'm new to Django I'm trying to retrieve the data from SQL database but I can't
Iron Man
I created a model and inserted in views.py and trying retrieve but I can't please help me
Iron Man
What have you tried? Any errors?
No errors but it is not showing the data on HTML page
Carlos
No one can help you until you explain your difficulties.
Sorry, i just fix, i try to validate a fild if exist's inside a attrs def validate(self, attrs): print(attrs) if attrs["cnpj"] not in attrs: raise serializers.ValidationError( {"message": {"non_field_errors": ["CNPJ é obrigatório"]}} ) validate_paysource = ( PayingSource.objects.filter(cnpj=attrs["cnpj"]) .values() .first()["insurance_company_id"] ) validate_insurance_company = ( BankStatementAggregated.objects.filter(insurance_company=validate_paysource) .values() .first()["insurance_company_id"] )
Iron Man
here Im sharing my linkode link https://linkode.org/#FlPq2IyqxnxSY1FI3cW2L5 please help me about the issue
Iron Man
bankdet
Charly
bankdet
cf1 cf2 and cf3 don't exist on that view
Iron Man
cf1 cf2 and cf3 directly written in dictionary that's a different view
Iron Man
The model bankdetails is connected with only bankdet view