Eugene
Hey,guys. Is there anyone who had the same bug with gunicorn ? import fcntl ModuleNotFoundError: No module named 'fcntl'
James
Hellow how should i render pdf file in data table. I tried to use href tag but it fails
Danilo
Hello it is possible store blob in django models? I need to save a csv to get in another time by another endpoint
Danilo
Yes
Do have an example?
neotod
Hello it is possible store blob in django models? I need to save a csv to get in another time by another endpoint
Hi, a better way is to store file's path in the db and store the file itself on the disk because of the overhead of querying blob from the db. Although if you really want to store that in the db, you can use BinaryField.
Anonymous
please help: Reverse for 'post-detail' with no arguments not found. 1 pattern(s) tried: ['post/(?P<pk>[0-9]+)/$'], i searched but those answers are not relevant
Doragonsureiyā
please help: Reverse for 'post-detail' with no arguments not found. 1 pattern(s) tried: ['post/(?P<pk>[0-9]+)/$'], i searched but those answers are not relevant
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain: - what you're doing - what you're expecting - what you're using - where you're running the script - what Python version you're using - what packages and their versions you're using - and the most important thing: show the code YOU wrote (read rule 5️⃣ for that) and more details, that way your chances to get help will increase
Doragonsureiyā
it will be better u allowed me to share image
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://del.dog, https://nekobin.com
ꪉꫝꪖꪹᦋꪖꪜ
Yes
How?
Anonymous
https://replit.com/talk/ask/Reverse-for-post-detail-with-no-arguments-not-found-1-patterns-tried-postPlesspkgreater0-9dollar/145762
Anonymous
code and detail about error in the link
cj
code and detail about error in the link
your problem is not in the view, but in the template ¯\_(ツ)_/¯ you're trying to render the URL for the post detail without giving it the post id to full-fill the URL to it
cj
it's clearly stated in the traceback page: Error during template rendering nothing to do with the view ¯\_(ツ)_/¯
cj
In template /home/runner/chau/blog/templates/blog/base.html, error at line 11
cj
In template /home/runner/chau/blog/templates/blog/base.html, error at line 11
considering the extends and things, so actually that's line 9 in your blog/home.html HTML file
cj
¯\_(ツ)_/¯ I wonder why people never read tracebacks fully...
Anonymous
cj
but that's bootstrap link, i don't get
line 9 in your blog/home.html HTML file
Anonymous
flask tell problems clearly, and django is always drunk, never clearly state the problem
cj
it should tells you where exactly the problem is... something is weird in that repl.it thing
cj
Then you are kidie in debuggung django 😁
cool, thanks for pointing that, Mr. expert
Sanjarbek
#help when i write code docker-compose up https://dpaste.org/aCaA
Doragonsureiyā
#help when i write code docker-compose up https://dpaste.org/aCaA
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain: - what you're doing - what you're expecting - what you're using - where you're running the script - what Python version you're using - what packages and their versions you're using - and the most important thing: show the code YOU wrote (read rule 5️⃣ for that) and more details, that way your chances to get help will increase
Nikhil
HI, How can we save the emoji to the mysql db using django rest framework, also without encoding.
Nikhil
use UTF-8
without encoding?
cj
without encoding?
if you use UTF-8 you don't need to explicitly encode/decode strings
cj
are you using Python 3?
Nikhil
in model file which field type to be mentioned/
cj
yes
UTF-8 is used by default... check your DB and set it to use UTF-8 too
Nikhil
collation in my db is utf8mb4_bin
cj
so, it should work then
Nikhil
could you please tell me how to use utf-8 ?
Manglam
how to deploy our project in browser?
Manglam
pls suggest me
Doragonsureiyā
how to deploy our project in browser?
Step 1: Open a browser Step 2: Write down https://google.com or https://duck.com and press Enter Step 3: In the search box, write down the same words you asked here Step 4: Read the first results
tushar
hlo what a function for Email can be verified using email or other means and if verfired rederiect to resgistraion page.
Vinay
I have a models with country field now I have to add centralized place to filter all query set based on login user (login user also have country field) without adding country filter to all the queries filter. I found the way to have custom manager where I can add filter in get_queryset method but I am not able to fetch login user country, something like request.user.country since request object is not available in models.py file Any solutions or alternative?
Nature_lover
Hlo ....need a hlp After accept or deny mails the data will go to database Any one have idea on this task in django
Pulkit
how can we add arithmetic math captcha to model form.
Nature_lover
explain better
There is a form if we add a new record or if we update existing record then it sends a mail to the some experson if he approves then it will go to database and he can able to deny also
Mirco
There is a form if we add a new record or if we update existing record then it sends a mail to the some experson if he approves then it will go to database and he can able to deny also
you have to put a link inside the email that points to one of your view when the user can approve / deny the update / creation of the record based on that input you can save to the db
Pulkit
how can we add arithmetic math captcha to model form.
from simplemathcaptcha.fields import MathCaptchaField # user registration form class RegistrationForm(UserCreationForm): captcha = MathCaptchaField() I am using this but getting and error
Pulkit
from django.utils import six ImportError: cannot import name 'six' from 'django.utils'
Pulkit
six is deprecated since Django 3
can you suggest me solution?
Mirco
can you suggest me solution?
upgrade Django Check your simplematchcaptcha supports Django 3
Pulkit
ok let me try something
Mirco
Can u suggest me a solution If it possible for you
I've just suggested u one solution
Mirco
now it's up to u to understand and code
Nature_lover
Kk bro
Pulkit
upgrade Django Check your simplematchcaptcha supports Django 3
i didn't find any solution Tried another package but that too had some problem
Pulkit
can you tell me the way How can we create our own custom captcha validation
Mirco
can you tell me the way How can we create our own custom captcha validation
https://www.ordinarycoders.com/blog/article/recaptcha-django
Pulkit
https://www.ordinarycoders.com/blog/article/recaptcha-django
I have to implement arithmetic math captcha only. Like 2+3=?
Pulkit
or Can anyone tell me how csrf tokens work. where they are stored?
Amirhossein
or Can anyone tell me how csrf tokens work. where they are stored?
For stateless use you can read about double submit cookie
Pulkit
They are not used for captcha
ya i know they are not But it may be helpful for making a captcha by myself. I know they are generated in middleware and may be they are stored in cookie. I am not sure about that
Pulkit
Where is your difficult ? It's not so hard to generate 2 random numbers to sum
ya i tried to make it in views and store them as global variable But if two user try to register at same time then the value of global variable will be changed
~~~
How to create a telegram bot using django channels, any idea ?
Alex
How to create a telegram bot using django channels, any idea ?
how channels even related? There is no websockets functionality in telegram api https://core.telegram.org/bots/api > Ctrl+F websocket > Phrase not found
Pulkit