diff --git a/accounts/api/serializers.py b/accounts/api/serializers.py index 555aaa4..5ee2ebe 100644 --- a/accounts/api/serializers.py +++ b/accounts/api/serializers.py @@ -157,12 +157,14 @@ class ProfileSerializer(serializers.ModelSerializer): "player_id", "first_name", "last_name", + 'business_name', "phone_no", "email", "linkedin_profile", "youtube_profile", "facebook_profile", "instagram_profile", + "twitter_profile", "website", "is_active", ] diff --git a/manage_cms/api/serializers.py b/manage_cms/api/serializers.py index b9385f6..1da6dbd 100644 --- a/manage_cms/api/serializers.py +++ b/manage_cms/api/serializers.py @@ -55,6 +55,13 @@ class OrganizationSerializer(serializers.ModelSerializer): "subscription_agreement", "license_agreement_user", "license_agreement_merchant", + "contact_us_email", + "instagram_handle", + "facebook_handle", + "linkedin_handle", + "website_url", + "address", + "contact_us_phone", ] class EducationVideoSerializer(serializers.ModelSerializer): diff --git a/manage_cms/forms.py b/manage_cms/forms.py index 1d79433..7b323f4 100644 --- a/manage_cms/forms.py +++ b/manage_cms/forms.py @@ -22,26 +22,31 @@ class OrganizationForm(forms.ModelForm): fields = [ "title", "contact_us_email", + "contact_us_phone", + "address", + "website_url", "instagram_handle", "facebook_handle", "linkedin_handle", + "twitter_handle", "logo_image", "favicon_image", - "website_url", ] labels = { "title": "Organization Title", "contact_us_email": "Contact Email", + "contact_us_phone": "Contact Phone No", + "Address": "Contact Address", + "website_url": "Website URL", "instagram_handle": "Instagram URL", "facebook_handle": "Facebook URL", "linkedin_handle": "LinkedIn URL", + "Twitter_handle": "Twitter URL", "logo_image": "Organization Logo", "favicon_image": "Favicon", - "website_url": "Website URL", } - class NewsAndArticleCategoryForm(forms.ModelForm): class Meta: model = NewsAndArticlesCategory diff --git a/manage_cms/migrations/0002_organization_address_organization_contact_us_phone.py b/manage_cms/migrations/0002_organization_address_organization_contact_us_phone.py new file mode 100644 index 0000000..d30c25f --- /dev/null +++ b/manage_cms/migrations/0002_organization_address_organization_contact_us_phone.py @@ -0,0 +1,25 @@ +# Generated by Django 5.0.2 on 2024-08-16 08:29 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('manage_cms', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='organization', + name='address', + field=models.TextField(default='this is address'), + preserve_default=False, + ), + migrations.AddField( + model_name='organization', + name='contact_us_phone', + field=models.CharField(default='+911212121212', max_length=16), + preserve_default=False, + ), + ] diff --git a/manage_cms/migrations/0003_organization_twitter_handle_and_more.py b/manage_cms/migrations/0003_organization_twitter_handle_and_more.py new file mode 100644 index 0000000..fbbb32e --- /dev/null +++ b/manage_cms/migrations/0003_organization_twitter_handle_and_more.py @@ -0,0 +1,28 @@ +# Generated by Django 5.0.2 on 2024-08-16 09:29 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('manage_cms', '0002_organization_address_organization_contact_us_phone'), + ] + + operations = [ + migrations.AddField( + model_name='organization', + name='twitter_handle', + field=models.URLField(blank=True, null=True), + ), + migrations.AlterField( + model_name='organization', + name='address', + field=models.TextField(blank=True, null=True), + ), + migrations.AlterField( + model_name='organization', + name='contact_us_phone', + field=models.CharField(blank=True, max_length=16, null=True), + ), + ] diff --git a/manage_cms/models.py b/manage_cms/models.py index 861aa8f..65474d3 100644 --- a/manage_cms/models.py +++ b/manage_cms/models.py @@ -89,6 +89,7 @@ class Organization(BaseModel): instagram_handle = models.URLField(blank=True, null=True) facebook_handle = models.URLField(blank=True, null=True) linkedin_handle = models.URLField(blank=True, null=True) + twitter_handle = models.URLField(blank=True, null=True) logo_image = models.ImageField(blank=True, null=True, upload_to="organization/logo") favicon_image = models.ImageField( blank=True, null=True, upload_to="organization/favicon" @@ -104,6 +105,8 @@ class Organization(BaseModel): subscription_agreement = QuillField() license_agreement_user = QuillField() license_agreement_merchant = QuillField() + address = models.TextField(blank=True, null=True) + contact_us_phone = models.CharField(max_length=16, blank=True, null=True) class Meta: db_table = "organization" diff --git a/templates/manage_cms/organization_view.html b/templates/manage_cms/organization_view.html index 1d79fe6..8033dcb 100644 --- a/templates/manage_cms/organization_view.html +++ b/templates/manage_cms/organization_view.html @@ -49,6 +49,36 @@
+ +
+
+

Contact Phone

+
+
+

{{organization_obj.contact_us_phone}}

+
+
+
+ +
+
+

Address

+
+
+

{{organization_obj.address}}

+
+
+
+ +
+
+

Websiter Url

+
+
+

{{organization_obj.website_url}}

+
+
+
@@ -59,17 +89,27 @@

+ +
+
+

Facebook Url

+
+
+

{{organization_obj.facebook_handle}}

+
+
+
+
-

Facebook Url

+

Twitter Url

-

{{organization_obj.facebook_handle}}

+

{{organization_obj.Twitter_handle}}


-

Linkedin Url