Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
Course Queries Syllabus Queries 2 years ago
Posted on 16 Aug 2022, this text provides information on Syllabus Queries related to Course Queries. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
So I am working on a course syllabus app. Each syllabus has one or more class meeting times, a start date, an end date. I would like to be able to automatically generate a set of class meetings for each syllabus based on this information within the admin form. The idea is simply that the user should be able to input the meeting times, start date, and end date, hit a button, and have django create inline class session objects that the user can then edit. So, for instance, if I have a class that meets every Tuesday from 1 - 3 between May 1 and September 1, I should be able to hit a button, and get class sessions--or at least class session forms, there's no reason to save them in the database until they're filled in--for every Tuesday between those dates.
The relevant model code is as follows:
class Syllabus (models.Model): name = models.CharField(max_length=120) number = models.CharField(max_length=32, blank = True) start_date = models.DateField() end_date = models.DateField() class DaysTime(models.Model): days = MultiSelectField(max_length=15, choices=WEEKDAYS) startTime = models.TimeField() endTime = models.TimeField() class Meta: abstract = True class ClassTime(DaysTime): key = models.ForeignKey('Syllabus') class EventAbstract (models.Model): name = models.CharField(max_length=120) description = models.TextField(blank = True) startDateTime = models.DateTimeField() endDateTime = models.DateTimeField(blank = True) class Meta: abstract=True class ClassSession(EventAbstract): cancelled = models.BooleanField(default = False) syllabus = models.ForeignKey('Syllabus') date = models.DateField()
Generating the dates and the ClassSessions for the dates isn't the problem. Adding a button onto a custom admin template to extend change_form isn't a problem either. Because the change_form is highly generic, and does not know anything about the models it is presenting, there's no way I can see to make the button talk to the function.
So as I see it the problem is three fold:
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
Course Queries 4 Answers
Course Queries 5 Answers
Course Queries 1 Answers
Course Queries 3 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.