Hi,
I would like to query an object from a DB and fetch all nested objects.
For example:
class ModelA(models.Model):
...
class ModelB(models.Model):
a = models.ForeignKey(ModelA)
...
class ModelC(models.Model):
b = models.ForeignKey(ModelB)
...
I want to query C by it's ID
Hi Kennedy,
What is Mysite.py?
You should run
$ python manage.py runserver
You run this from the directory where manage.py is located.
On Tue 26. Nov 2019 at 20:47, kennedy musyoki
wrote:
> I am new in Django and programming as well, I am to run the following code
> in cd but getting the erro
Hi Motaz,
Thank you for your response.
I didn’t try that yet, however my assumption is that I would have
duplicates of fields inherited from the User class.
On Sun 24. Nov 2019 at 11:16, Motaz Hejaze wrote:
> One way around is to make the models Employee and Company to inheret from
> User in
3 matches
Mail list logo