Skip to content

Commit 428d092

Browse files
first commit
0 parents  commit 428d092

File tree

58 files changed

+1150
-0
lines changed

Some content is hidden

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

58 files changed

+1150
-0
lines changed

.env

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
SQL_NAME = realiq_db
2+
SQL_USER = arun
3+
SQL_PASSWORD = password
4+
HOST= postgres_db
5+
PORT= 5432

Dockerfile

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
FROM python:3.11.4-slim-bullseye
2+
3+
ENV PYTHONUNBUFFERED 1
4+
ENV PYTHONDONTWRITEBYTECODE 1
5+
6+
WORKDIR /app
7+
8+
COPY . /app/
9+
10+
RUN apt-get update \
11+
&& apt-get install -y libpq-dev \
12+
&& rm -rf /var/lib/apt/lists/*
13+
14+
COPY ./requirements.txt .
15+
RUN pip install -r requirements.txt
16+
17+
18+
19+
20+
21+
22+
# # Use a lightweight Python base image
23+
# FROM python:3.9
24+
25+
# # Create a working directory within the container
26+
# WORKDIR /app
27+
28+
# # Copy the project code
29+
# COPY . .
30+
31+
# # Install dependencies from requirements.txt
32+
# RUN pip install -r requirements.txt
33+
34+
# # Expose the Django development port (default: 8000)
35+
# EXPOSE 8000
36+
37+
# # Start the Django development server (assuming manage.py)
38+
# CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
39+
40+
41+
42+
43+
44+
45+
46+
47+
48+
# # Use the official Python image as the base image
49+
# FROM python:3.9
50+
51+
# # Set working directory in the container
52+
# WORKDIR /code
53+
54+
# # Copy requirements.txt file to the container
55+
# COPY requirements.txt .
56+
57+
# # Install dependencies from requirements.txt
58+
# RUN pip install --no-cache-dir -r requirements.txt
59+
60+
# # Copy the rest of the Django project code to the container
61+
# COPY . .
62+
63+
# # Expose port 8000 to the outside world (optional, adjust if using a different port)
64+
# EXPOSE 8000
65+
66+
# # Command to run your Django application (modify as needed)
67+
# CMD ["python", "manage.py", "runserver"]
68+
69+

app/__init__.py

Whitespace-only changes.
112 Bytes
Binary file not shown.

app/__pycache__/admin.cpython-39.pyc

521 Bytes
Binary file not shown.

app/__pycache__/apps.cpython-39.pyc

372 Bytes
Binary file not shown.

app/__pycache__/models.cpython-39.pyc

4.79 KB
Binary file not shown.
5.05 KB
Binary file not shown.

app/__pycache__/urls.cpython-39.pyc

1.2 KB
Binary file not shown.

app/__pycache__/views.cpython-39.pyc

4.7 KB
Binary file not shown.

app/admin.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from django.contrib import admin
2+
from .models import Lead,Source,Campaign,Tag,LeadFollowUp,Requirement,Project,Booking,Closure,ProjectMatch
3+
# Register your models here.
4+
5+
admin.site.register(Lead)
6+
admin.site.register(Source)
7+
admin.site.register(Campaign)
8+
admin.site.register(Tag)
9+
admin.site.register(LeadFollowUp)
10+
admin.site.register(Requirement)
11+
admin.site.register(Project)
12+
admin.site.register(Booking)
13+
admin.site.register(Closure)
14+
admin.site.register(ProjectMatch)
15+

app/apps.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from django.apps import AppConfig
2+
3+
4+
class AppConfig(AppConfig):
5+
default_auto_field = 'django.db.models.BigAutoField'
6+
name = 'app'

app/migrations/0001_initial.py

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Generated by Django 4.2.11 on 2024-03-28 12:54
2+
3+
import django.contrib.postgres.fields
4+
from django.db import migrations, models
5+
import django.db.models.deletion
6+
7+
8+
class Migration(migrations.Migration):
9+
10+
initial = True
11+
12+
dependencies = [
13+
]
14+
15+
operations = [
16+
migrations.CreateModel(
17+
name='Campaign',
18+
fields=[
19+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
20+
('name', models.CharField(max_length=100)),
21+
('organization', models.IntegerField(default=2000)),
22+
('created_ts', models.DateTimeField(auto_now_add=True)),
23+
],
24+
),
25+
migrations.CreateModel(
26+
name='Lead',
27+
fields=[
28+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
29+
('name', models.CharField(max_length=100)),
30+
('mobile', models.CharField(max_length=10)),
31+
('email', models.EmailField(blank=True, max_length=70, unique=True)),
32+
('favorite', models.BooleanField(default=False)),
33+
('new', models.BooleanField(default=True)),
34+
('created_ts', models.DateTimeField(auto_now_add=True)),
35+
('modified_ts', models.DateTimeField(auto_now=True)),
36+
('notes', models.CharField(max_length=300)),
37+
('campaign', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='app.campaign')),
38+
],
39+
),
40+
migrations.CreateModel(
41+
name='Source',
42+
fields=[
43+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
44+
('source_name', models.CharField(max_length=100)),
45+
('source_type', models.CharField(max_length=100)),
46+
],
47+
),
48+
migrations.CreateModel(
49+
name='Tag',
50+
fields=[
51+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
52+
('name', models.CharField(max_length=100)),
53+
('organization', models.IntegerField(default=2000)),
54+
('group_name', models.CharField(max_length=100, null=True)),
55+
],
56+
),
57+
migrations.CreateModel(
58+
name='Requirement',
59+
fields=[
60+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
61+
('property_type', models.CharField(max_length=100)),
62+
('budget', models.BigIntegerField()),
63+
('property_status', models.CharField(max_length=200)),
64+
('booking_in_date', models.DateTimeField(auto_now_add=True)),
65+
('purchase_reason', models.CharField(max_length=100)),
66+
('loan_required', models.BooleanField(default=False)),
67+
('notes', models.CharField(max_length=300)),
68+
('bhk', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(choices=[('1 BHK', '1 BHK'), ('1.5 BHK', '1.5 BHK'), ('2 BHK', '2 BHK'), ('2.5 BHK', '2.5 BHK'), ('3 BHK', '3 BHK'), ('4 BHK', '4 BHK'), ('5 BHK', '5 BHK')], max_length=20), blank=True, default=list, null=True, size=None)),
69+
('lead_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lead_requirement', to='app.lead')),
70+
],
71+
),
72+
migrations.CreateModel(
73+
name='LeadFollowUp',
74+
fields=[
75+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
76+
('note', models.CharField(max_length=300)),
77+
('date_time', models.DateTimeField()),
78+
('lead_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lead_followup', to='app.lead')),
79+
],
80+
),
81+
migrations.AddField(
82+
model_name='lead',
83+
name='lead_source',
84+
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='app.source'),
85+
),
86+
migrations.AddField(
87+
model_name='lead',
88+
name='tags',
89+
field=models.ManyToManyField(blank=True, to='app.tag'),
90+
),
91+
]
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Generated by Django 4.2.11 on 2024-03-29 05:30
2+
3+
import django.contrib.postgres.fields
4+
from django.db import migrations, models
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
('app', '0001_initial'),
11+
]
12+
13+
operations = [
14+
migrations.AddField(
15+
model_name='requirement',
16+
name='size',
17+
field=django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), blank=True, default=list, null=True, size=None),
18+
),
19+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Generated by Django 4.2.11 on 2024-03-29 05:38
2+
3+
import django.contrib.postgres.fields
4+
from django.db import migrations, models
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
('app', '0002_requirement_size'),
11+
]
12+
13+
operations = [
14+
migrations.AddField(
15+
model_name='requirement',
16+
name='location',
17+
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(), blank=True, default=list, null=True, size=None),
18+
),
19+
]

app/migrations/0004_project.py

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Generated by Django 4.2.11 on 2024-03-29 11:16
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('app', '0003_requirement_location'),
10+
]
11+
12+
operations = [
13+
migrations.CreateModel(
14+
name='Project',
15+
fields=[
16+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
17+
('title', models.CharField(max_length=300)),
18+
('type', models.CharField(max_length=200)),
19+
('price_range_max', models.BigIntegerField()),
20+
('price_range_min', models.BigIntegerField()),
21+
],
22+
),
23+
]

app/migrations/0005_booking.py

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Generated by Django 4.2.11 on 2024-03-29 11:34
2+
3+
from django.db import migrations, models
4+
import django.db.models.deletion
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
('app', '0004_project'),
11+
]
12+
13+
operations = [
14+
migrations.CreateModel(
15+
name='Booking',
16+
fields=[
17+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
18+
('booking_date', models.DateTimeField(auto_now_add=True)),
19+
('booking_amount', models.BigIntegerField()),
20+
('note', models.CharField(max_length=300)),
21+
('cancelled', models.BooleanField(default=False)),
22+
('lead_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lead_id', to='app.lead')),
23+
('project_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='project_id', to='app.project')),
24+
],
25+
),
26+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Generated by Django 4.2.11 on 2024-03-29 11:56
2+
3+
from django.db import migrations, models
4+
import django.db.models.deletion
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
('app', '0005_booking'),
11+
]
12+
13+
operations = [
14+
migrations.AlterField(
15+
model_name='booking',
16+
name='lead_id',
17+
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='lead_id', to='app.lead'),
18+
),
19+
migrations.AlterField(
20+
model_name='booking',
21+
name='project_id',
22+
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='project_id', to='app.project'),
23+
),
24+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Generated by Django 4.2.11 on 2024-03-29 11:57
2+
3+
from django.db import migrations, models
4+
import django.db.models.deletion
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
('app', '0006_alter_booking_lead_id_alter_booking_project_id'),
11+
]
12+
13+
operations = [
14+
migrations.AlterField(
15+
model_name='booking',
16+
name='lead_id',
17+
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.lead'),
18+
),
19+
migrations.AlterField(
20+
model_name='booking',
21+
name='project_id',
22+
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.project'),
23+
),
24+
]

app/migrations/0008_closure.py

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Generated by Django 4.2.11 on 2024-03-30 04:55
2+
3+
from django.db import migrations, models
4+
import django.db.models.deletion
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
('app', '0007_alter_booking_lead_id_alter_booking_project_id'),
11+
]
12+
13+
operations = [
14+
migrations.CreateModel(
15+
name='Closure',
16+
fields=[
17+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
18+
('closure_date', models.DateTimeField(auto_now_add=True)),
19+
('sale_amount', models.BigIntegerField()),
20+
('note', models.CharField(max_length=300)),
21+
('lead_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.lead')),
22+
('project_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.project')),
23+
],
24+
),
25+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Generated by Django 4.2.11 on 2024-03-30 05:26
2+
3+
from django.db import migrations, models
4+
import django.db.models.deletion
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
('app', '0008_closure'),
11+
]
12+
13+
operations = [
14+
migrations.AlterField(
15+
model_name='closure',
16+
name='project_id',
17+
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='project', to='app.project'),
18+
),
19+
]

0 commit comments

Comments
 (0)