-
Notifications
You must be signed in to change notification settings - Fork 3
All the changes that have been made in the last meeting #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f9cfe26
df3cd8c
8e4962f
09039bb
b5dfb25
7d72095
80ab63d
c4469f0
9914095
b931391
399e43f
2c077e9
1f88e8d
9f0a84f
167618d
fdbcb90
db1a424
93515de
1378fcf
0250033
dd0f069
d42ce85
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the use of APIPaper, APIStudentAcademicInformation and APIStudentPartTerm.... ? What are the uses of this tables and it's data for our system ? |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,37 @@ | ||
| from django.db import models | ||
|
|
||
| # Create your models here. | ||
|
|
||
| class APIEnrollment(models.Model): | ||
| """Staging table for enrollment data - matches New_schema exactly.""" | ||
| prn = models.BigIntegerField() | ||
| subject_code = models.CharField(max_length=100) | ||
| division = models.CharField(max_length=20) | ||
| year = models.IntegerField() | ||
|
|
||
| class Meta: | ||
| unique_together = ('prn', 'subject_code', 'division', 'year') | ||
|
|
||
| def __str__(self): | ||
| return f"PRN {self.prn} - {self.subject_code} Div {self.division}" | ||
|
|
||
|
|
||
| class APIPaper(models.Model): | ||
| """Staging table for paper data - mirrors MSUIS API payloads. Matches New_schema exactly.""" | ||
| msuis_id = models.BigIntegerField(primary_key=True) | ||
| paper_name = models.CharField(max_length=500) | ||
| paper_code = models.CharField(max_length=100) | ||
| raw_payload = models.JSONField() | ||
|
|
||
| def __str__(self): | ||
| return f"{self.paper_code} - {self.paper_name}" | ||
|
|
||
|
|
||
| class APIStudent(models.Model): | ||
| """Staging table for student data - mirrors MSUIS API payloads. Matches New_schema exactly.""" | ||
| prn = models.BigIntegerField(primary_key=True) | ||
| email_id = models.CharField(max_length=255, null=True, blank=True) | ||
| raw_payload = models.JSONField() | ||
| full_name = models.CharField(max_length=255, null=True, blank=True) | ||
|
|
||
| def __str__(self): | ||
| return str(self.prn) |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add the vercel url in the env and then access it from there, don't hardcore the url in the code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mannshah24 LocMemCache is not suitable for multi-worker (like ours ) production deployments because each process maintains its own isolated in-memory cache.
The suggestion by copilot seems appropriate to use db as a cache.
First run this command
python manage.py createcachetable classlens_cacheand then apply the suggested changes by copilot.