├── .gitignore ├── .idea ├── .gitignore ├── Django-Blog.iml ├── inspectionProfiles │ ├── Project_Default.xml │ └── profiles_settings.xml ├── misc.xml ├── modules.xml └── vcs.xml ├── Blog_app ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-310.pyc │ ├── __init__.cpython-312.pyc │ ├── admin.cpython-310.pyc │ ├── admin.cpython-312.pyc │ ├── apps.cpython-310.pyc │ ├── apps.cpython-312.pyc │ ├── forms.cpython-310.pyc │ ├── forms.cpython-312.pyc │ ├── models.cpython-310.pyc │ ├── models.cpython-312.pyc │ ├── urls.cpython-310.pyc │ ├── urls.cpython-312.pyc │ ├── views.cpython-310.pyc │ └── views.cpython-312.pyc ├── admin.py ├── apps.py ├── forms.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_visitcounter.py │ ├── 0003_development_networking.py │ ├── 0004_rename_post_django.py │ ├── 0005_development_image_django_image_networking_image.py │ ├── 0006_contactmessage.py │ ├── 0007_alter_visitcounter_count.py │ ├── 0008_alter_visitcounter_count.py │ ├── 0009_registration.py │ ├── 0010_delete_registration.py │ ├── __init__.py │ └── __pycache__ │ │ ├── 0001_initial.cpython-310.pyc │ │ ├── 0001_initial.cpython-312.pyc │ │ ├── 0002_visitcounter.cpython-310.pyc │ │ ├── 0002_visitcounter.cpython-312.pyc │ │ ├── 0003_development_networking.cpython-310.pyc │ │ ├── 0003_development_networking.cpython-312.pyc │ │ ├── 0004_rename_post_django.cpython-310.pyc │ │ ├── 0004_rename_post_django.cpython-312.pyc │ │ ├── 0005_development_image_django_image_networking_image.cpython-310.pyc │ │ ├── 0005_development_image_django_image_networking_image.cpython-312.pyc │ │ ├── 0006_contactmessage.cpython-310.pyc │ │ ├── 0006_contactmessage.cpython-312.pyc │ │ ├── 0007_alter_visitcounter_count.cpython-310.pyc │ │ ├── 0007_alter_visitcounter_count.cpython-312.pyc │ │ ├── 0008_alter_visitcounter_count.cpython-310.pyc │ │ ├── 0008_alter_visitcounter_count.cpython-312.pyc │ │ ├── 0009_registration.cpython-310.pyc │ │ ├── 0009_registration.cpython-312.pyc │ │ ├── 0010_delete_registration.cpython-310.pyc │ │ ├── __init__.cpython-310.pyc │ │ └── __init__.cpython-312.pyc ├── models.py ├── tests.py ├── urls.py └── views.py ├── Blog_site ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-310.pyc │ ├── __init__.cpython-312.pyc │ ├── settings.cpython-310.pyc │ ├── settings.cpython-312.pyc │ ├── urls.cpython-310.pyc │ ├── urls.cpython-312.pyc │ ├── wsgi.cpython-310.pyc │ └── wsgi.cpython-312.pyc ├── asgi.py ├── settings.py ├── urls.py └── wsgi.py ├── README.md ├── create_post_snapshot.png ├── db.sqlite3 ├── homepage_snapshot.png ├── manage.py ├── media └── images │ ├── Screenshot_from_2024-05-19_01-21-14.png │ └── Screenshot_from_2024-05-19_01-21-14_8qME8TZ.png ├── requirements.txt ├── static └── css │ └── base.css └── templates ├── about.html ├── base.html ├── contact.html ├── contact_success.html ├── create_post.html ├── development.html ├── development_detail.html ├── django.html ├── django_detail.html ├── index.html ├── logged_out.html ├── login.html ├── networking.html ├── networking_detail.html ├── privacy.html ├── register.html ├── sidebar.html ├── social.html └── support.html /.gitignore: -------------------------------------------------------------------------------- 1 | # bite compiled stuff 2 | # __pycache__/ 3 | 4 | # django stuff 5 | # db.sqlite3 6 | 7 | # environment viriables 8 | .venv 9 | .env -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Editor-based HTTP Client requests 5 | /httpRequests/ 6 | # Datasource local storage ignored files 7 | /dataSources/ 8 | /dataSources.local.xml 9 | -------------------------------------------------------------------------------- /.idea/Django-Blog.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | 33 | 34 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Blog_app/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/__init__.py -------------------------------------------------------------------------------- /Blog_app/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_app/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /Blog_app/__pycache__/admin.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/__pycache__/admin.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_app/__pycache__/admin.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/__pycache__/admin.cpython-312.pyc -------------------------------------------------------------------------------- /Blog_app/__pycache__/apps.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/__pycache__/apps.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_app/__pycache__/apps.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/__pycache__/apps.cpython-312.pyc -------------------------------------------------------------------------------- /Blog_app/__pycache__/forms.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/__pycache__/forms.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_app/__pycache__/forms.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/__pycache__/forms.cpython-312.pyc -------------------------------------------------------------------------------- /Blog_app/__pycache__/models.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/__pycache__/models.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_app/__pycache__/models.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/__pycache__/models.cpython-312.pyc -------------------------------------------------------------------------------- /Blog_app/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_app/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /Blog_app/__pycache__/views.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/__pycache__/views.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_app/__pycache__/views.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/__pycache__/views.cpython-312.pyc -------------------------------------------------------------------------------- /Blog_app/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import Django, Networking, Development 3 | 4 | # Register your models here. 5 | 6 | class DjangoAdmin(admin.ModelAdmin): 7 | list_display = ('title', 'slug', 'status','created_on') 8 | list_filter = ("status",) 9 | search_fields = ['title', 'content'] 10 | prepopulated_fields = {'slug': ('title',)} 11 | 12 | admin.site.register(Django, DjangoAdmin) 13 | 14 | class NetworkingAdmin(admin.ModelAdmin): 15 | list_display = ('title', 'slug', 'status','created_on') 16 | list_filter = ("status",) 17 | search_fields = ['title', 'content'] 18 | prepopulated_fields = {'slug': ('title',)} 19 | 20 | admin.site.register(Networking, NetworkingAdmin) 21 | 22 | class DevelopmentAdmin(admin.ModelAdmin): 23 | list_display = ('title', 'slug', 'status','created_on') 24 | list_filter = ("status",) 25 | search_fields = ['title', 'content'] 26 | prepopulated_fields = {'slug': ('title',)} 27 | 28 | admin.site.register(Development, DevelopmentAdmin) -------------------------------------------------------------------------------- /Blog_app/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BlogAppConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'Blog_app' 7 | -------------------------------------------------------------------------------- /Blog_app/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from .models import ContactMessage, Django 3 | from django.contrib.auth.forms import UserCreationForm 4 | from django.contrib.auth.models import User 5 | from django.contrib import messages 6 | 7 | 8 | class RegistrationForm(UserCreationForm): 9 | email = forms.EmailField(required=True) 10 | 11 | class Meta: 12 | model = User 13 | fields = ["username", "email", "password1", "password2"] 14 | 15 | def save(self, commit=True): 16 | user = super().save(commit=False) 17 | user.email = self.cleaned_data["email"] # Ensure email is saved 18 | if commit: 19 | user.save() 20 | messages.success(self.request, "Registration successful. You can now log in.") 21 | return user 22 | class ContactForm(forms.ModelForm): 23 | class Meta: 24 | model = ContactMessage 25 | fields = ['name', 'email', 'message'] 26 | 27 | class DjangoForm(forms.ModelForm): 28 | CATEGORY_CHOICES = [ 29 | ('Django', 'Django'), 30 | ('Networking', 'Networking'), 31 | ('Development', 'Development'), 32 | ] 33 | category = forms.ChoiceField(choices=CATEGORY_CHOICES, label='Category') # Add category field 34 | 35 | class Meta: 36 | model = Django 37 | fields = ['title', 'slug', 'author', 'category', 'content', 'status', 'image'] # Add category field to the form -------------------------------------------------------------------------------- /Blog_app/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.1 on 2024-04-11 07:17 2 | 3 | import django.db.models.deletion 4 | from django.conf import settings 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 14 | ] 15 | 16 | operations = [ 17 | migrations.CreateModel( 18 | name='Post', 19 | fields=[ 20 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 21 | ('title', models.CharField(max_length=200, unique=True)), 22 | ('slug', models.SlugField(max_length=200, unique=True)), 23 | ('updated_on', models.DateTimeField(auto_now=True)), 24 | ('content', models.TextField()), 25 | ('created_on', models.DateTimeField(auto_now_add=True)), 26 | ('status', models.IntegerField(choices=[(0, 'Draft'), (1, 'Publish')], default=0)), 27 | ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='blog_posts', to=settings.AUTH_USER_MODEL)), 28 | ], 29 | options={ 30 | 'ordering': ['-created_on'], 31 | }, 32 | ), 33 | ] 34 | -------------------------------------------------------------------------------- /Blog_app/migrations/0002_visitcounter.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.1 on 2024-04-11 16:58 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('Blog_app', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name='VisitCounter', 15 | fields=[ 16 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 17 | ('count', models.IntegerField(default=0)), 18 | ], 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /Blog_app/migrations/0003_development_networking.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.1 on 2024-04-11 17:40 2 | 3 | import django.db.models.deletion 4 | from django.conf import settings 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('Blog_app', '0002_visitcounter'), 12 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 13 | ] 14 | 15 | operations = [ 16 | migrations.CreateModel( 17 | name='Development', 18 | fields=[ 19 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 20 | ('title', models.CharField(max_length=200, unique=True)), 21 | ('slug', models.SlugField(max_length=200, unique=True)), 22 | ('updated_on', models.DateTimeField(auto_now=True)), 23 | ('content', models.TextField()), 24 | ('created_on', models.DateTimeField(auto_now_add=True)), 25 | ('status', models.IntegerField(choices=[(0, 'Draft'), (1, 'Publish')], default=0)), 26 | ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='development_posts', to=settings.AUTH_USER_MODEL)), 27 | ], 28 | options={ 29 | 'ordering': ['-created_on'], 30 | }, 31 | ), 32 | migrations.CreateModel( 33 | name='Networking', 34 | fields=[ 35 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 36 | ('title', models.CharField(max_length=200, unique=True)), 37 | ('slug', models.SlugField(max_length=200, unique=True)), 38 | ('updated_on', models.DateTimeField(auto_now=True)), 39 | ('content', models.TextField()), 40 | ('created_on', models.DateTimeField(auto_now_add=True)), 41 | ('status', models.IntegerField(choices=[(0, 'Draft'), (1, 'Publish')], default=0)), 42 | ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='networking_posts', to=settings.AUTH_USER_MODEL)), 43 | ], 44 | options={ 45 | 'ordering': ['-created_on'], 46 | }, 47 | ), 48 | ] 49 | -------------------------------------------------------------------------------- /Blog_app/migrations/0004_rename_post_django.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.1 on 2024-04-11 17:58 2 | 3 | from django.conf import settings 4 | from django.db import migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('Blog_app', '0003_development_networking'), 11 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 12 | ] 13 | 14 | operations = [ 15 | migrations.RenameModel( 16 | old_name='Post', 17 | new_name='Django', 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /Blog_app/migrations/0005_development_image_django_image_networking_image.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.1 on 2024-04-12 17:41 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('Blog_app', '0004_rename_post_django'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='development', 15 | name='image', 16 | field=models.ImageField(blank=True, null=True, upload_to='images/'), 17 | ), 18 | migrations.AddField( 19 | model_name='django', 20 | name='image', 21 | field=models.ImageField(blank=True, null=True, upload_to='images/'), 22 | ), 23 | migrations.AddField( 24 | model_name='networking', 25 | name='image', 26 | field=models.ImageField(blank=True, null=True, upload_to='images/'), 27 | ), 28 | ] 29 | -------------------------------------------------------------------------------- /Blog_app/migrations/0006_contactmessage.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.1 on 2024-04-12 20:10 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('Blog_app', '0005_development_image_django_image_networking_image'), 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name='ContactMessage', 15 | fields=[ 16 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 17 | ('name', models.CharField(max_length=100)), 18 | ('email', models.EmailField(max_length=254)), 19 | ('message', models.TextField()), 20 | ('created_at', models.DateTimeField(auto_now_add=True)), 21 | ], 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /Blog_app/migrations/0007_alter_visitcounter_count.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.1 on 2024-04-13 10:08 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('Blog_app', '0006_contactmessage'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='visitcounter', 15 | name='count', 16 | field=models.IntegerField(default=1), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /Blog_app/migrations/0008_alter_visitcounter_count.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.1 on 2024-04-13 10:09 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('Blog_app', '0007_alter_visitcounter_count'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='visitcounter', 15 | name='count', 16 | field=models.IntegerField(default=0), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /Blog_app/migrations/0009_registration.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.1 on 2024-04-30 06:45 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('Blog_app', '0008_alter_visitcounter_count'), 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name='Registration', 15 | fields=[ 16 | ('mes_id', models.AutoField(primary_key=True, serialize=False)), 17 | ('fname', models.CharField(max_length=20)), 18 | ('lname', models.CharField(max_length=20)), 19 | ('email', models.EmailField(default='null', max_length=254)), 20 | ('username', models.CharField(max_length=20)), 21 | ('password', models.CharField(default='', max_length=20)), 22 | ], 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /Blog_app/migrations/0010_delete_registration.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.1 on 2024-05-19 19:57 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('Blog_app', '0009_registration'), 10 | ] 11 | 12 | operations = [ 13 | migrations.DeleteModel( 14 | name='Registration', 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /Blog_app/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__init__.py -------------------------------------------------------------------------------- /Blog_app/migrations/__pycache__/0001_initial.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__pycache__/0001_initial.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_app/migrations/__pycache__/0001_initial.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__pycache__/0001_initial.cpython-312.pyc -------------------------------------------------------------------------------- /Blog_app/migrations/__pycache__/0002_visitcounter.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__pycache__/0002_visitcounter.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_app/migrations/__pycache__/0002_visitcounter.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__pycache__/0002_visitcounter.cpython-312.pyc -------------------------------------------------------------------------------- /Blog_app/migrations/__pycache__/0003_development_networking.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__pycache__/0003_development_networking.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_app/migrations/__pycache__/0003_development_networking.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__pycache__/0003_development_networking.cpython-312.pyc -------------------------------------------------------------------------------- /Blog_app/migrations/__pycache__/0004_rename_post_django.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__pycache__/0004_rename_post_django.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_app/migrations/__pycache__/0004_rename_post_django.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__pycache__/0004_rename_post_django.cpython-312.pyc -------------------------------------------------------------------------------- /Blog_app/migrations/__pycache__/0005_development_image_django_image_networking_image.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__pycache__/0005_development_image_django_image_networking_image.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_app/migrations/__pycache__/0005_development_image_django_image_networking_image.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__pycache__/0005_development_image_django_image_networking_image.cpython-312.pyc -------------------------------------------------------------------------------- /Blog_app/migrations/__pycache__/0006_contactmessage.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__pycache__/0006_contactmessage.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_app/migrations/__pycache__/0006_contactmessage.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__pycache__/0006_contactmessage.cpython-312.pyc -------------------------------------------------------------------------------- /Blog_app/migrations/__pycache__/0007_alter_visitcounter_count.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__pycache__/0007_alter_visitcounter_count.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_app/migrations/__pycache__/0007_alter_visitcounter_count.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__pycache__/0007_alter_visitcounter_count.cpython-312.pyc -------------------------------------------------------------------------------- /Blog_app/migrations/__pycache__/0008_alter_visitcounter_count.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__pycache__/0008_alter_visitcounter_count.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_app/migrations/__pycache__/0008_alter_visitcounter_count.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__pycache__/0008_alter_visitcounter_count.cpython-312.pyc -------------------------------------------------------------------------------- /Blog_app/migrations/__pycache__/0009_registration.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__pycache__/0009_registration.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_app/migrations/__pycache__/0009_registration.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__pycache__/0009_registration.cpython-312.pyc -------------------------------------------------------------------------------- /Blog_app/migrations/__pycache__/0010_delete_registration.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__pycache__/0010_delete_registration.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_app/migrations/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_app/migrations/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_app/migrations/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /Blog_app/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.contrib.auth.models import User 3 | 4 | STATUS = ( 5 | (0, "Draft"), 6 | (1, "Publish") 7 | ) 8 | 9 | class Django(models.Model): 10 | title = models.CharField(max_length=200, unique=True) 11 | slug = models.SlugField(max_length=200, unique=True) 12 | author = models.ForeignKey(User, on_delete=models.CASCADE, related_name='blog_posts') 13 | updated_on = models.DateTimeField(auto_now=True) 14 | content = models.TextField() 15 | created_on = models.DateTimeField(auto_now_add=True) 16 | status = models.IntegerField(choices=STATUS, default=0) 17 | image = models.ImageField(upload_to='images/', blank=True, null=True) 18 | 19 | class Meta: 20 | ordering = ['-created_on'] 21 | 22 | def __str__(self): 23 | return self.title 24 | 25 | class Networking(models.Model): 26 | title = models.CharField(max_length=200, unique=True) 27 | slug = models.SlugField(max_length=200, unique=True) 28 | author = models.ForeignKey(User, on_delete=models.CASCADE, related_name='networking_posts') 29 | updated_on = models.DateTimeField(auto_now=True) 30 | content = models.TextField() 31 | created_on = models.DateTimeField(auto_now_add=True) 32 | status = models.IntegerField(choices=STATUS, default=0) 33 | image = models.ImageField(upload_to='images/', blank=True, null=True) 34 | 35 | class Meta: 36 | ordering = ['-created_on'] 37 | 38 | def __str__(self): 39 | return self.title 40 | 41 | class Development(models.Model): 42 | title = models.CharField(max_length=200, unique=True) 43 | slug = models.SlugField(max_length=200, unique=True) 44 | author = models.ForeignKey(User, on_delete=models.CASCADE, related_name='development_posts') 45 | updated_on = models.DateTimeField(auto_now=True) 46 | content = models.TextField() 47 | created_on = models.DateTimeField(auto_now_add=True) 48 | status = models.IntegerField(choices=STATUS, default=0) 49 | image = models.ImageField(upload_to='images/', blank=True, null=True) 50 | 51 | class Meta: 52 | ordering = ['-created_on'] 53 | 54 | def __str__(self): 55 | return self.title 56 | 57 | class VisitCounter(models.Model): 58 | count = models.IntegerField(default=0) 59 | 60 | class ContactMessage(models.Model): 61 | name = models.CharField(max_length=100) 62 | email = models.EmailField() 63 | message = models.TextField() 64 | created_at = models.DateTimeField(auto_now_add=True) 65 | 66 | def __str__(self): 67 | return self.name -------------------------------------------------------------------------------- /Blog_app/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Blog_app/urls.py: -------------------------------------------------------------------------------- 1 | from . import views 2 | from django.urls import path 3 | from django.conf import settings 4 | from django.conf.urls.static import static 5 | from .views import contact_view, contact_success_view,login_view, register_view 6 | 7 | urlpatterns = [ 8 | path('', views.AllPostsView.as_view(), name='home'), 9 | path('django/', views.DjangoList.as_view(), name='django'), 10 | path('development/', views.DevelopmentList.as_view(), name='development'), 11 | path('networking/', views.NetworkingList.as_view(), name='networking'), 12 | path('privacy/', views.Privacy.as_view(), name='privacy'), 13 | path('about/', views.About.as_view(), name='about'), 14 | path('support/', views.Support.as_view(), name='support'), 15 | path('contact/', contact_view, name='contact'), 16 | path('contact/success/', contact_success_view, name='contact_success'), 17 | path('create_post/', views.create_post, name='create_post'), 18 | path('login/', login_view, name='login'), 19 | path('register/',register_view, name='register'), 20 | path('/', views.DjangoDetail.as_view(), name='django_detail'), 21 | path('development//', views.DevelopmentDetail.as_view(), name='development_detail'), 22 | path('networking//', views.NetworkingDetail.as_view(), name='networking_detail'), 23 | 24 | ] 25 | 26 | if settings.DEBUG: 27 | urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) -------------------------------------------------------------------------------- /Blog_app/views.py: -------------------------------------------------------------------------------- 1 | from django.views import generic 2 | from django.shortcuts import render, redirect 3 | from .forms import ContactForm, DjangoForm, RegistrationForm 4 | from .models import Django, VisitCounter, Networking, Development 5 | from django.contrib.auth import authenticate, login, logout 6 | from django.contrib.auth.decorators import login_required 7 | from django.contrib.auth.mixins import LoginRequiredMixin 8 | 9 | class AllPostsView(LoginRequiredMixin, generic.TemplateView): 10 | login_url = '/login/' # Redirect to /login if not authenticated 11 | redirect_field_name = 'redirect_to' # Optional, specifies the name of a GET field with the URL to redirect to after login 12 | 13 | def get(self, request): 14 | django_posts = Django.objects.filter(status=1) 15 | development_posts = Development.objects.filter(status=1) 16 | networking_posts = Networking.objects.filter(status=1) 17 | 18 | context = self.get_context_data() 19 | context.update({ 20 | 'django_posts': django_posts, 21 | 'development_posts': development_posts, 22 | 'networking_posts': networking_posts 23 | }) 24 | return render(request, 'index.html', context) 25 | 26 | def get_context_data(self, **kwargs): 27 | context = super().get_context_data(**kwargs) 28 | visit_counter, created = VisitCounter.objects.get_or_create() 29 | if created: 30 | visit_counter.save() 31 | visit_counter.count += 1 32 | visit_counter.save() 33 | context['visit_counter'] = visit_counter 34 | return context 35 | 36 | 37 | class DjangoList(generic.ListView): 38 | queryset = Django.objects.filter(status=1).order_by('-created_on') 39 | template_name = 'django.html' 40 | 41 | def get_context_data(self, **kwargs): 42 | context = super().get_context_data(**kwargs) 43 | visit_counter, created = VisitCounter.objects.get_or_create() 44 | if created: 45 | visit_counter.save() 46 | visit_counter.count += 1 47 | visit_counter.save() 48 | context['visit_counter'] = visit_counter 49 | return context 50 | 51 | 52 | class DjangoDetail(generic.DetailView): 53 | model = Django 54 | template_name = 'django_detail.html' 55 | 56 | 57 | class NetworkingList(generic.ListView): 58 | queryset = Networking.objects.filter(status=1).order_by('-created_on') 59 | template_name = 'networking.html' 60 | 61 | def get_context_data(self, **kwargs): 62 | context = super().get_context_data(**kwargs) 63 | visit_counter, created = VisitCounter.objects.get_or_create() 64 | if created: 65 | visit_counter.save() 66 | visit_counter.count += 1 67 | visit_counter.save() 68 | context['visit_counter'] = visit_counter 69 | return context 70 | 71 | 72 | class NetworkingDetail(generic.DetailView): 73 | model = Networking 74 | template_name = 'networking_detail.html' 75 | 76 | 77 | class DevelopmentList(generic.ListView): 78 | queryset = Development.objects.filter(status=1).order_by('-created_on') 79 | template_name = 'development.html' 80 | 81 | def get_context_data(self, **kwargs): 82 | context = super().get_context_data(**kwargs) 83 | visit_counter, created = VisitCounter.objects.get_or_create() 84 | if created: 85 | visit_counter.save() 86 | visit_counter.count += 1 87 | visit_counter.save() 88 | context['visit_counter'] = visit_counter 89 | return context 90 | 91 | 92 | class DevelopmentDetail(generic.DetailView): 93 | model = Development 94 | template_name = 'development_detail.html' 95 | 96 | 97 | class About(generic.TemplateView): 98 | template_name = 'about.html' 99 | 100 | 101 | class Support(generic.TemplateView): 102 | template_name = 'support.html' 103 | 104 | 105 | class Privacy(generic.TemplateView): 106 | template_name = 'privacy.html' 107 | 108 | 109 | def contact_view(request): 110 | if request.method == 'POST': 111 | form = ContactForm(request.POST) 112 | if form.is_valid(): 113 | form.save() 114 | return redirect('contact_success') # Redirect to a success page 115 | else: 116 | form = ContactForm() 117 | return render(request, 'contact.html', {'form': form}) 118 | 119 | 120 | def contact_success_view(request): 121 | return render(request, 'contact_success.html') 122 | 123 | 124 | def create_post(request): 125 | if request.method == 'POST': 126 | form = DjangoForm(request.POST, request.FILES) 127 | if form.is_valid(): 128 | category = form.cleaned_data['category'] 129 | # Depending on the category selected, create the post for the corresponding model 130 | if category == 'Django': 131 | Django.objects.create( 132 | title=form.cleaned_data['title'], 133 | slug=form.cleaned_data['slug'], 134 | author=form.cleaned_data['author'], 135 | content=form.cleaned_data['content'], 136 | status=form.cleaned_data['status'], 137 | image=form.cleaned_data['image'] 138 | ) 139 | elif category == 'Networking': 140 | Networking.objects.create( 141 | title=form.cleaned_data['title'], 142 | slug=form.cleaned_data['slug'], 143 | author=form.cleaned_data['author'], 144 | content=form.cleaned_data['content'], 145 | status=form.cleaned_data['status'], 146 | image=form.cleaned_data['image'] 147 | ) 148 | elif category == 'Development': 149 | Development.objects.create( 150 | title=form.cleaned_data['title'], 151 | slug=form.cleaned_data['slug'], 152 | author=form.cleaned_data['author'], 153 | content=form.cleaned_data['content'], 154 | status=form.cleaned_data['status'], 155 | image=form.cleaned_data['image'] 156 | ) 157 | return redirect('home') 158 | else: 159 | form = DjangoForm() 160 | return render(request, 'create_post.html', {'form': form}) 161 | 162 | 163 | def register_view(request): 164 | if request.method == 'POST': 165 | form = RegistrationForm(request.POST) 166 | if form.is_valid(): 167 | user = form.save() 168 | login(request, user) # Log the user in 169 | return redirect('home') # Redirect to a homepage or another page 170 | else: 171 | form = RegistrationForm() 172 | return render(request, 'register.html', {'form': form}) 173 | 174 | 175 | def login_view(request): 176 | if request.method == 'POST': 177 | username = request.POST['username'] 178 | password = request.POST['password'] 179 | user = authenticate(request, username=username, password=password) 180 | if user is not None: 181 | login(request, user) 182 | return redirect('home') 183 | else: 184 | return render(request, 'login.html', {'error': 'Invalid username or password'}) 185 | else: 186 | return render(request, 'login.html') 187 | -------------------------------------------------------------------------------- /Blog_site/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_site/__init__.py -------------------------------------------------------------------------------- /Blog_site/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_site/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_site/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_site/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /Blog_site/__pycache__/settings.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_site/__pycache__/settings.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_site/__pycache__/settings.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_site/__pycache__/settings.cpython-312.pyc -------------------------------------------------------------------------------- /Blog_site/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_site/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_site/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_site/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /Blog_site/__pycache__/wsgi.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_site/__pycache__/wsgi.cpython-310.pyc -------------------------------------------------------------------------------- /Blog_site/__pycache__/wsgi.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/Blog_site/__pycache__/wsgi.cpython-312.pyc -------------------------------------------------------------------------------- /Blog_site/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for Blog_site project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Blog_site.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Blog_site/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for Blog_site project. 3 | 4 | Generated by 'django-admin startproject' using Django 5.0.1. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/5.0/ref/settings/ 11 | """ 12 | 13 | import os 14 | from pathlib import Path 15 | 16 | # Build paths inside the project like this: BASE_DIR / 'subdir'. 17 | BASE_DIR = Path(__file__).resolve().parent.parent 18 | 19 | 20 | # Quick-start development settings - unsuitable for production 21 | # See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/ 22 | 23 | # SECURITY WARNING: keep the secret key used in production secret! 24 | SECRET_KEY = 'django-insecure-79g$-9m064)mdrn81j4lf_@zlj2o1p2q+tr^5hq)8_cqcc6%wx' 25 | 26 | # SECURITY WARNING: don't run with debug turned on in production! 27 | DEBUG = True 28 | 29 | ALLOWED_HOSTS = ["*"] 30 | 31 | 32 | # Application definition 33 | 34 | INSTALLED_APPS = [ 35 | 'django.contrib.admin', 36 | 'django.contrib.auth', 37 | 'django.contrib.contenttypes', 38 | 'django.contrib.sessions', 39 | 'django.contrib.messages', 40 | 'django.contrib.staticfiles', 41 | 'Blog_app' 42 | ] 43 | 44 | MIDDLEWARE = [ 45 | 'django.middleware.security.SecurityMiddleware', 46 | 'django.contrib.sessions.middleware.SessionMiddleware', 47 | 'django.middleware.common.CommonMiddleware', 48 | 'django.middleware.csrf.CsrfViewMiddleware', 49 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 50 | 'django.contrib.messages.middleware.MessageMiddleware', 51 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 52 | ] 53 | 54 | ROOT_URLCONF = 'Blog_site.urls' 55 | 56 | TEMPLATES = [ 57 | { 58 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 59 | 'DIRS': [BASE_DIR, 'templates'], 60 | 'APP_DIRS': True, 61 | 'OPTIONS': { 62 | 'context_processors': [ 63 | 'django.template.context_processors.debug', 64 | 'django.template.context_processors.request', 65 | 'django.contrib.auth.context_processors.auth', 66 | 'django.contrib.messages.context_processors.messages', 67 | ], 68 | }, 69 | }, 70 | ] 71 | 72 | WSGI_APPLICATION = 'Blog_site.wsgi.application' 73 | 74 | 75 | # Database 76 | # https://docs.djangoproject.com/en/5.0/ref/settings/#databases 77 | 78 | DATABASES = { 79 | 'default': { 80 | 'ENGINE': 'django.db.backends.sqlite3', 81 | 'NAME': BASE_DIR / 'db.sqlite3', 82 | } 83 | } 84 | 85 | # Password validation 86 | # https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators 87 | 88 | AUTH_PASSWORD_VALIDATORS = [ 89 | { 90 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 91 | }, 92 | { 93 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 94 | }, 95 | { 96 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 97 | }, 98 | { 99 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 100 | }, 101 | ] 102 | 103 | 104 | # Internationalization 105 | # https://docs.djangoproject.com/en/5.0/topics/i18n/ 106 | 107 | LANGUAGE_CODE = 'en-us' 108 | 109 | TIME_ZONE = 'UTC' 110 | 111 | USE_I18N = True 112 | 113 | USE_TZ = True 114 | 115 | 116 | # Static files (CSS, JavaScript, Images) 117 | # https://docs.djangoproject.com/en/5.0/howto/static-files/ 118 | 119 | STATIC_URL = 'static/' 120 | 121 | STATICFILES_DIRS = ( 122 | os.path.join(BASE_DIR, 'static'), 123 | ) 124 | 125 | MEDIA_URL ='media/' 126 | MEDIA_ROOT = os.path.join(BASE_DIR, 'media') 127 | 128 | 129 | # Default primary key field type 130 | # https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field 131 | 132 | DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' 133 | -------------------------------------------------------------------------------- /Blog_site/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | URL configuration for Blog_site project. 3 | 4 | The `urlpatterns` list routes URLs to views. For more information please see: 5 | https://docs.djangoproject.com/en/5.0/topics/http/urls/ 6 | Examples: 7 | Function views 8 | 1. Add an import: from my_app import views 9 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 10 | Class-based views 11 | 1. Add an import: from other_app.views import Home 12 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 13 | Including another URLconf 14 | 1. Import the include() function: from django.urls import include, path 15 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 16 | """ 17 | from django.contrib import admin 18 | from django.urls import include, path 19 | 20 | from django.conf.urls.static import static 21 | from django.conf import settings 22 | 23 | urlpatterns = [ 24 | path('admin/', admin.site.urls), 25 | path('', include('Blog_app.urls')), 26 | ]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 27 | -------------------------------------------------------------------------------- /Blog_site/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for Blog_site project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Blog_site.settings') 15 | 16 | application = get_wsgi_application() 17 | 18 | app = application 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Django Blog: A Platform for Sharing Articles 3 | 4 | This Django-based web application serves as a platform for posting articles across various categories such as Django, Networking, and Development. Users can view existing articles, register on the platform, and create their own posts. 5 | 6 | --- 7 | 8 | ### Setup Instructions: 9 | 10 | 1. **Clone the Repository:** 11 | ```bash 12 | git clone https://github.com/AvinashAnand02/Django-Blog.git 13 | cd Django_Blog 14 | ``` 15 | 16 | 2. **Install Dependencies:** 17 | ```bash 18 | pip install -r requirements.txt 19 | ``` 20 | 21 | 3. **Apply Migrations:** 22 | ```bash 23 | python manage.py migrate 24 | ``` 25 | 26 | 4. **Create Superuser (Optional):** 27 | ```bash 28 | python manage.py createsuperuser 29 | ``` 30 | 31 | 5. **Run the Development Server:** 32 | ```bash 33 | python manage.py runserver 34 | ``` 35 | 36 | 6. **Access the Application:** 37 | - Open your web browser and navigate to [http://127.0.0.1:8000/](http://127.0.0.1:8000/) to view the homepage. 38 | - Access the admin panel at [http://127.0.0.1:8000/admin/](http://127.0.0.1:8000/admin/) to manage users and articles (requires superuser credentials). 39 | 40 | ### Usage: 41 | 42 | - **View Articles:** Users can browse articles on the homepage, categorized by Django, Networking, and Development. 43 | - **Create Post:** Authenticated users can create new posts by filling out the "Create Post" form. 44 | - **Contact:** Users can send messages via the contact form, accessible from the navigation bar. 45 | 46 | ### Additional Notes: 47 | 48 | - Ensure that Django and Python are installed on your system before proceeding with the setup. 49 | - Customize the application as needed by modifying templates, views, and models according to specific requirements. 50 | - For production deployment, configure settings such as DEBUG, ALLOWED_HOSTS, and database settings appropriately in `settings.py`. 51 | - Refer to Django's official documentation for detailed information on Django usage and deployment. 52 | 53 | ### Screenshots: 54 | 55 | Here are some snapshots of the application: 56 | 57 | 1. Homepage: 58 | ![Homepage](homepage_snapshot.png) 59 | 60 | 2. Article Creation Form: 61 | ![Create Post Form](create_post_snapshot.png) 62 | 63 | ### Live Demo: 64 | 65 | Check out the live demo of the application at [https://django-blog-pl3x.onrender.com/](https://django-blog-pl3x.onrender.com/). 66 | 67 | ### Author: 68 | [Avinash Anand](https://avinashanand.me/) 69 | 70 | ### License: 71 | This project is licensed under the [MIT License](https://opensource.org/licenses/MIT). 72 | 73 |

📬 Contact

74 | 75 | If you want to contact me, you can reach me through below social handles. 76 | 77 |
78 | 79 | 80 | WhatsApp 81 | LinkedIn 82 | 83 | Gmail 84 | 85 |
86 | 87 | --- 88 | -------------------------------------------------------------------------------- /create_post_snapshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/create_post_snapshot.png -------------------------------------------------------------------------------- /db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/db.sqlite3 -------------------------------------------------------------------------------- /homepage_snapshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/homepage_snapshot.png -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Blog_site.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /media/images/Screenshot_from_2024-05-19_01-21-14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/media/images/Screenshot_from_2024-05-19_01-21-14.png -------------------------------------------------------------------------------- /media/images/Screenshot_from_2024-05-19_01-21-14_8qME8TZ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvinashAnand02/Django-Blog/bf52c3ad45e234cf740d60cf07002ba4901dd74e/media/images/Screenshot_from_2024-05-19_01-21-14_8qME8TZ.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | asgiref<=3.7.2 2 | Django<=5.0.1 3 | npm<=0.1.1 4 | optional-django<=0.1.0 5 | pillow<=10.3.0 6 | sqlparse<=0.4.4 7 | tzdata<=2023.4 8 | gunicorn 9 | -------------------------------------------------------------------------------- /static/css/base.css: -------------------------------------------------------------------------------- 1 | @import url(//fonts.googleapis.com/css?family=Muli); 2 | 3 | body { 4 | margin: 0; 5 | padding: 0; 6 | font-family: helvetica, sans-serif; 7 | } 8 | 9 | p { 10 | line-height: 1.8; 11 | } 12 | 13 | a { 14 | color: #026efd; 15 | text-decoration: none; 16 | } 17 | 18 | a:hover { 19 | color: #026efd; 20 | } 21 | 22 | h1, h2, h3, h4, h5, h6 { font-family: 'Muli', sans-serif; font-weight: normal; } 23 | 24 | h1 { 25 | border-bottom: 1px solid #bbb; 26 | padding: 0 0 10px 0; 27 | margin: 10px 0 20px 0; 28 | } 29 | 30 | h2 { 31 | margin: 30px 0 20px; 32 | } 33 | 34 | ol { 35 | line-height: 1.5; 36 | } 37 | 38 | /* CSS for header */ 39 | 40 | #header { 41 | padding: 10px 100px; 42 | font-size: 20px; 43 | background: #026efd; 44 | color: #fff; 45 | border-bottom: 10px solid #026efd; 46 | overflow: auto; 47 | } 48 | 49 | #header .logo { 50 | font-family: 'Muli', sans-serif; 51 | float: left; 52 | color: #f3f7cc; 53 | font-size: 28px; 54 | margin-left: 40px; 55 | font-weight: bolder; 56 | margin-top: 2%; 57 | } 58 | 59 | #header ul.menu { 60 | list-style: none; 61 | float: left; 62 | margin-left: 15%; 63 | margin-top: 2%; 64 | } 65 | 66 | #header ul.menu li { 67 | float: left; 68 | padding: 4px 10px; 69 | } 70 | 71 | #header ul.menu li.selected a:hover { 72 | color: #026efd; 73 | font-weight: bold; 74 | } 75 | 76 | #header a { 77 | color: #f3f7cc; 78 | } 79 | 80 | #header a:hover { 81 | color: #fff; 82 | } 83 | 84 | #header .user { 85 | float: right; 86 | padding-top: 4px; 87 | } 88 | 89 | /* css for content */ 90 | #content { 91 | padding: 30px 100px; 92 | } 93 | 94 | /* Forms */ 95 | form { 96 | overflow: auto; 97 | } 98 | 99 | form p { 100 | width: 100%; 101 | overflow: auto; 102 | } 103 | 104 | label { 105 | float: left; 106 | clear: both; 107 | color: #333; 108 | margin-bottom: 4px; 109 | } 110 | 111 | label, textarea { 112 | clear: both; 113 | 114 | margin: 0 15px 10px; 115 | background: #f3f7cc; 116 | border: 0; 117 | padding: 6px 10px; 118 | font-size: 14px; 119 | } 120 | 121 | input[type=submit], a.button { 122 | font-weight: bold; 123 | background: #026efd; 124 | color: #fff; 125 | padding: 10px 20px; 126 | font-size: 14px; 127 | text-transform: uppercase; 128 | } 129 | 130 | .errorlist { 131 | color: #cc0033; 132 | float: left; 133 | clear: both; 134 | padding-left: 10px; 135 | } 136 | 137 | .helptext { 138 | margin: 0 0 20px 0; 139 | color: #aaa; 140 | clear: both; 141 | float: left; 142 | font-size: 13px; 143 | } 144 | 145 | /* Message */ 146 | ul.messages { 147 | margin: 10px 100px; 148 | padding: 0; 149 | list-style-type: none; 150 | } 151 | 152 | ul.messages li.sucess, 153 | ul.messages li.warning, 154 | ul.messages li.error, 155 | ul.messages li.info { 156 | margin: 0; 157 | padding: 14px 20px; 158 | list-style: none; 159 | color: #fff; 160 | } 161 | 162 | ul.messages li.success { 163 | background: #81ce81; 164 | } 165 | 166 | ul.messages li.success a { 167 | color: #0ac33e; 168 | } 169 | 170 | ul.messages li.error { 171 | background: #a30029; 172 | color: #e98283; 173 | } 174 | 175 | ul.messages li.error a { 176 | color: #e98283; 177 | } 178 | 179 | ul.messages li.info { 180 | background: #faffae; 181 | color: #696b4e; 182 | } 183 | 184 | ul.messages li.info a { 185 | color: #1586de; 186 | } 187 | 188 | ul.messages li.warning { 189 | background: #de9404; 190 | } 191 | 192 | ul.messages li.warning a { 193 | color: #f49000; 194 | } 195 | 196 | ul.messages li a.close { 197 | margin: 0; 198 | float: right; 199 | opacity: 1; 200 | border: 0; 201 | box-shadow: none; 202 | text-shadow: none; 203 | } 204 | 205 | .login-form { 206 | float: left; 207 | } -------------------------------------------------------------------------------- /templates/about.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} {% block content %} 2 | 42 |
43 |
44 |
45 |
46 |

About Us

47 |

48 | Welcome to GiggleGate! We are a passionate community of writers, 49 | thinkers, and creators who love to share our thoughts and ideas with 50 | the world. Our platform provides a space for individuals to express 51 | themselves, connect with like-minded individuals, and engage in 52 | meaningful discussions. 53 |

54 |

55 | At GiggleGate, we believe in the power of storytelling. Whether 56 | you're sharing personal experiences, discussing current events, or 57 | exploring new ideas, our platform is here to support and amplify your 58 | voice. 59 |

60 |

61 | Our team is dedicated to creating a welcoming and inclusive 62 | environment for all members of our community. We value diversity, 63 | empathy, and respect, and strive to foster a positive and supportive 64 | atmosphere for everyone. 65 |

66 |
67 | 68 |
69 |

Our Mission

70 |

71 | Our mission at GiggleGate is to empower individuals to share their 72 | voices, foster meaningful connections, and inspire positive change 73 | through storytelling. 74 |

75 |
76 | 77 |
78 |

Our Values

79 |
    80 |
  • 81 | Inclusivity: We celebrate diversity and welcome 82 | individuals from all backgrounds and perspectives. 83 |
  • 84 |
  • 85 | Empathy: We strive to understand and empathize with 86 | the experiences and viewpoints of others. 87 |
  • 88 |
  • 89 | Integrity: We uphold honesty, transparency, and 90 | ethical standards in everything we do. 91 |
  • 92 |
  • 93 | Community: We believe in the power of community and 94 | the importance of supporting and uplifting one another. 95 |
  • 96 |
  • 97 | Creativity: We encourage creative expression and 98 | innovation in storytelling. 99 |
  • 100 |
101 |
102 | 103 |
104 |

Contact Us

105 |

106 | If you have any questions, feedback, or suggestions, please don't 107 | hesitate to contact us. We'd love to hear from you! 108 |

109 |

Email: GiggleGate@gmail.com

110 |

Phone: +91-7739465519

111 |
112 |
113 |
114 |
115 | {% endblock %} 116 | -------------------------------------------------------------------------------- /templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | GiggleGate 9 | 10 | 12 | 13 | 14 | 15 | 56 | 57 | 58 | 59 | 60 |
91 | 92 | 93 | {% block content %} 94 | 95 | {% endblock content %} 96 | 97 | {% block social %} 98 | {% include 'social.html' %} 99 | {% endblock social %} 100 | 101 | 102 |
103 |
104 |

© 2024 Django Blog. All rights reserved.

105 |
106 |
107 | 108 | 109 | 112 | 115 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /templates/contact.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Contact Form 7 | 8 | 9 | 59 | 60 | 61 | {% extends "base.html" %} 62 | {% block content %} 63 |
64 |
65 |
66 |
67 |
68 |

Contact Us

69 |
70 |
71 |
72 | {% csrf_token %} 73 | {{ form.as_p }} 74 | 75 |
76 |
77 |
78 |
79 |
80 |
81 | {% endblock content %} 82 | 83 | 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /templates/contact_success.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Contact Form Submission Successful 6 | 7 | 34 | 35 | 36 |
37 |

Thank you for contacting us!

38 |

We'll get back to you as soon as possible.

39 |
40 | Back to Home 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /templates/create_post.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Create New Post 5 | 46 | 47 | 48 | {% extends "base.html" %} 49 | {% block content %} 50 |

Create New Post

51 |
52 | {% csrf_token %} 53 | {{ form.as_p }} 54 | 55 |
56 | {% endblock content %} 57 | {% block social %} 58 | {% include 'social.html' %} 59 | {% endblock social %} 60 | 61 | 62 | -------------------------------------------------------------------------------- /templates/development.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {% extends "base.html" %} 11 | {% block content %} 12 | 28 | 29 |
30 |
31 |

Development Blog

32 |

A platform to share your thoughts and ideas.

33 |
34 |
35 |
36 |
37 | 38 |
39 | {% for development in development_list %} 40 |
41 |
42 |

{{ development.title }}

43 |

{{ development.author }} | {{ development.created_on}}

44 |

{{development.content|slice:":200" }}

45 | Read More → 46 |
47 |
48 | {% endfor %} 49 |
50 | {% block sidebar %} {% include 'sidebar.html' %} {% endblock sidebar %} 51 |
52 |
53 | {% endblock %} 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /templates/development_detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block content %} 4 | 18 |
19 |
20 |
21 |
22 |
23 | 24 |

{% block title %}{{ object.title }}{% endblock title %}

25 |

{{ development.author }} | {{ development.created_on }}

26 | {% if development.image %} 27 | {{ development.title }} 28 | {% endif %} 29 |

{{ object.content | safe }}

30 |
31 |
32 |
33 |
34 |
35 | {% endblock content %} -------------------------------------------------------------------------------- /templates/django.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {% extends "base.html" %} 11 | {% block content %} 12 | 28 | 29 |
30 |
31 |

Django Blog

32 |

A platform to share your thoughts and ideas.

33 |
34 |
35 |
36 |
37 | 38 |
39 | {% for django in django_list %} 40 |
41 |
42 |

{{ django.title }}

43 |

{{ django.author }} | {{ django.created_on}}

44 |

{{django.content|slice:":200" }}

45 | Read More → 46 |
47 |
48 | {% endfor %} 49 |
50 | {% block sidebar %} {% include 'sidebar.html' %} {% endblock sidebar %} 51 |
52 |
53 | {%endblock%} 54 | 55 | 56 | -------------------------------------------------------------------------------- /templates/django_detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block content %} 4 | 18 |
19 |
20 |
21 |
22 |
23 | 24 | {% if django.image %} 25 | {{ development.title }} 26 | {% endif %} 27 |

{% block title %}{{ object.title }}{% endblock title %}

28 |

{{ django.author }} | {{ django.created_on }}

29 |

{{ object.content | safe }}

30 |
31 |
32 |
33 |
34 |
35 | {% endblock content %} 36 | -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 17 | 18 | 19 | {% extends "base.html" %} 20 | {% block content %} 21 |
22 |
23 |
24 |
25 | {% for django in django_posts %} 26 |
27 |
28 |
29 |

{{ django.title }}

30 |

31 | {{ django.author }} | {{ django.created_on}} 32 |

33 |

{{django.content|slice:":200" }}

34 | Read More → 35 |
36 |
37 |
38 | {% endfor %} 39 | {% for development in development_posts %} 40 |
41 |
42 |
43 |

{{ development.title }}

44 |

45 | {{ development.author }} | {{ development.created_on}} 46 |

47 |

{{development.content|slice:":200" }}

48 | Read More → 49 |
50 |
51 |
52 | {% endfor %} 53 | {% for networking in networking_posts %} 54 |
55 |
56 |
57 |

{{ networking.title }}

58 |

59 | {{ networking.author }} | {{ networking.created_on}} 60 |

61 |

{{networking.content|slice:":200" }}

62 | Read More → 63 |
64 |
65 |
66 | {% endfor %} 67 |
68 |
69 | {% block sidebar %} 70 | {% include 'sidebar.html' %} 71 | {% endblock sidebar %} 72 |
73 |
74 | {% endblock %} 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /templates/logged_out.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% block title %}Logged Out{% endblock %} 3 | 4 | {% block content %} 5 |

Logged Out

6 |

7 | You have been successfully logged out. 8 | you can log-in again. 9 |

10 | {% endblock %} 11 | -------------------------------------------------------------------------------- /templates/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Login 6 | 64 | 65 | 66 |
67 | {% csrf_token %} 68 |

Login

69 |
70 | 71 | 72 |
73 |
74 | 75 | 76 |
77 |
78 | 79 |

Don't have an account? Register here

80 |
81 | {% if error %} 82 |

{{ error }}

83 | {% endif %} 84 |
85 | 86 | 87 | -------------------------------------------------------------------------------- /templates/networking.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {% extends "base.html" %} 11 | {% block content %} 12 | 28 | 29 |
30 |
31 |

Networking Blog

32 |

A platform to share your thoughts and ideas.

33 |
34 |
35 |
36 |
37 | 38 |
39 | {% for networking in networking_list %} 40 |
41 |
42 |

{{ networking.title }}

43 |

{{ networking.author }} | {{ networking.created_on}}

44 |

{{networking.content|slice:":200" }}

45 | Read More → 46 |
47 |
48 | {% endfor %} 49 |
50 | {% block sidebar %} {% include 'sidebar.html' %} {% endblock sidebar %} 51 |
52 |
53 | {%endblock%} 54 | 55 | 56 | -------------------------------------------------------------------------------- /templates/networking_detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block content %} 4 | 18 |
19 |
20 |
21 |
22 |
23 | 24 |

{% block title %}{{ object.title }}{% endblock title %}

25 | {% if networking.image %} 26 | {{ development.title }} 27 | {% endif %} 28 |

{{ networking.author }} | {{ networking.created_on }}

29 |

{{ object.content | safe }}

30 |
31 |
32 |
33 |
34 |
35 | {% endblock content %} -------------------------------------------------------------------------------- /templates/privacy.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} {% block content %} 2 | 3 | 33 |
34 |
35 |
36 |
37 |

Privacy Policy

38 |

39 | Welcome to our website! We're dedicated to safeguarding your privacy. 40 | Our privacy policy outlines our commitment to protecting your data. We 41 | ensure transparency in how we collect and use information. Your trust 42 | is paramount, and we prioritize the security of your personal data. 43 | Contact us with any inquiries. 44 |

45 | 46 |

Information We Collect

47 |

48 | We may collect personal information that you provide to us when you 49 | interact with our website. This information may include: 50 |

51 |
    52 |
  • 53 | Contact Information: Such as your name, email address, and phone 54 | number, which you provide when contacting us or signing up for our 55 | newsletter. 56 |
  • 57 |
  • 58 | Usage Information: Such as your IP address, browser type, and device 59 | information collected automatically when you visit our website. 60 |
  • 61 |
62 | 63 |

How We Use Your Information

64 |

65 | We use the information we collect for the following purposes: 66 |

67 |
    68 |
  • To provide and maintain our website.
  • 69 |
  • 70 | To communicate with you, respond to your inquiries, and provide 71 | customer support. 72 |
  • 73 |
  • 74 | To analyze trends, monitor the usage of our website, and improve our 75 | services. 76 |
  • 77 |
  • 78 | To send you promotional emails and updates about our products or 79 | services, if you have opted in to receive such communications. 80 |
  • 81 |
82 | 83 |

Information Sharing

84 |

85 | We may share your personal information with third-party service 86 | providers who assist us in operating our website, conducting our 87 | business, or providing services to you. These third parties are 88 | obligated to protect your information and only use it for the purposes 89 | specified by us.
90 | We may also disclose your information in response to a legal request, 91 | such as a subpoena or court order, or when we believe it is necessary 92 | to protect our rights, property, or safety, or the rights, property, 93 | or safety of others. 94 |

95 | 96 |

Data Security

97 |

98 | We take reasonable measures to protect your personal information from 99 | unauthorized access, use, or disclosure. However, no method of 100 | transmission over the internet or electronic storage is 100% secure, 101 | and we cannot guarantee the absolute security of your data. 102 |

103 | 104 |

Changes to This Privacy Policy

105 |

106 | We may update this Privacy Policy from time to time to reflect changes 107 | in our practices or legal requirements. We will notify you of any 108 | material changes by posting the new Privacy Policy on this page. 109 |

110 | 111 |

Contact Us

112 |

113 | Contact Us: If you have any questions or concerns about this Privacy 114 | Policy or our practices regarding your personal information, please 115 | contact us at 116 | GiggleGate@gmail.com. 117 |

118 |
119 |
120 |
121 |
122 | {% endblock %} 123 | -------------------------------------------------------------------------------- /templates/register.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Register 6 | 59 | 60 | 61 |
62 | {% csrf_token %} 63 |

Register

64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |

Already have an account? Login Now

79 |
80 | 81 | 82 | -------------------------------------------------------------------------------- /templates/sidebar.html: -------------------------------------------------------------------------------- 1 | {% block sidebar %} 2 | 3 | 41 | 42 | 43 |
44 |
45 |
About Us
46 |
47 |

This awesome blog is made on the top of our favorite full-stack framework 'Django'.

48 | Know more! 49 |
50 |
51 |
52 |
Privacy & Policy
53 |
54 |

Our commitment to protecting your personal information and data privacy.

55 | Know more! 56 |
57 |
58 |
59 |
Visitors
60 |
61 |

Number of visitors: {{ visit_counter.count }}

62 |
63 |
64 |
65 | 66 | {% endblock sidebar %} -------------------------------------------------------------------------------- /templates/social.html: -------------------------------------------------------------------------------- 1 | {% block social%} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 55 | 56 | 57 | 58 | 59 | 65 | 66 |
67 |
68 | {% block content %} 69 | 70 | {% endblock %} 71 |
72 |
73 | 74 | 75 | 76 | {% endblock %} 77 | -------------------------------------------------------------------------------- /templates/support.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 69 | 70 | 71 | 72 | {% extends 'base.html' %} 73 | {% block content %} 74 | 160 | {% endblock content %} 161 | 162 | 163 | 164 | --------------------------------------------------------------------------------