From 3f9e5292ca9c74305e779ce516d9ccad972f1e69 Mon Sep 17 00:00:00 2001 From: Ali-Salman29 Date: Mon, 10 Jun 2024 13:29:41 +0200 Subject: [PATCH] update: add araboc_name in the profile model --- .../migrations/0048_userprofile_arabic_name.py | 18 ++++++++++++++++++ common/djangoapps/student/models/user.py | 1 + 2 files changed, 19 insertions(+) create mode 100644 common/djangoapps/student/migrations/0048_userprofile_arabic_name.py diff --git a/common/djangoapps/student/migrations/0048_userprofile_arabic_name.py b/common/djangoapps/student/migrations/0048_userprofile_arabic_name.py new file mode 100644 index 000000000000..c47ac8cfb8ef --- /dev/null +++ b/common/djangoapps/student/migrations/0048_userprofile_arabic_name.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.20 on 2024-06-07 08:35 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('student', '0047_userprofile_terms_and_conditions'), + ] + + operations = [ + migrations.AddField( + model_name='userprofile', + name='arabic_name', + field=models.CharField(blank=True, db_index=True, max_length=255), + ), + ] diff --git a/common/djangoapps/student/models/user.py b/common/djangoapps/student/models/user.py index bee8d4ce16b1..79d7ef79922c 100644 --- a/common/djangoapps/student/models/user.py +++ b/common/djangoapps/student/models/user.py @@ -432,6 +432,7 @@ class Meta: # This is not visible to other users, but could introduce holes later user = models.OneToOneField(User, unique=True, db_index=True, related_name='profile', on_delete=models.CASCADE) name = models.CharField(blank=True, max_length=255, db_index=True) + arabic_name = models.CharField(blank=True, max_length=255, db_index=True) # How meta field works: meta will only store those fields which are available in extended_profile configuration, # so in order to store a field in meta, it must be available in extended_profile configuration.