Skip to content

Commit adb5962

Browse files
committed
Initialized python Code of Resume app
1 parent 73f54ff commit adb5962

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2783
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1,25 @@
1-
print("Hello")
1+
class Base1():
2+
def __init__(self):
3+
self.str1 = "base1"
4+
print("base1")
5+
6+
7+
class Base2():
8+
def __init__(self):
9+
self.str2 = "base2"
10+
print("base2")
11+
12+
class Derived(Base1,Base2):
13+
def __init__(self):
14+
Base1.__init__(self)
15+
Base2.__init__(self)
16+
print("Derived")
17+
#super().__init__()
18+
19+
def print_str(self):
20+
print(self.str1,self.str2)
21+
22+
obj = Derived()
23+
obj.print_str()
24+
25+

Django_Apps/my_resume/db.sqlite3

192 KB
Binary file not shown.

Django_Apps/my_resume/main/__init__.py

Whitespace-only changes.

Django_Apps/my_resume/main/admin.py

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
from django.contrib import admin
2+
from . models import (
3+
UserProfile,
4+
ContactProfile,
5+
Testimonial,
6+
Media,
7+
Portfolio,
8+
Blog,
9+
Certificate,
10+
Skill
11+
)
12+
13+
14+
@admin.register(UserProfile)
15+
class UserProfileAdmin(admin.ModelAdmin):
16+
list_display = ('id', 'user')
17+
18+
@admin.register(ContactProfile)
19+
class ContactAdmin(admin.ModelAdmin):
20+
list_display = ('id', 'timestamp', 'name',)
21+
22+
@admin.register(Testimonial)
23+
class TestimonialAdmin(admin.ModelAdmin):
24+
list_display = ('id','name','is_active')
25+
26+
@admin.register(Media)
27+
class MediaAdmin(admin.ModelAdmin):
28+
list_display = ('id', 'name')
29+
30+
@admin.register(Portfolio)
31+
class PortfolioAdmin(admin.ModelAdmin):
32+
list_display = ('id','name','is_active')
33+
readonly_fields = ('slug',)
34+
35+
@admin.register(Blog)
36+
class BlogAdmin(admin.ModelAdmin):
37+
list_display = ('id','name','is_active')
38+
readonly_fields = ('slug',)
39+
40+
@admin.register(Certificate)
41+
class CertificateAdmin(admin.ModelAdmin):
42+
list_display = ('id','name')
43+
44+
@admin.register(Skill)
45+
class SkillAdmin(admin.ModelAdmin):
46+
list_display = ('id','name','score')

Django_Apps/my_resume/main/apps.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from django.apps import AppConfig
2+
3+
4+
class MainConfig(AppConfig):
5+
default_auto_field = 'django.db.models.BigAutoField'
6+
name = 'main'
7+
8+
9+
def ready(self):
10+
import main.signals

Django_Apps/my_resume/main/forms.py

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
from django import forms
2+
from .models import ContactProfile
3+
4+
5+
class ContactForm(forms.ModelForm):
6+
7+
name = forms.CharField(max_length=100, required=True,
8+
widget=forms.TextInput(attrs={
9+
'placeholder': '*Full name..',
10+
}))
11+
email = forms.EmailField(max_length=254, required=True,
12+
widget=forms.TextInput(attrs={
13+
'placeholder': '*Email..',
14+
}))
15+
message = forms.CharField(max_length=1000, required=True,
16+
widget=forms.Textarea(attrs={
17+
'placeholder': '*Message..',
18+
'rows': 6,
19+
}))
20+
21+
22+
class Meta:
23+
model = ContactProfile
24+
fields = ('name', 'email', 'message',)
25+
26+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# Generated by Django 3.2.8 on 2021-10-29 13:11
2+
3+
import ckeditor.fields
4+
from django.conf import settings
5+
from django.db import migrations, models
6+
import django.db.models.deletion
7+
8+
9+
class Migration(migrations.Migration):
10+
11+
initial = True
12+
13+
dependencies = [
14+
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
15+
]
16+
17+
operations = [
18+
migrations.CreateModel(
19+
name='Blog',
20+
fields=[
21+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
22+
('timestamp', models.DateTimeField(auto_now_add=True)),
23+
('author', models.CharField(blank=True, max_length=200, null=True)),
24+
('name', models.CharField(blank=True, max_length=200, null=True)),
25+
('description', models.CharField(blank=True, max_length=500, null=True)),
26+
('body', ckeditor.fields.RichTextField(blank=True, null=True)),
27+
('slug', models.SlugField(blank=True, null=True)),
28+
('image', models.ImageField(blank=True, null=True, upload_to='blog')),
29+
('is_active', models.BooleanField(default=True)),
30+
],
31+
options={
32+
'verbose_name': 'Blog',
33+
'verbose_name_plural': 'Blog Profiles',
34+
'ordering': ['timestamp'],
35+
},
36+
),
37+
migrations.CreateModel(
38+
name='Certificate',
39+
fields=[
40+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
41+
('date', models.DateTimeField(blank=True, null=True)),
42+
('name', models.CharField(blank=True, max_length=50, null=True)),
43+
('title', models.CharField(blank=True, max_length=200, null=True)),
44+
('description', models.CharField(blank=True, max_length=500, null=True)),
45+
('is_active', models.BooleanField(default=True)),
46+
],
47+
options={
48+
'verbose_name': 'Certificate',
49+
'verbose_name_plural': 'Certificates',
50+
},
51+
),
52+
migrations.CreateModel(
53+
name='ContactProfile',
54+
fields=[
55+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
56+
('timestamp', models.DateTimeField(auto_now_add=True)),
57+
('name', models.CharField(max_length=100, verbose_name='Name')),
58+
('email', models.EmailField(max_length=254, verbose_name='Email')),
59+
('message', models.TextField(verbose_name='Message')),
60+
],
61+
options={
62+
'verbose_name': 'Contact Profile',
63+
'verbose_name_plural': 'Contact Profiles',
64+
},
65+
),
66+
migrations.CreateModel(
67+
name='Media',
68+
fields=[
69+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
70+
('image', models.ImageField(blank=True, null=True, upload_to='media')),
71+
('url', models.URLField(blank=True, null=True)),
72+
('name', models.CharField(blank=True, max_length=200, null=True)),
73+
('is_image', models.BooleanField(default=True)),
74+
],
75+
options={
76+
'verbose_name': 'Media',
77+
'verbose_name_plural': 'Media Files',
78+
'ordering': ['name'],
79+
},
80+
),
81+
migrations.CreateModel(
82+
name='Portfolio',
83+
fields=[
84+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
85+
('date', models.DateTimeField(blank=True, null=True)),
86+
('name', models.CharField(blank=True, max_length=200, null=True)),
87+
('description', models.CharField(blank=True, max_length=500, null=True)),
88+
('body', ckeditor.fields.RichTextField(blank=True, null=True)),
89+
('image', models.ImageField(blank=True, null=True, upload_to='portfolio')),
90+
('slug', models.SlugField(blank=True, null=True)),
91+
('is_active', models.BooleanField(default=True)),
92+
],
93+
options={
94+
'verbose_name': 'Portfolio',
95+
'verbose_name_plural': 'Portfolio Profiles',
96+
'ordering': ['name'],
97+
},
98+
),
99+
migrations.CreateModel(
100+
name='Skill',
101+
fields=[
102+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
103+
('name', models.CharField(blank=True, max_length=20, null=True)),
104+
('score', models.IntegerField(blank=True, default=80, null=True)),
105+
('image', models.FileField(blank=True, null=True, upload_to='skills')),
106+
('is_key_skill', models.BooleanField(default=False)),
107+
],
108+
options={
109+
'verbose_name': 'Skill',
110+
'verbose_name_plural': 'Skills',
111+
},
112+
),
113+
migrations.CreateModel(
114+
name='Testimonial',
115+
fields=[
116+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
117+
('thumbnail', models.ImageField(blank=True, null=True, upload_to='thumbnail')),
118+
('name', models.CharField(blank=True, max_length=200, null=True)),
119+
('role', models.CharField(blank=True, max_length=200, null=True)),
120+
('quote', models.CharField(blank=True, max_length=500, null=True)),
121+
('is_active', models.BooleanField(default=True)),
122+
],
123+
options={
124+
'verbose_name': 'Testimonial',
125+
'verbose_name_plural': 'Testimonials',
126+
'ordering': ['name'],
127+
},
128+
),
129+
migrations.CreateModel(
130+
name='UserProfile',
131+
fields=[
132+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
133+
('avatar', models.ImageField(blank=True, null=True, upload_to='avatar')),
134+
('title', models.CharField(blank=True, max_length=200, null=True)),
135+
('bio', models.TextField(blank=True, null=True)),
136+
('cv', models.FileField(blank=True, null=True, upload_to='cv')),
137+
('skills', models.ManyToManyField(blank=True, to='main.Skill')),
138+
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
139+
],
140+
options={
141+
'verbose_name': 'User profile',
142+
'verbose_name_plural': 'User Profiles',
143+
},
144+
),
145+
]

Django_Apps/my_resume/main/migrations/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)