Mihail
what is "element" here? field?
element of feedback_set or it's field. No matter
Mihail
what is "element" here? field?
the main is that you must get sum of values of this fields in the next step
Bhupesh
https://stackoverflow.com/questions/58762420/problem-with-registering-2-profile-models-in-django-admin
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.
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
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?
Денис
so is there a way to have an ISBN data type with django Postgres?
no, you have to implement custom field by yourself. Generally this should be a CharField with additional validators.
Anonymous
Sure
Please help me
Денис
Please help me
Don't make us ask questions. Ask yourself.
Денис
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
Денис
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
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
I am doing a blog project and I have error def get_absolute_url(self): return reverse('blog/post-detail' ,kwargs={'pk':self.pk})
You're reversing a url. It ought to be reverse('blog:'post-detail', kwargs={'pk':self.pk}) where blog is the app name and post-detail is the path name...you can check documentation for more info.
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)
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
For example, I would like to send the path of uploading the image along with the call
You can access the path of an Image instance by using FK lookup fields for example or just accessing the field once you got the instance
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?
Happy
.a reusable app for example django-material
on Linux os, You can use: export http_proxy='' && pip install django-material.
Anonymous
Not needed
How can I do this?
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к
what's os do you use?
I'm using Windows..
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