-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from Pranjal-88/Pranjal
Social media app
- Loading branch information
Showing
1,521 changed files
with
187,603 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from django.contrib import admin | ||
from .models import Profile,Post,Liked_Post,Comment,Follow | ||
|
||
admin.site.register(Profile) | ||
admin.site.register(Post) | ||
admin.site.register(Liked_Post) | ||
admin.site.register(Comment) | ||
admin.site.register(Follow) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class ProfilePageConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'Profile_page' |
27 changes: 27 additions & 0 deletions
27
Django-socialmedia-app/Profile_page/migrations/0001_initial.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 5.0.6 on 2024-06-22 15:11 | ||
|
||
import django.db.models.deletion | ||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Profile', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('bio', models.CharField(max_length=10000)), | ||
('profile_img', models.ImageField(default='book-icon.png', upload_to='media')), | ||
('location', models.CharField(max_length=1000)), | ||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
], | ||
), | ||
] |
41 changes: 41 additions & 0 deletions
41
...dia-app/Profile_page/migrations/0002_alter_profile_bio_alter_profile_location_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Generated by Django 5.0.6 on 2024-06-24 07:54 | ||
|
||
import django.db.models.deletion | ||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('Profile_page', '0001_initial'), | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='profile', | ||
name='bio', | ||
field=models.CharField(default='Busy', max_length=10000), | ||
), | ||
migrations.AlterField( | ||
model_name='profile', | ||
name='location', | ||
field=models.CharField(blank=True, max_length=1000), | ||
), | ||
migrations.AlterField( | ||
model_name='profile', | ||
name='profile_img', | ||
field=models.ImageField(default='image.jpeg', upload_to='media'), | ||
), | ||
migrations.CreateModel( | ||
name='Post', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('Img', models.ImageField(upload_to='post_images')), | ||
('caption', models.CharField(max_length=10000)), | ||
('likes', models.IntegerField()), | ||
('User', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
], | ||
), | ||
] |
19 changes: 19 additions & 0 deletions
19
Django-socialmedia-app/Profile_page/migrations/0003_post_time.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 5.0.6 on 2024-06-24 08:16 | ||
|
||
import datetime | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('Profile_page', '0002_alter_profile_bio_alter_profile_location_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='post', | ||
name='time', | ||
field=models.DateTimeField(default=datetime.datetime.now), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
Django-socialmedia-app/Profile_page/migrations/0004_alter_post_likes.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 5.0.6 on 2024-06-24 08:20 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('Profile_page', '0003_post_time'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='post', | ||
name='likes', | ||
field=models.IntegerField(default=0), | ||
), | ||
] |
23 changes: 23 additions & 0 deletions
23
Django-socialmedia-app/Profile_page/migrations/0005_remove_post_id_post_post_id.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 5.0.6 on 2024-06-24 10:43 | ||
|
||
import uuid | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('Profile_page', '0004_alter_post_likes'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='post', | ||
name='id', | ||
), | ||
migrations.AddField( | ||
model_name='post', | ||
name='post_id', | ||
field=models.UUIDField(default=uuid.UUID('f27f17d6-a42f-4663-b7f7-acb4ec054f8f'), primary_key=True, serialize=False), | ||
), | ||
] |
19 changes: 19 additions & 0 deletions
19
Django-socialmedia-app/Profile_page/migrations/0006_alter_post_post_id.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 5.0.6 on 2024-06-24 10:50 | ||
|
||
import uuid | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('Profile_page', '0005_remove_post_id_post_post_id'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='post', | ||
name='post_id', | ||
field=models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False), | ||
), | ||
] |
21 changes: 21 additions & 0 deletions
21
Django-socialmedia-app/Profile_page/migrations/0007_liked_post.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Generated by Django 5.0.6 on 2024-06-24 11:57 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('Profile_page', '0006_alter_post_post_id'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Liked_Post', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('Username', models.CharField(max_length=100)), | ||
('post_id', models.UUIDField()), | ||
], | ||
), | ||
] |
23 changes: 23 additions & 0 deletions
23
Django-socialmedia-app/Profile_page/migrations/0008_comment.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 5.0.6 on 2024-06-24 19:15 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('Profile_page', '0007_liked_post'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Comment', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('content', models.CharField(max_length=1000)), | ||
('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Profile_page.profile')), | ||
('post_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Profile_page.post')), | ||
], | ||
), | ||
] |
19 changes: 19 additions & 0 deletions
19
Django-socialmedia-app/Profile_page/migrations/0009_alter_comment_post_id.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 5.0.6 on 2024-06-25 07:16 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('Profile_page', '0008_comment'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='comment', | ||
name='post_id', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='Profile_page.post'), | ||
), | ||
] |
29 changes: 29 additions & 0 deletions
29
Django-socialmedia-app/Profile_page/migrations/0010_profile_followers_follow.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Generated by Django 5.0.6 on 2024-06-25 15:38 | ||
|
||
import django.db.models.deletion | ||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('Profile_page', '0009_alter_comment_post_id'), | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='profile', | ||
name='followers', | ||
field=models.IntegerField(default=0), | ||
), | ||
migrations.CreateModel( | ||
name='Follow', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('current_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
('followed', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Profile_page.profile')), | ||
], | ||
), | ||
] |
17 changes: 17 additions & 0 deletions
17
Django-socialmedia-app/Profile_page/migrations/0011_remove_post_user.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 5.0.6 on 2024-06-25 18:46 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('Profile_page', '0010_profile_followers_follow'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='post', | ||
name='User', | ||
), | ||
] |
22 changes: 22 additions & 0 deletions
22
Django-socialmedia-app/Profile_page/migrations/0012_post_user.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Generated by Django 5.0.6 on 2024-06-25 18:54 | ||
|
||
import django.db.models.deletion | ||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('Profile_page', '0011_remove_post_user'), | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='post', | ||
name='User', | ||
field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), | ||
preserve_default=False, | ||
), | ||
] |
24 changes: 24 additions & 0 deletions
24
Django-socialmedia-app/Profile_page/migrations/0013_remove_post_user_post_profile.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 5.0.6 on 2024-06-25 18:54 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('Profile_page', '0012_post_user'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='post', | ||
name='User', | ||
), | ||
migrations.AddField( | ||
model_name='post', | ||
name='Profile', | ||
field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='Profile_page.profile'), | ||
preserve_default=False, | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
Django-socialmedia-app/Profile_page/migrations/0014_profile_following.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 5.0.6 on 2024-06-26 15:57 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('Profile_page', '0013_remove_post_user_post_profile'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='profile', | ||
name='following', | ||
field=models.IntegerField(default=0), | ||
), | ||
] |
Empty file.
Oops, something went wrong.