skip to Main Content

Html – Can't make dynamic page changes

I want to make a dynamic page, but when I make a request the page just refreshes, although it should return an alert when no data is entered (I have not entered any). views.py def adding(request): return render(request, 'matrix_app/adding_matrix.html') create_matrix.js…

VIEW QUESTION

Postgresql – Django prefetch_related on ForeignKey relation

I have this database setup: class Profile(AbstractBaseUser, PermissionsMixin): email = models.CharField(max_length=30, null=True, unique=True) date_created = models.DateTimeField(auto_now=True) ... class SubProfile(models.Model): profile = models.OneToOneField(Profile, on_delete=models.CASCADE) display_name = models.CharField(max_length=25) ... class SubProfilePost(models.Model): profile = models.ForeignKey(Profile, related_name='sub_profile_postings', on_delete=models.CASCADE) title = models.CharField(max_length=20, null=False) looking_for_date =…

VIEW QUESTION
Back To Top
Search