Ghorz
Or online photo sharing tool
Marco
look at the total_amount function
Maybe this project helps you https://github.com/justdjango/django-ecommerce/blob/76d1f60f38f3f141767b35b13fb8f7989307ccb8/core/models.py#L66
cj
For all the #IRANIANS guys here: We —the group admins— didn't restrict you, it is Telegram itself that restricted you from all public groups because policy restrictions to your country. don't send direct messages to the admins asking why you are restricted, we can't do anything about that, sorry.
Pieas
Guys, need help. I have a Article model and also I have comment models with one to many relationship. how can i count how many comment an article have? i am using related_name='comments' i tried article.comments.all.count() which failed
Pieas
no error, but doesnot return a number
Pieas
i am using this in template
Pieas
{{ article.comments.count }}
.
Can you screen your error ?
vadim
{{ article.comments.count }}
put into context['article_count'] = article.comments.count() use in template article_count
Prince
Anyone have a project on django ??
Julius
Anyone have a project on django ??
Oh, dats a good question!
Prince
I learn django so I need a project
Prince
Sent a link
Julius
manage.py startapp blog
Julius
Voila
Yash
My models.py is https://www.codepile.net/pile/9aZ9vBP0 Teacher and StudentInfo will store their respective details. What I want is to auto increment rollNumber when I add new row to my ClassRoomStudents, but if the student is from different class then rollNumber count should reset it should start again As different students can have same roll number if they are from different classroom
Anonymous
what is the latest version of django right now
Anonymous
?
#
Hi guys i am on web based mobile apps with backend django and frontend react native, so i am facing problem of fetch data from my backend django api. I was try to fetch with fetch('http://127.0.01:800/api/vacancy/', but it couldn't work, it return empty array. Please help me
Anonymous
Can you give some help?
Anonymous
https://stackoverflow.com/questions/59223481/why-password-is-not-hashed-when-create-user/59223528#59223528
Rohan
Friends i have a html form in one project and from another project i must fill it as a user. Can anyone tell how to do it
Adarsh
From where should I learn django rest framework?
Dave
No
Dave
you have to pay it in udemy to get the course
Luis
probably a mistake in virtualenv
You should install all your project dependencies (django too) because virtual environment does not include your currently installed packages. Try to install all your dependencies after venv activation. You know... pip install django, etc, etc. Good luck!
Luis
It's a good idea because I think you must identify the User in your business logic. An AnonymousUser is a user not logged in yet, and they don't have some attributes. I think it's the reason it works with logged in users. Anyway, check that the redirect url you are passing to login_required decorator is valid (it may be the cause you are getting http404) https://docs.djangoproject.com/en/2.2/topics/auth/default/#the-login-required-decorator
Gaurav
is django good to create rest api?
Muflone
Only for today, free ebook: Django 2 by examples https://www.packtpub.com/free-learning Downloadable offline using packtpub-downloader
Luis
is django good to create rest api?
You can write your own rest API or go Google and read about Django Rest Framework
Anonymous
Please guys pastebin and share the link so we see what we are dealing with here
Gaurav
Yeah i am planning to create my own rest api
Luis
Yeah i am planning to create my own rest api
I recommend you read about Django rest framework before writing a rest api from scratch
Luis
I should take a little English course 😅
Gaurav
ah looks abit difficult compared to expressjs
Anonymous
How can create img model that can take in multiple picture for a product
Luis
Something like bootstrap carousel
What about a ProductImage model with ForeignkeyField to Products and ImageField ?
Anonymous
What about a ProductImage model with ForeignkeyField to Products and ImageField ?
Have never thought of that but what will the tag look like in template
Luis
{% for i in product.productimage_set.all %} <img src='{{ i.image.url }}' /> {% endfor %}
Anonymous
Ok I will give it a try thanks man
Luis
Ok I will give it a try thanks man
If it doesn't work, you can try removing ForeignkeyField from ProductImage model and create a ManyToManyField from Product model to ProductImage model, and use the same template.
Anonymous
Kk
Luis
Good luck!
Pieas
It works thanks :)
Ghorz
Anyone have a project on django ??
Build results computation system that accepts scores as spreadsheet (csv)
Dcruz
Hello guys, how can i require a specific field on a Django Rest Framework ModelSerializer? I didnt found it on the official docs or maybe i missed it.
Master
Have no idea, what you saying because don't speak Spanish. But possible this link answer your question: https://www.django-rest-framework.org/api-guide/serializers/#specifying-fields-explicitly
cj
what is the latest version of django right now
go to https://djangoproject.com and see yourself, it's not that hard
Rishikesh
Hello guys, how can i require a specific field on a Django Rest Framework ModelSerializer? I didnt found it on the official docs or maybe i missed it.
It's already there...just Google "Django rest framework modelserializer"... And also what do you mean by referring a field?
Emran
Guys what is django
@MsDana
That was my question too
Doragonsureiyā
Guys what is django
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 firsts results
Emran
Tnx
Emran
Ihave question
Doragonsureiyā
Ihave question
Read this please: http://www.catb.org/~esr/faqs/smart-questions.html
Anonymous
Hello everyone , I can't get past django.db.utils.OperationalError: (1045, "Access denied for user 'web_developer'@'localhost' (using password: YES)") . I tried everything ,this is my django settings in settings.py DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'project_db', 'USER':'web_developer' 'PASSWORD':'web_password', 'HOST':'localhost', 'PORT':'3306', } } I can connect from python REPL ,using the same credentials . I got the project from git , and don't know if I need to do something else . I tried with mysql.connector module , does django use something else for mysql .Any help would be appreciated ,I tried all the answers I could find ,reinstalled both the project and mysql , same error. Please help !
Anonymous
Did you configure the user properly?
as I said I can connect from python REPL , using mysql.connector . I can check any configuration that raises this error , if you tell me which .
Rohan
https://stackoverflow.com/questions/11170133/using-mysql-with-django-access-denied-for-user-localhost/11170252
Anonymous
Did you configure the user properly?
+----------------------------------------------------------------------+ | Grants for web_developer@localhost | +----------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'web_developer'@'localhost' | | GRANT ALL PRIVILEGES ON ercess_db.* TO 'web_developer'@'localhost' | +----------------------------------------------------------------------+ my user
Oğuzhan
Guys I am looking for a developer who uses Django rest framework and has enough experience with it.
Oğuzhan
To collaboratively work on a project together
Oğuzhan
It will be open source project to improve ourselves
Oğuzhan
I have enough experience and just want to take myself to next level.
Luis
So how can i figure out, what should i do?
Put a log in your view. Print the response from django to client. Make a request and test.