mea
mea
Амир
cant use load in my project
TemplateSyntaxError at /api/orders/
Encountered unknown tag 'load'.
Dirn
Angel
It is the most basic 'hobby plan' but it is not free
Ak
Can anyone help me with aws django doubts
Ak
I mean i have my django backend in aws ec2 now i want to see printingd i have given in functions to certain purposes, how to make it visible, i have use used nginx and gunicorn
Charly
Charly
Charly
.
Hello everyone, please tell me how can I make it work correctly? This is a table with text and a poster. The text stores text inside which there are links to photos, previously everything was pulled from the local storage, now it is moving to S3 and due to the fact that inside the text in HTML through the img tag, which is not sent a request to S3 and correctly. Here are the options I asked them to reach through C3, but they didn't get help - https://dpaste.org/4X3jS . Example in the poster value group - post_images/CL7RqfyE.jpg and to request I have a valid example -
https://aaa.object.pscloud.io/media/post_images/CL7RqfyE.jpg ?AWSAccessKeyId=XXXXXXXXXXXXXX&Signature=XXXXXXXXXXXXXXX and expiration date=XXXXXXXX
Request method:
get
Status code:
200 OK
Omo
Thanks everyone, am getting added knowledge from all questions and answers here.
@user_shri
Hii
How to connect vs code for python django with frontend
$@£d@®
@user_shri
Mehdi
Hi
Error :
The ... attribute has no file associated with it
Html : <img src="{{Site.Logo.url}}" width="200" alt="">
Models : Logo = models.ImageField(null=True,blank=True,upload_to='Logo')
Mehdi
I add image and website load but now i want to load website without image , i hope you understand
Charly
Charly
Parsa
Parsa
Charly
Sorry iot
yeah you can use it, probable there are better options for specific tasks
Jamie
Showing failed to connect .
I am using AWS Elasticache Redis
My code is
CELERY_BROKER_URL='redis:username:password@hostname:port/0'
Charly
Charly
An if thats literally the setting you need to replace it with your actual url
Priyanshu Pratap
Hey does anyone know how to add a scroll bar at the bottom of the admin panel. Like if i have a model that has many fields and i used a list display then is there any way to add a scrollbar at the bottom??
𝑀𝓇. 𝐿𝑒𝓋𝒾𝒶𝓉𝒽𝒶𝓃
Hi guys
I want to create django project using postgres
But I don’t know which way is better: create Internal db with django models or create External db using postgers
What do you think I should do?
Luis
𝑀𝓇. 𝐿𝑒𝓋𝒾𝒶𝓉𝒽𝒶𝓃
Luis
Why?
Because thats how django works
Luis
You create the models and django deals with the database
𝑀𝓇. 𝐿𝑒𝓋𝒾𝒶𝓉𝒽𝒶𝓃
Because thats how django works
Ok Thanks bro
I have another question, will there be a problem if i create db in postgres and connect to django?
Carlos Alberto
Dj - 505
Hello .. i f i have 3 types of users Admin , Employee and Client I did by django rest framework as one project one website) , now the customer want 3 websites , website for each user type ! is that good idea with django RF and what is the best ideas to start with ?
Leonardo
AbstractUser and UserManager
Auc
Auc
Shan
I having issue using bulk update on listserializer
Shan
Error is cannot resolve keywords 'id' into field
Shan
https://github.com/30Shan30/inventory.git here is my code
Shan
Anyone could help on bulk_update not working
Shan
Doragonsureiyā
I get an error is cannot resolve keywords 'id' into field using put method for bulk_update
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain:
- what you're doing
- what you're expecting
- what you're using
- where you're running the script
- what Python version you're using
- what packages and their versions you're using
- and the most important thing: show the code YOU wrote (read rule 5️⃣ for that)
and more details, that way your chances to get help will increase.
Obdif
Has anyone worked with kubernetes before?
Please I need your assistance. 🙏
Charly
𝑀𝓇. 𝐿𝑒𝓋𝒾𝒶𝓉𝒽𝒶𝓃
Sing
Can some one help me to fix an issue.
Can i capture 500 server error and throw it as 400 to client.is there any way which i can do globally in django
Charly
Parsa
Gregory
How in Djoser pack make require email field ?
DJOSER = {
'USER_CREATE_PASSWORD_RETYPE':True,
}
Aldiiar
Who knows how to automatically launch a function 10 seconds after starting a Django project, I launch the function immediately with the project via apps.py and the def ready(self): function, and I can’t figure out how to debug for 10 seconds
Bohdan
Nahom
class UserCreateSerializer(BaseUserCreateSerializer):
"""Custom UserCreateSerializer for Users model"""
access_level_id = serializers.IntegerField()
employee_id = serializers.IntegerField()
class Meta(BaseUserCreateSerializer.Meta):
"""Meta class for UserCreateSerializer"""
model = Users
fields = ['id','username', 'password', 'access_level_id', 'employee_id']
i wanted to add custom field in djoser serializers but it is not working
Pius
Good morning everyone, my name is Timmy 😊
Pius
I'd like to ask, has anyone worked on a speech to tech project using Django 🥲
Charly
park seo joon
I was working on a post so I have a model that has a post, user, no_of_likes, date_created and caption so I only want it that if the user navigate to create update he will fill the form and I already have a form in my template that has a method of post and enctype so I query it like this
@login_required(login_url='signin')
def post(request):
if request.method == 'POST':
user = request.user.username
post = request.FILES.get('post')
caption = request.POST['caption']
if post and caption:
new_post = Post.objects.create_post(user=user, post=post, caption=caption)
new_post.save()
return redirect('/')
return render(request, 'home.html')
The issue is that if the form is filled and submitted it's not showing in the database
park seo joon
Even if I check the terminal it's not showing a post was created it's just showing a response of 200 and if I check my admin panel it's still showing 0 post how can I fix this please
Alex
park seo joon
show your form code.
I'm not validating with form because I will still need to style it while widget is not responsive to different devices sizes that's why I use models to validate the input and textarea directly
Alex
park seo joon
If I'm the validate with form I will definitely have form =PostForm.objects.get(bla bala)
If form.is_valid(): so I wasn't using form
park seo joon
frontend form code
<form action="{% url 'post' %}" method="post" enctype="multipart/form-data">
{% csrf_token %}
<div>
<label for="post">Select image:</label>
<input type="file" id="post" name="post" required>
</div>
<div>
<label for="caption">Caption:</label>
<textarea id="caption" name="caption" rows="4" cols="50" required></textarea>
</div>
<div>
<button type="submit">Post</button>
</div>
</form>