Skip to main content
0 votes
2 answers
67 views

I have an old Django Project, which I started when I was a beginner. So far it worked but, due to some code refactoring I would like to do, I would like to change the original database models. ...
Giorgio Scarso's user avatar
1 vote
1 answer
111 views

I'm following this tutorial to learn Django and I've followed part 4 as in the video, but when I reload my page, it's always blank. I've looked at other posts that were also experiencing a blank page, ...
Deltag0ny's user avatar
0 votes
1 answer
92 views

I'm new to learning django rest framework & python. I'm currently trying to inherit a few methods to which I don't know how. An alternative is I copy the same code which is code replication and ...
Earthling's user avatar
  • 489
0 votes
0 answers
27 views

create.html {% extends 'base.html' %} **views.py** Def index(request): return render(request, ''main/create'', {}) I kept receiving template does not exist . Please help!
Dawud Usman's user avatar
2 votes
1 answer
524 views

I have a model A and want to make subclasses of it. class A(models.Model): type = models.ForeignKey(Type) data = models.JSONField() def compute(): pass class B(A): ...
augustebaum's user avatar
0 votes
1 answer
716 views

Short version I'm trying to run a custom migration (via RunPython) that involves an inherited model, say Restaurant. However a FieldError exception is raised at Restaurant.objects.all(), specifying ...
nonin's user avatar
  • 734
0 votes
1 answer
71 views

I am following Corey Schafer' Django tutorial. I have reached where I have to create a base.html template inheritance. After adjusting everything according to my project and running the server, my ...
Crownofhay's user avatar
1 vote
1 answer
100 views

am new to Django and I getting some difficulties in implementing this model in Django: here's my fiels : . ├── accounts │   ├── admin.py │   ├── apps.py │   ├── models.py │   └── views.py ├── ...
Amir Abbas's user avatar
0 votes
0 answers
351 views

I have three models (URL, Hostname, IPAddress). If I create a URL the overridden save() method of that class finds the hostname and does get_or_create() for Hostname. The save() method for Hostname ...
TheZeke's user avatar
  • 836
0 votes
1 answer
33 views

i am new in Django. I have task , i have Horoscope website , there is 12 Zodiac signs Aquarius,Aries and etc.... In Aquarius.html are subcategory like Aquarius love , Aquarius finance .... Template is ...
no name's user avatar
  • 51
0 votes
1 answer
1k views

I create base model and inherit that in all of my models. This is my BaseModel: class BaseModel(models.Model): create_date = models.DateTimeField(auto_now_add=True) update_date = models....
rahnama7m's user avatar
  • 977
3 votes
0 answers
383 views

I have models that have a inheritance relationship. I want to turn this relationship into a OneToOne‍‍‍‍‍‍‍‍ relationship, without removing any data in project. This is structure of models: class ...
rahnama7m's user avatar
  • 977
2 votes
2 answers
321 views

I have been read some Django document about inheritance models and parent_link. Suppose that I have these models: class Parent(models.Model): #Some field goes here! class Child(Parent): #...
rahnama7m's user avatar
  • 977
0 votes
1 answer
637 views

I changed the save method in the Django form.Then I inherited another save method from this method and made some changes to the child method ,that conflicted. I can't figure out how to fix the ...
rahnama7m's user avatar
  • 977
2 votes
2 answers
2k views

I we have this models in django: class FotherModel(models.Model): # Some fields goes here! class Meta: # Some fields goes here! abstract = True class ChildModel(...
rahnama7m's user avatar
  • 977

15 30 50 per page
1
2 3 4 5 6