cj
R wanted to post this long code: https://hastebin.com/iqimenajaf
R
Can someone describe to mme what someone is trying to do what what I should do to protect the site?
R
I’m trying to determine if a) there is soething I shoudl be worried about with regard to what django is telling me is ahppening. b) if there is something in django to deal with this or if I should be looking elsewhere. Which is the same question I had in #1
cj
I’m trying to determine if a) there is soething I shoudl be worried about with regard to what django is telling me is ahppening. b) if there is something in django to deal with this or if I should be looking elsewhere. Which is the same question I had in #1
someone is sniffing your site to find a hole, just don't worry, Django won't break, you'd better configure a firewall to filter requests from certain sites/IPs or to certain URLs (like those ending in .php) so your Django app won't get them
R
thank you
cj
thank you
see? it wasn't hard to ask in the right way 🙂
坂田銀時
https://stackoverflow.com/questions/58629790/how-can-to-run-task-in-5-minutes-after-finish-previous-task-using-celery-beat/
Just call the second task, from within first task Task.apply_async(... countdown=300)
坂田銀時
Scheduler is for cron-like periodic tasks.
Muhammed Enes
How can i do ajax with django
坂田銀時
Lol, first look up what Ajax stands for.
Muhammed Enes
I know
cj
I know
that's good, now in the Django side, read about DjangoRestFramework
坂田銀時
You need to send csrf token from cookies in X-CSRF_TOKEN (or something) header in request.
坂田銀時
And don't just randomly pm
坂田銀時
And use better editor. And is that pycharm default theme? Sucks.
Mykel
Please how to make Django serve my site with the styling. Am new to Django and couldn’t load the style just plain html loaded
cj
https://docs.djangoproject.com/en/2.2/howto/static-files/deployment/#serving-static-files-from-a-dedicated-server
Mykel
But can I serve it from my machine in development?
Денис
But can I serve it from my machine in development?
This question is raised by at least every second beginner. Please read this: https://docs.djangoproject.com/en/2.2/howto/static-files/ I bet it will match all of your questions. Yes, this is RTFM. But you deserve that.
Reginald
Hello guys am trying to run the server after setting my view and URLs but it Is saying You must set settings.Allowed_Hosts if DEBUG is False
Reginald
Also, please also when you set DEBUG =False what next
Reginald
I have still getting the same thing
Fuad
I have still getting the same thing
Change this in your settings.py Allowed_Hosts = ['*']
Денис
Also, please also when you set DEBUG =False what next
DEBUG = False is needed in production. You sound like you're still in development. Why?
Reginald
Am new to django
Reginald
Also it tells me to make my DEBUG False
Muflone
If you don't know settings.py you're not yet ready to put in production anything
Muflone
Read the tutorial, really, not for joke
Surya
Hii guys
John
Hi
John
Where are you from?
Surya
India
Surya
Sorry for late reply
Surya
Can you help me with this
John
It's okay
Surya
I am using indicoio model for test classification
Surya
While running in VS terminal I am able to import that easly
Surya
But while importing it in veiws.py it's showing error ( unable to import )
Surya
Can anyone tell what to do
Surya
?
Reginald
Solved
Surya
No
Surya
Actually I am not able to understand stackoverflow solutions
Surya
And don't have time to go in detail
Surya
So any direct solutions ?
Surya
It's very urgent
Денис
you are unable to import if: - you are trying to import from a wrong place - you are trying to import while venv (where module is installed) isn't activated.
Денис
So any direct solutions ?
what's you case out of these two? 👆
Prabakaran
check python version and path
Surya
what's you case out of these two? 👆
I installed the model using pip install inside the virtual environment I am working in
Surya
And virtual environment is activated
Surya
check python version and path
In stackoverflow it's showing to make PyLint file path and version is correct
Prabakaran
Execute "which python" if it is Linux in both vscode terminal and app terminal and check if both are same
Prabakaran
also you can use pip freeze to check whether your package is installed or not. Pip freeze | grep indicoio
Surya
Okay I am trying
Prabakaran
sudo pip install will do the installation on default python and not on your virtual environment though it is activated. Just a note
Surya
Okay I am trying
Error resolved all thanks to Prabakaran Sir
Anonymous
@c0x6A it worked and also the book is awesome. thanks 💪
Batman
has anyone worked with Full Text Search using contrib.postgres in django? I was wondering if there was a way to ignore html tags while searching?
Anonymous
How to convert json output to csv and store it in a csv file
Anonymous
Is there any lnbuilt library
Anonymous
Why do you want to do that?
For checking malicious ips using virus total api
Anonymous
Returned response in json
Anonymous
Returned response in json
I want store all the values in key and value in csv format
Денис
I want store all the values in key and value in csv format
You could google it with a speed of light https://www.techwalla.com/articles/how-to-convert-json-to-csv-in-python
Anonymous
Okay thanks
Anonymous
How to write django unit test for a post api, api is for uploading a file..
Anonymous
Trying to figure out.
Anks
you can also use python contrib modual for authentication system no need to write function any type.
Adarsh
I want to create a model Which contains a number n And then it contains n strings How should I do it?