refactor(profile): added social link in profile and in organization
This commit is contained in:
@@ -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",
|
||||
]
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
),
|
||||
]
|
||||
@@ -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),
|
||||
),
|
||||
]
|
||||
@@ -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"
|
||||
|
||||
@@ -49,6 +49,36 @@
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<p class="mb-0">Contact Phone</p>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<p class="text-muted mb-0">{{organization_obj.contact_us_phone}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<p class="mb-0">Address</p>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<p class="text-muted mb-0">{{organization_obj.address}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<p class="mb-0">Websiter Url</p>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<p class="text-muted mb-0">{{organization_obj.website_url}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
@@ -59,17 +89,27 @@
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<p class="mb-0">Facebook Url</p>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<p class="text-muted mb-0">{{organization_obj.facebook_handle}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<p class="mb-0">Facebook Url</p>
|
||||
<p class="mb-0">Twitter Url</p>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<p class="text-muted mb-0">{{organization_obj.facebook_handle}}</p>
|
||||
<p class="text-muted mb-0">{{organization_obj.Twitter_handle}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<p class="mb-0">Linkedin Url</p>
|
||||
|
||||
Reference in New Issue
Block a user