Artur
Hello. Please tell me the guide on how to display products by category in the online store
Anonymous
hii everyone, can sameone explain me how to use POP3 for printing content-type (body or attachment) please help me..
Abel T.
can someone help me on this tag
Abel T.
<link rel="stylesheet" href="{% static 'website/style.css' %}">
Abel T.
the css is not working
Rishu
if you know about css
Abel T.
yes i know
Rishu
If you know about css
Rishu
This is used to add
Rishu
Css
Rishu
Href here is for path
Rishu
Static here is folder
Rishu
Where all the files kept
Rishu
You must add to settings. Py file
Rishu
Like for db and new app
Rishu
After static
Rishu
Next folder name
Abel T.
the path is correct
Rishu
And file name
Rishu
Path
Abel T.
Rishu
How you add Templates folder
Rishu
Create variable
Abel T.
ok i will thanks for help
Rishu
STATICFILES_DIRS = [ os.path.join (BASE_DIR, 'static')]
Rishu
In settings.py file
Rishu
At the end
Rishu
Below static urls
Shyamkumar
my test not work
Xavier
my test not work
u have any idea how little it narrows the problem down ?
share more information
Rishu
Start sever again
Rishu
And top of your page
Rishu
Base.html
Rishu
File
Rishu
{% load static %}
Rishu
You have to load static files
Amit
I added on attribute in auth_user table and trying to send data in that attribute but getting error User() got an unexpected keyword argument phone (phone is the attribute that I added in auth_user) can any one help me with this
Amit
If I remove the phone attribute from view then it work perfectly. How can I do this
Amit
https://stackoverflow.com/questions/61825761/raise-typeerrors-got-an-unexpected-keyword-argument-s-cls-name
Amit
Mirco
Share the code 😁
Mirco
Checked SO link
Mirco
You need to extend the User model
Mirco
Otherwise you cannot pass that attribute
Александр
Hi, who knows, how get similar id in 2 differents applications in django ?
Amit
Mirco
Александр
🙇♂sorry
Anonymous
Can anyone send tutorial for django rest framework social authentication please
Sweetie
Should I use UUID as primary_key?
My only concern is I don't want users to find out how many users I have (with AutoField user can know if he registered today and his ID is 1001)
I don't want users to attempt accessing data of other users by changing pk in detail/ update / delete urls.
Though I do filter queryset with self.request.user
But UUID gives an extra layer of safety if I any view does not have the filter.
My app will be processing 1000+ queries per second.
I have read some benchmark articles which suggests AutoField is 2.5 times to 25 times faster than UUID in MySQL database.
My app will be using postgres
Shivam
utkarsh
Mirco
utkarsh
Doragonsureiyā
Bro can you help me out plz
Please 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 60k+ people the probability that someone will help is pretty high.
Also please read: http://catb.org/~esr/faqs/smart-questions.html
Shyamkumar
(models, forms, apps, tests and singles)
which one best method(i know both but best or right)
1st : 'appname'
2nd: 'appname.apps.AppnameConfig'
Shyamkumar
Installapp
Muslim
Shyamkumar
Muslim
Muslim
Onder
Hello,
We're building a django project and we ant to turn on multilanguage web site. But we have some problems. Example while i was developing a blog app, i created a blog model like this;
title_en = .. . title_de= ...
Is this make sense for multilanguage website? Or should i create app like blog_en, blog_de this. Which one is the better ? If we want to use django trasnlation and localization, we can use it forstatic parts. But we couldn't find out dynamic contents translation, when we use to django_trasnlation
Felipe
Hey guys, hope you're all good! I'm working with Django Rest Framework. I have a model with a date field that is defined as blank = True and null = True. In my serializer I defined this field as required = False and allow_null = True. When the frontend does not send the field or send date = null everything works 100%, however when it sends an empty string "" the serializer raises a validation error. I saw that I can handle this by defining to_internal_value (), but I think there may be a simpler way. Does anyone have any other tips on how to solve this?
Wang
good evening everyone
I want to create bookkeeping for self
only income and expenditure
how to design model
who can talk about it
ishak
Where is the correct place for this model? products or users?
FavoriteProduct(models.Model)
user = models.ForeignKey(User)
product = models.ForeignKey(Product)
ishak
Anonymous
My images are not displaying on the web page someone have any solution?
Yakusa
Anonymous
class books(models.Model):
product_id=models.AutoField
book_name=models.CharField(max_length=100)
author=models.CharField(max_length=100)
subcategory=models.CharField(max_length=100)
image=models.ImageField(upload_to='img')
price=models.IntegerField()
choice=(
('ug',"under graduation"),
('pg','post graduation')
)
category=models.CharField(max_length=100,choices=choice)
def __str__(self):
return self.book_name
Gaurav
"django.db.utils.OperationalError: table "django_content_type" already exists" i get this error when I run migrate command.
Gaurav
how to fix it?
Anonymous
this is my models
Anonymous
here i wanted ti display image