Andrew
Hi guys a general question, for image uploads, what is the purpose of using a service like AWS S3 or Cloudinary? Why not just store everything along with the deployment stuff on the digital ocean/linode droplet?
Are there any advantages of using S3 or Cloudinary?
Because I see the droplets aren’t too expensive, but Cloudinary and S3 charge quite abit for storage costs.
Is there any advantage? Thank you!
Ashish
1. S3 is much cheaper than a droplet. $0.023 per GB. You could probably use the free tier too.
2. You want your droplet to not be file heavy with static files and slow down.
3. Static files need to be publicly accessible. So, from a security perspective too, it's better to have static files elsewhere, ideally on a storage volume like S3.
It will depend on how many static files your application is going to generate.
Andrew
Thank you Ashish, understood on point 1 and 3. 🙏
However for point 2, does having many user media files slow down the app? I wonder if there is a way to index them.. 🤔
Andrew
I do believe this was the much older way to do it.. before S3 and GCP came into the picture.. many of the websites worked well even then… I have been thinking for the longest time what’s the real benefit S3/GCP blob storage brings. Unless maybe serverless or without any server disk space..
Illiyas
Google Analytics API returning only 10 rows
Ashish
Ashish
If you are serving a lot of static files from the same server and the server is also handling django processes at the same time, it can cause extra load and slow down the server response
Andrew
Владислав
Hello Everyone, me need Help, make Monitoring for Asic Miners on Django (this web-app), and ran into trouble. Need make Chart in my Dashboard (Time Series).
NightE
In the control page I want to show customers' orders and their address details
here is the view
def customers_orders(request):
order= Order.objects.all()
checkout_detail= CheckoutDetails.objects.all()
return render(request, 'core/customers_orders.html',
{
'order':order,
'checkout_detail':checkout_detail,
})
the problem is I can't access the checkout details for a user based on their id
I did this in the html page
{% for detail in checkout_detail %}
<p>{{detail.phone}}</p>
<p>{{detail.city}}</p>
<p>{{detail.country}}</p>
<p>{{detail.address}}</p>
<p>{{detail.specific_address}}</p>
{%endfor%}
but this repeats same info many times
I want to display the address of the user only in its section
NightE
and here is the model
class CheckoutDetails(models.Model):
user= models.ForeignKey(User,on_delete=models.CASCADE, null=True)
phone= models.CharField(max_length= 12)
country= models.CharField(max_length=30)
city= models.CharField(max_length=30)
address= models.CharField(max_length=200)
specific_address= models.CharField(max_length=200)
def __str__(self):
return self.user.username
Rohit
Rohit
try passing the data in body as json format
Luis
On settings, allowed hosts if I'm serving from a local network computer, should I put my public ip address?
Bhaghi
TypeError: Field.init() got an unexpected keyword argument 'attrs'
Kian
hi Guys
in my django project, my HTML file avatar converted to to django avatar
and my html snippet dosn't work !
do U know what is my problem and what should i do ?
S
S
runsever 0.0.0.0:8000
Luis
S
Okey...was telling about development mode.
Nαψαภ
Hi All,
I am trying to create a chat room(named TEAM) having 4 members and when I broadcast a message it should be received by all the 4, using django channels
My question here is if any 1 of 4 is not connected through websocket (not active on that TEAM group) and someone sent a message which is supposed to receive by all in TEAM group , how the left one get that message as soon as he connects the TEAM group.
Thealy
Hello everyone, I am trying to conduct a function in the django that we can add point in the leaflet map and it shows the pop-up as administrative locations of commune, district, and province. However, I am struggle on how to show the outputs result into the map. Please assist me on this. Thank You!
Uday
Daniel
Thealy
Thealy
Use Google maps
Thank you but they don’t require paid service as Google api
—-
Good day everyone . I’m having issues generating token.I’m using obtain_auth_token but when I use postman to test, it keeps saying username and pass required. Even though I’m entering the correct details
Elhem
hello i need help how can i create a permission role in rest framework django ? I create 3 role admin(add,view,put,delete)
customer(view)
employe(put,view)
Aref
.
Anonymous
How do I convert a django project to an exe
Of course
Hi, İ download a template and i created a view and form class for that but when İ try to send message İ give a error in template.👇👇👇
Sorry undefined, it seems that our mail server not responding. Please try again later.
Doragonsureiyā
S
Hello, does anyone here know how to insert html and css with the Django template?
ShuvamTheBeast
Can anybody tell me what would
Restricted outbound internet access would mean?
I created a small project for my university syllabus, and i want to host it somewhere so i thought of pythonanywhere they say for free accounts there is restricted outbound internet access, but idk what that means
S
Zunair
Hi everyone!
I will create a dashboard in which I want to add payment methods but I stuck there because I don't working on payment API'S before anyone can give me any reference?
Prog Hisham
Hey guys,
What is the best tutorial or website to fully understand the secret and public key and RSA Encryption and decryption in Django
Because I have a use case where I want to create a secret and public key to encrypt the user data and then decrypt it by a specific user when the main user grant it
But I don't know how to do that even though I searched a lot in this topic, but I didn't find good resources
Suren
Hi guys, please help me to figure out how to display images which are related only to specific tour page.
### Models
class Picture(models.Model):
tour = models.ForeignKey(Tours, on_delete=models.CASCADE, related_name='pictures')
picture = models.ImageField(upload_to="pictures/%Y/%m/%d/")
### Views
tours = Tours.objects.all()
for tour in tours:
pictures = Picture.objects.filter(tour=tour.pk)
context['pictures'] = pictures
### HTML
{% for p in pictures %}
<div class="gallery-syncing-item__nav__item">
<img src="{{ p.picture.url }}" alt="gall-syn1">
</div>
{% endfor %}
I have three tours published and everywhere I have different picture, but on each tour page it shows me the same last 6 pictures
Rupesh
How to join two (table)models in django?
ShuvamTheBeast
Rupesh
Rupesh
Charly
Please share example
You sould go to the official tutorial before trying to do apps like that, everything is on the documentation
Rupesh
Charly
https://docs.djangoproject.com/en/4.0/topics/db/examples/
Jay
Can anyone help me with overriding allauth signupview.I want to add group to the user
Vikas
Django.core.exceptions. import configured the secretkey settings must not be empty???
Vikas
Please help
Vikas
Already generate key and paste it but not resolve ???
Vikas
django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
Jay
def get(self,request):
group = Group.objects.get(name="Customer")
usr = request.user
print(usr.groups)
if usr.groups is None:
usr.groups.add(group)
usr.save()
return render(request,self.template_name)
Jay
program is not going in if condition
Hell
hello guys, there is a function that takes all the lines that are described in the form.py and checks if there have been changes in them, after which it displays the old and new value. but the problem is that I don't need to take all the lines, because if I send only 3 lines and there are 15 of them in the form, then I get a keyerror.
please tell me how to correctly transfer exactly those lines that the user edited, that is, which he sent (post)
the call in this line happens:
diff = diff_with_form(form, Contract.objects.get(pk=contract_id))
check function: diff_with_form
code - https://linkode.org/#wUJbdJWa9XVIqvkYtkCUh5
Nivas
How to convert django project to exe file
Mirco
@
Hi y'all
I just finished my first Django Application..
Kindly check out🤲
http://chatllify.herokuapp.com
https://github.com/shurlz/chatllify
Ogunbo
Please how do I enable https in the development server?
Ivan
Does anyone know how to add a class to CKEditorUploadingWidget?
The Inspired
The Inspired
The Inspired
The Inspired
The Inspired
The Inspired
@