-ordering-or-order-by>*
*Thanks*
On Sunday, December 2, 2018 at 6:44:21 PM UTC+5:30, Coder Dude wrote:
>
> Here are my models:
> from django.contrib.auth.models import User as DefaultUser
> class Submission(models.Model):
> user = models.ForeignKey(to=Defaul
Here are my models:
from django.contrib.auth.models import User as DefaultUser
class Submission(models.Model):
user = models.ForeignKey(to=DefaultUser,
on_delete=models.CASCADE
)
total_score = models.DecimalField()
The query that I am trying is :
*Submission*.*objects*.values('user').annotate(C
7;: '127.0.0.1',
> 'PORT': '5432',
> }}
>
> Hope it helps
>
>
>
> *[]'s*
> *Daniel Germano Travieso*
> *Engenharia da Computação Turma: 013*
> *Unicamp*
>
> On Sun, May 27, 2018 at 8:24 AM, Coder Dude > wr
This is the code in my settings.py :
import pymysql
pymysql.install_as_MySQLdb()
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'learn001',
'USER': 'test01',
'PASSWORD': 'test01', #Password is also test01
}
}
Yet , it is thro
Suppose your function is in accounts.models . And you want to import in VV.views
In views.py of VV,
Write,
from accounts.models import foo
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails
5 matches
Mail list logo