Zey
code??
https://dpaste.org/FVpx
Sumit
https://dpaste.org/FVpx
This won't work
Zey
This won't work
link is not working?
Alexandro
verify the url is an absolute path
Sumit
link is not working?
link is working
Alexandro
its working for me
Sumit
The way you are passing the image won't work
Sumit
You have just used img script
Sumit
Like you do normally
Zey
so how to do it?
Alexandro
send an example of the email to this direction
Alexandro
fibalar916@vreagles.com
Alexandro
to check whats happening
Sumit
so how to do it?
https://stackoverflow.com/questions/3787755/django-how-to-send-html-emails-with-embedded-images
Sumit
Read all three answers
Sumit
The answer which has 6 votes will help yyou how to put image reference in img tag
Alexandro
use sendgrid😂
Zey
ok I will try all
Zey
Thanks
Sumit
Hi, I want to know how to pass csrf_token to my mobile_app, I am using graphql as an api and it is not working without csrf_exempt, using csrf exempt is an security flaws, and I don't want this, I know I can retrieve it with django.middleware.csrf.get_token(), but I don''t know how to pass this to my mobile app.
jay
Just have a doubt, In my (local) django project i use subprocess to run commands Can i use them as it is when i host on Heroku
Acs solutions
From form action I want to pass variable to view how to do
Acs solutions
<form action={%url 'add' parameter=123} method=post"> def add(request,parameter): ------- path(add/<int:parameter>,views.add,name="add") Not working please anyone help
Anonymous
Im testing that a token is created for the user, but password is not getting hashed when user is created so it fails when i try to retrieve the token for it... here is my create_user() : def create_user(self, email, password=None, **extra_fields): """ Creates and saves a new user """ if not email: raise ValueError("Users must have an email address.") user = self.model( email=self.normalize_email(email), **extra_fields ) # Set password this way makes a hashed password user.set_password(password) user.save(using=self._db) return user and here is my test: def test_create_token_for_user(self): """ Test that a token is created for the user """ payload = { "email": "test@test.com", "password": "testpass" } user = get_user_model().objects.create(**payload) user.save() res = self.client.post(TOKEN_URL, payload) self.assertTrue(user.check_password(payload["password"])) self.assertIn("token", res.data) self.assertEqual(res.status_code, status.HTTP_200_OK)
Musa
Hi all I'm working on a django web app and I would like to ask a user to select their currency location from a map when submitting a form. Any idea how to implement that?? Thanks in advance
Musa
have a look at geo-django
I have but it doesn't seem to do what I want
Favas
Which one is better for django deployment I have a django app which will have to handle many user in same time Digital ocean Google cloud Aws ?????????
Favas
Thinking about digital ocean
Mirco
Thinking about digital ocean
it depends on your skills and money
Prabhakaran
cost wise which one u think its cheap ?
Ngeene
Me too have same requirement
Also facing the issue
AK
cost wise which one u think its cheap ?
Ya same question , which one is cheap and efficient
Prabhakaran
Also facing the issue
import requests res = requests.get('http://ipinfo.io/') resData = res.json() loc = resData['loc'].split(',') print(loc[0]) print(loc[1])
Prabhakaran
this is my workaround as of now
Anonymous
how can i create a product more than one time in one click plz smo knows
Anonymous
tell me
Anoop Pratap
Any resources for learning django?
Doragonsureiyā
Any resources for learning django?
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Bajaj
Any One have Django material pls send
Crabby
https://stackoverflow.com/questions/67105930/i-am-making-a-test-module-in-django-and-it-is-giving-giving-me-different-value-a Hey can anyone help me with this i think the problem lies with the form submission.
__init__
Hello guys sorry to ask??
Doragonsureiyā
Hello guys sorry to ask??
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z" Just ask about your problem directly! With ~90,000 people here, the probability that someone will help is pretty high. How to ask smart questions: http://catb.org/~esr/faqs/smart-questions.html
__init__
how can i do something like this in python??? if (!$cert_store = file_get_contents("/web/sign/clientprivatekey.pfx")) { echo "Error: Unable to read the cert file\n".\Yii::getAlias('@webroot'); exit; } $content = " <root> <name>Robbin</name> </root> " //create signature openssl_sign($content, $signature, $cert_info['pkey'], "sha1WithRSAEncryption"); $signature = base64_encode($signature); //output crypted data base64 encoded
Fred
Best resource to learn Django for e-commerce
Favas
How do I implement date based search 🤔 in my django app
Doragonsureiyā
How do I implement date based search 🤔 in my django app
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
Shahd
How to store table to database in django?
Ghorz
How to store table to database in django?
Your table is Class Model in models.py and stored as appname_modelname
Ghorz
You can login to Mysql or explore the sqlite file
Shahd
I mean a table in html page how can i store it at databse
Shahd
Pass the values of every row of it
^o^
Hi...is it ok to use same database schema for two Django projects? Django's default tables creating on migration will work or not?
Владислав
Guys, how to calculate in a template or make a method for calculating the total number of "loads" for an article? class Attachment(models.Model): post = models.ForeignKey('Post', on_delete=models.CASCADE, related_name='attachment', verbose_name='Пост') loads = models.PositiveIntegerField(verbose_name='Скачивания', default=0) def __str__(self): return self.post.title
Владислав
Mirco
Yes. Tnx. I hope I'll figure it out
Something like Post.objects.aggregate(Sum('attachment__loads')
Владислав
Many thanks!
Doragonsureiyā
Many thanks!
You're welcome! 😊
Mirco
Can we use Count In the same way?
It depends on the use case You can just call count()
Mirco
Doragonsureiyā
Thanks
You're welcome! 😊
Anonymous
why does L12 raise no instance object from vuln when it is? https://dpaste.org/GXts#L12,24
Sai
How I SetUp DRF and channels together
Sai
Anyone had done before or any tutorials to setup and access both at same time
Anonymous
I got "Cvss2.vulnerability" must be a "Vulnerability" instance.
Sai
vulnerability_index = Vulnerability.objects.filter(cveid=vuln_info["cveid"]).first() Tryt thos