Leonardo
Leonardo
Dave
anyone can help ?
Dave
https://stackoverflow.com/questions/59123231/modifying-queryset-in-django-admin-page-for-auth-users-and-a-custom-related-mode
Leonardo
type = models.TextChoices('AMOUNT PERCENTAGE')
Leonardo
ValueError: 'AMOUNT PERCENTAGE' is not a valid TextChoices
Leonardo
why?
inchidi
TLDR: TextChoices is not field class
Adonis
Adonis
type is a reserved word in python also
Adonis
class Runner(models.Model):
MedalType = models.TextChoices('MedalType', 'GOLD SILVER BRONZE')
Leonardo
the problem was the type word
Leonardo
do you know whats the convention when you will use a word and its reserved?
Adonis
great man
Leonardo
usually i use underscore when is a variable
Leonardo
if its a table column, like my last problem, i change to a more verbose
Leonardo
like type to discount_type
Adonis
ah yeah me too, but i think a more verbose var name is always a good idea
Leonardo
well, its a huge discussion
Leonardo
hahahahha
Leonardo
but just for reference, its always good to ask for ppl what they do
Leonardo
thx for sharing @adonis97
Adonis
you're welcome @sleonardoaugusto
Anonymous
I am getting error like django not identified
Anonymous
When I installed django I started to create a project
Anonymous
At this point in terminal window of vscode I have typed admin command to recognize django
Anonymous
It is giving error django not identified
Anonymous
Anyone have solution
Anonymous
Django 3.0
Anonymous
You mean python 3 will take care
Mirco
Have a look at django-payments package
Anonymous
Can anyone help me please?
Dcruz
Anonymous
I have a Diary model with timestamp and currently it's displaying all the object filter by request.user on template
Anonymous
Now I want to display the days first according to user which will be linked to the timing of the day then will show the diary model
Anonymous
So do I need to make another model for Days with date field and diary foreign key
Dcruz
You can filter only for a Day value
Dcruz
From timestamp, uses the Day value
Dcruz
You have to play with filtering datetimes
Anonymous
How to make online quiz examination in django. Any guidelines?
Samat
Hello everyone! Could you help me with Django templates?
I have a list of values like [‘a’, ‘b’, ‘c’, ‘d, ‘e’, ‘f’, ‘g’]. I need to show it in table with three items on each row. How I could do this with Django tools?
Here an example of what I have and what I want to achieve:
in templates/main/index.html, line number 10
https://repl.it/repls/HuskySquigglyFolders
Shivansh
Here is my first ever techblog on JavaScript and ECMAScript Dilemma.This blog speaks to my present Knowledge of the differences among JavaScript and ECMAScript.Go catch up the blog at : https://bit.ly/ShivanshJSvsES6 Do give it a read and a clap . Also share your views on it.😍 .
R
Егор
Hi, guys! Could you help with my question? I have a model that associated with DB table, but also there is SQL view in my database, which inculdes less then 10% of objects from original table. Sometimes I need to exctract objects from this view but not from the table. How can do it using django ORM? Can I set one more model manager that will look up objects in this view, not in original table?
Anonymous
Adonis
Thank you
The most advanced... Had use this in the past
Almaz
Hello everyone! I red about microservice. Not sure, that question is correct. There is something that confuses me. If backend and frontend talks via api, can it be called as microservice architecture?
Adonis
Let pick an example of ecommerce website built with a micro service architecture, each module can be developed as a services, so you will have a catalog service, a cart service etc... for example and earch of those service will handle only request related to those features
Adonis
of course you could divide them in more small and specific services
Adonis
check a lib like Nameko to build one in Python
https://github.com/nameko/nameko
Almaz
Adonis
checkout this article: https://www.toptal.com/python/introduction-python-microservices-nameko
Abba
Hello everyone i want to upgrade my project from version 11 to version 3 i need help?
Mirco
Mirco
You need to upgrade LTS by LTS
Mirco
1.11 to 2
Abba
Okay
Abba
But if not which means i need to start new from scratch
Mirco
Anonymous
Anonymous
Ghorz
Takhmina
Hello everyone, I have a huge problem. I can’t consolidate done project to Django. How can I fix that problem? Please help 😢
Sultonbek Ikromov
Takhmina
It doesn’t help
Sultonbek Ikromov
come on
Alex
Takhmina
I’ve been parsed website, and I should rewrite them in Django. Static files are not loaded
cj
no, it's ok
Anonymous
Hi Dennis
Anonymous
Sorry late response
Anonymous
No I did not installed virtual env