inchidi
Bhupesh
https://stackoverflow.com/questions/58762420/problem-with-registering-2-profile-models-in-django-admin
Bhupesh
Muflone
Anonymous
How can i use csrf_token in the following code, it's give an error "CSRF token missing or incorrect"
Anonymous
<script>
var CSRF_TOKEN = '{{ csrf_token }}';
function getQuestion(str)
{
if(str!="select subject")
{
var req=new XMLHttpRequest();
req.open("post","/addQuestion/",true);
str=encodeURIComponent(str);
req.setRequestHeader("Content-type","application/x-www-form-urlencoded");
req.send("subject="+str);
req.onreadystatechange=function()
{
if(req.status==200 && req.readyState==4)
{
document.getElementById("formdiv").innerHTML=req.responseText;
document.getElementById("formdiv").style.overflowY="scroll";
}
}
}
}
</script>
monaou🦍
Is not {% csrf_token %}?
Jonnison
Hello guys, I'm using the django-oauth-toolkit to build an authentication server and this server works fine, including two Resources Servers implementated with rest_framework using the oauth server to authentication. But I need to build a Single Sing On to lagacy application, this application was implemented with django, but authentication is implemented with django.contrib.auth based on Sessions, wich one would be the better way to integrate the lagacy application with the OAuth Server in a model on the SSO works? Can anyone help me?
am π
Could i crawl youtube with scrappy ?
Anyone out there who has been a scrapper ?
Anonymous
you can scrape youtube with requests
Anonymous
like a real man
Anonymous
Hello can any one help me my first django project.
Felex
Dilli
Hai, can I able to call def in one app views.py to another app views.py pls tell how to do ??
Shikhar
Is there anyone who has used hackerearth API in django
Anonymous
Anonymous
Hi, Any programmer with good knowledge in DJango and Python, interested to develop e-commerce platform.
Anonymous
Write to me kmg.dxb@gmail.com
Batman
so is there a way to have an ISBN data type with django Postgres?
Ghorz
Anonymous
Денис
or you are just drawing attention but simply ask for nothing.
Abdu
Can anyone help with this question https://stackoverflow.com/questions/58777098/how-can-i-download-a-word-document-created-by-a-django-app-on-the-same-app
Anonymous
I am doing a blog project and I have error
def get_absolute_url(self):
return reverse('blog/post-detail' ,kwargs={'pk':self.pk})
Anonymous
In models.py
Anonymous
This code for show my post-details
Anonymous
Please help me for this project
Anonymous
And I want to deploy this application to the server
Anonymous
If you have any suggestions please give me
Dilli
Денис
Pls anyone help
Seems to be a bad practice.
If you want to share a method between them, create something like utils.py and import its functions wherever you need them
Dilli
Owolabi
Hello co. developers, pls i need recommendations on how to add Payment gateway with stack in Django project
Owolabi
With Paystack
Owolabi
Thanx in advance
Jigani
* reverse ("blog: post-detail", kwargs = {"pk":self.pk})
Anonymous
How to send a parameter with the ForeignKey? In Models
Anonymous
class Image(models.Model):
image = models.ImageField(upload_to=image_upload)
class Blog(models.Model):
Image = models.ForeignKey(Image)
Mirco
Anonymous
What kind of parameter ?
For example, I would like to send the path of uploading the image along with the call
Anonymous
image_upload
Mirco
Not strange way like you're thinking about
Anonymous
In the blog class
I want to call the Foreign Key and the class name
Also send the upload address
Anonymous
Not strange way like you're thinking about
class Image(models.Model):
def init(self, **kwargs):
super().init(**kwargs)
self.imgPath = kwargs['Path']
Image = models.ImageField(Image, upload_to='imgs/{}/'.format(self.imgPath))
Anonymous
Will it work this way?
Rσуαℓ geeк
Hey guys
How do I install an app from a local folder when within a virtual environment using pip cause I'm using a proxy
Rσуαℓ geeк
*The proxy network is blocking the installation
Rσуαℓ geeк
.a reusable app for example django-material
Happy
what's os do you use?
Mirco
Mirco
How can I do this?
You can get the image instance via the blog model and fk
Than you have the access to Image fields and of course the path
Lord Voldemort
Gyus anyone knows how to install Jinja on visual studio?
Rσуαℓ geeк
Shubham
I m refering a project
Shubham
https://github.com/vitorfs/bloodhound/
Shubham
in which how to set up DATABASE_URL
Shubham
https://github.com/vitorfs/bloodhound/blob/master/bloodhound/settings.py
Muflone
there's a .env.example
Shubham
yes
Shubham
so how to utilize this
Muflone
source it or use pipenv
Shubham
okay
monaou🦍
I have a django.db.utils.OperationalError error. Maybe someone can help?
monaou🦍
I use postgreSQL for django on Windows
Muflone
just read the error message
monaou🦍
He is not. This error appears, but in what exactly the error is not written.
Muflone
are you sure?
Muflone
paste the full tracelog in a pastebin service
monaou🦍
ok
Muflone
I see... do you have postgres running on localhost:5432 ?
monaou🦍
yes
Muflone
then try to connect using psql command line