Anonymous
duh..
Bhadrinath
Hi,
I provided following policies to the IAM user
1. AdministratorAccess-AWSElasticBeanstalk
2. AWSCodeDeployRole
3. AWSCodeDeployFullAccess
But still I am facing the following error
ERROR: NotAuthorizedError - Operation Denied. User: arn:aws:iam::XXXXX:user/YYYY is not authorized to perform: elasticbeanstalk:CreateApplication on resource: arn:aws:elasticbeanstalk:us-west-2:ZZZZZ:application/django-tutorial
Can anyone help me with this?
Njain
def increment_invoice_number():
last_invoice = Invoice.objects.all().order_by('id').last()
if not last_invoice:
return 'MAG0001'
invoice_no = last_invoice.invoice_no
invoice_int = int(invoice_no.split('MAG')[-1])
width = 4
new_invoice_int = invoice_int + 1
formatted = (width - len(str(new_invoice_int))) * "0" + str(new_invoice_int)
new_invoice_no = 'MAG' + str(formatted)
return new_invoice_no
class Invoice(models.Model):
invoice_no = models.CharField(max_length = 500, default = increment_invoice_number, null = True, blank = True)
Njain
Mirco
!ot
Doragonsureiyā
Looks like you need an offtopic group, please continue this conversation at @pythonofftopic as it's not related to Python
Piyush
Roshan
Django dont allow loading static files when debug is False
Piyush
Roshan
With debug turned off Django won't handle static files for you any more - your production web server (Apache o
r something) should take care of that
Piyush
Send me the link
Piyush
.
https://stackoverflow.com/questions/67748775/django-ajax-like-button-with-css-classes
.
can someone please take a look at my query
ma
CommandError: You have not set ASGI_APPLICATION, which is needed to run the server.
ma
??
Piyush
Anonymous
I'm trying to deploy Django app in Heroku, but getting below error-
Anonymous
Compiled slug size: 542.5M is too large (max is 500M).
remote: ! See: http://devcenter.heroku.com/articles/slug-size
remote:
remote: ! Push failed
Anonymous
Could anyone help Please?
Infinite
Can anyone suggest some free hosting for my django website?
Anonymous
I tried below command but did not work for me
heroku plugins:install heroku-builds
heroku builds:cache:purge
Anonymous
Anonymous
yes
Infinite
Thanks :)
Daler
Sourav
I am integrating elastic search with DRF. Getting connection issue while building indexes...
Urllib3 connection issue..?😔
Almaz
Hello everyone. I have a question regarding user photos in Django production. There is a way to serve it using Nginx, but then there is a security problem. One can easily change a link a get others' photos.
Seems like it is better to server images through Django. So, I configured Nginx to proxy "/user_images" requests to Django, but it does not work at all.
Django is able to handle images only when debug mode is on.
Can anyone give a hint or a link to a good tutorial?
Nakul
Hey any project suggestions for django learning !
Anonymous
Slawa
Slawa
Almaz
Almaz
Slawa
Thank you!
If you don’t want to work with Amazon - Minio is a good self hosted alternative
.
hello, I have the following the condition on my template:
{% if request.user.id in Hasliked %}
<button id="likeBtn{{ i.id }}" class="likeClassBtn colorRed">
<i class="fas fa-heart"></i>
</button>
{% endif %}
{% if request.user.id in Hasnotliked %}
<button id="likeBtn{{ i.id }}" class="likeClassBtn">
<i class="fas fa-heart"></i>
</button>
{% endif %}
where Hasliked and Hasnotliked are two different tuples passed as context with values [1,2] and [2] resp., but the request.user.id is 1. For some reason, Im not able to see the button in second condition, is there anything wrong with the conditions?
William
Alex
Hey there. How can how can I query pagination using numbers of the page instead of next and previous button on Django rest framework. Cheers
Alex
Anonymous
Bharathwajan
Use signals
thank you so much bro , that worked i took many days to study about it but that time worth it
whatsinaname
What could be some good django projects of intermediate level for resume?
卐 𐎷𐏃𐎼𐎠𐎴 卐
Hi
I use two database (postgresql,mongodb) for project and I want store all objects postgresql model to Mongo dB but give error
Master of None
Екатерина
Can anyone recommend a good YouTube tutorial or a good pdf to learn Django??
Macurrent
why is it that every tutorial i find for teaching django i just see them using bootsrap and not materialize css
Екатерина
🙏🙏 thanks
Екатерина
Almaz
Anonymous
Anonymous
Heroku
أ.صفاء
Hello , does any of you have an experience gantt chart?
Anonymous
Hello,
Can anyone help me for triggering a mail for maintenance update(alert mail) on particular date and the date will fetch from the database of django. (Not by filling a form, it should auto send on the date which was fetched from database)
It's urgent, please help
Manuel
how can I show a validation Error on the model on the template
Prakhar de
1. I'm facing trouble while serving my static files.
2. The JavaScript is working fine,
3. But the css, even the online Css does not affect the Template
4. Any help will be greatly appreciated.
Prakhar de
Crack
How to get user data by using default jwt get token
Macurrent
So all of you guys don't use materialize css
Macurrent
Fazel
Macurrent
I use
https://bootstrapshuffle.com/classes/text/font-weight-bold
Macurrent
Fazel
Macurrent
<p class="font-weight-bold">Bold text.</p>
They just used this 👆🏽
Macurrent
Macurrent
Maybe i need to learn bootsrap first then go to materialize css later.
Wishmaster
I need some help. I am using django-select2. I have define a form with a foreignkey field using the widget ModelSelect2Widget. I need to know how to change the value of that field using javascript. More info here:
https://stackoverflow.com/questions/67732253/how-to-set-value-to-django-select2-field-programmatically-on-button-click-usin
Kashif
BHARATHIDASAN
Guys,in my system django is not running properly, if I run one web application django project folder, it shows the output in the website but the alignment is not in the proper way. And I checked that same project folder in another system there it's running properly. But I don't know why it is not run properly in my laptop..😔😔😟 SOMEBODY HELP ME GUYS...
BHARATHIDASAN
I'm working on the software vs code and pycharm
Javohir
hi guys, Im trying to display an image on my page but the image is not visible. However the other fields are displayed