Things are mostly working. Creating a stable and alpha branch to continue to experiment.
This commit is contained in:
parent
4a0ce60a05
commit
1d3173f34e
|
|
@ -1,3 +0,0 @@
|
|||
DEBUG=True
|
||||
SECRET_KEY=your-secret-key-here
|
||||
DATABASE_URL=postgres://user:password@host:port/dbname
|
||||
0
leads/__init__.py
Normal file
0
leads/__init__.py
Normal file
25
leads/migrations/0001_initial.py
Normal file
25
leads/migrations/0001_initial.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# Generated by Django 5.1.1 on 2024-09-17 00:54
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Lead',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('email', models.EmailField(max_length=254)),
|
||||
('company', models.CharField(max_length=100)),
|
||||
('lead_source', models.CharField(choices=[('website', 'Website'), ('referral', 'Referral'), ('event', 'Event'), ('other', 'Other')], max_length=50)),
|
||||
('score', models.IntegerField(default=0)),
|
||||
],
|
||||
),
|
||||
]
|
||||
43
leads/migrations/0002_idsdata.py
Normal file
43
leads/migrations/0002_idsdata.py
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# Generated by Django 5.1.1 on 2024-09-17 03:02
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('leads', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='IDSData',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('business_name', models.CharField(max_length=255)),
|
||||
('business_uuid', models.UUIDField(unique=True)),
|
||||
('location_uuid', models.UUIDField()),
|
||||
('yib', models.CharField(blank=True, max_length=50, null=True)),
|
||||
('gbp_business_category', models.CharField(max_length=255)),
|
||||
('gbp_matching_service', models.CharField(blank=True, max_length=255, null=True)),
|
||||
('gbp_review_rating', models.FloatField(blank=True, null=True)),
|
||||
('gbp_review_count', models.IntegerField(blank=True, null=True)),
|
||||
('gbp_industry_avg_review_rating', models.FloatField(blank=True, null=True)),
|
||||
('gbp_industry_avg_review_count', models.IntegerField(blank=True, null=True)),
|
||||
('gbp_review_rating_offset', models.FloatField(blank=True, null=True)),
|
||||
('gbp_review_count_offset', models.IntegerField(blank=True, null=True)),
|
||||
('gbp_review_rating_health', models.CharField(blank=True, max_length=50, null=True)),
|
||||
('gbp_review_count_health', models.CharField(blank=True, max_length=50, null=True)),
|
||||
('gbp_location_municipality', models.CharField(max_length=255)),
|
||||
('gbp_location_state', models.CharField(max_length=2)),
|
||||
('location_from_gbp_business_name', models.CharField(blank=True, max_length=255, null=True)),
|
||||
('gbp_business_phone', models.CharField(blank=True, max_length=20, null=True)),
|
||||
('gbp_business_website', models.URLField(blank=True, null=True)),
|
||||
('root_domain', models.CharField(blank=True, max_length=255, null=True)),
|
||||
('md5_for_scrape', models.CharField(max_length=32)),
|
||||
('services_reputation_management', models.BooleanField(default=False)),
|
||||
('services_gbp_optimization', models.BooleanField(default=False)),
|
||||
('services_needs_website', models.BooleanField(default=False)),
|
||||
],
|
||||
),
|
||||
]
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
# Generated by Django 5.1.1 on 2024-09-17 03:16
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('leads', '0002_idsdata'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='gbp_industry_avg_review_count',
|
||||
field=models.FloatField(blank=True, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='gbp_review_count_offset',
|
||||
field=models.FloatField(blank=True, null=True),
|
||||
),
|
||||
]
|
||||
18
leads/migrations/0004_alter_idsdata_business_uuid.py
Normal file
18
leads/migrations/0004_alter_idsdata_business_uuid.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 5.1.1 on 2024-09-17 03:20
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('leads', '0003_alter_idsdata_gbp_industry_avg_review_count_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='business_uuid',
|
||||
field=models.UUIDField(),
|
||||
),
|
||||
]
|
||||
18
leads/migrations/0005_alter_idsdata_gbp_business_phone.py
Normal file
18
leads/migrations/0005_alter_idsdata_gbp_business_phone.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 5.1.1 on 2024-09-17 05:28
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('leads', '0004_alter_idsdata_business_uuid'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='gbp_business_phone',
|
||||
field=models.CharField(blank=True, max_length=50, null=True),
|
||||
),
|
||||
]
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
# Generated by Django 5.1.1 on 2024-09-17 05:59
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('leads', '0005_alter_idsdata_gbp_business_phone'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='gbp_business_phone',
|
||||
field=models.CharField(blank=True, max_length=255, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='gbp_location_state',
|
||||
field=models.CharField(max_length=255),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='gbp_review_count_health',
|
||||
field=models.CharField(blank=True, max_length=255, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='gbp_review_rating_health',
|
||||
field=models.CharField(blank=True, max_length=255, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='md5_for_scrape',
|
||||
field=models.CharField(max_length=255),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='yib',
|
||||
field=models.CharField(blank=True, max_length=255, null=True),
|
||||
),
|
||||
]
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
# Generated by Django 5.1.1 on 2024-09-17 06:52
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('leads', '0006_alter_idsdata_gbp_business_phone_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='business_name',
|
||||
field=models.CharField(max_length=1000),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='gbp_business_category',
|
||||
field=models.CharField(max_length=1000),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='gbp_business_phone',
|
||||
field=models.CharField(blank=True, max_length=1000, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='gbp_business_website',
|
||||
field=models.URLField(blank=True, max_length=1000, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='gbp_location_municipality',
|
||||
field=models.CharField(max_length=1000),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='gbp_location_state',
|
||||
field=models.CharField(max_length=1000),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='gbp_matching_service',
|
||||
field=models.CharField(blank=True, max_length=1000, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='gbp_review_count_health',
|
||||
field=models.CharField(blank=True, max_length=1000, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='gbp_review_rating_health',
|
||||
field=models.CharField(blank=True, max_length=1000, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='location_from_gbp_business_name',
|
||||
field=models.CharField(blank=True, max_length=1000, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='md5_for_scrape',
|
||||
field=models.CharField(max_length=1000),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='root_domain',
|
||||
field=models.CharField(blank=True, max_length=1000, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='idsdata',
|
||||
name='yib',
|
||||
field=models.CharField(blank=True, max_length=1000, null=True),
|
||||
),
|
||||
]
|
||||
26
leads/migrations/0008_importlog.py
Normal file
26
leads/migrations/0008_importlog.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Generated by Django 5.1.1 on 2024-09-17 21:25
|
||||
|
||||
import django.utils.timezone
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('leads', '0007_alter_idsdata_business_name_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='ImportLog',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('timestamp', models.DateTimeField(default=django.utils.timezone.now)),
|
||||
('file_name', models.CharField(max_length=255)),
|
||||
('total_records', models.IntegerField()),
|
||||
('imported_records', models.IntegerField()),
|
||||
('failed_records', models.IntegerField()),
|
||||
('error_log', models.TextField(blank=True)),
|
||||
],
|
||||
),
|
||||
]
|
||||
0
leads/migrations/__init__.py
Normal file
0
leads/migrations/__init__.py
Normal file
0
leadsdb/__init__.py
Normal file
0
leadsdb/__init__.py
Normal file
16
leadsdb/asgi.py
Normal file
16
leadsdb/asgi.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
"""
|
||||
ASGI config for leadsdb project.
|
||||
|
||||
It exposes the ASGI callable as a module-level variable named ``application``.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/5.1/howto/deployment/asgi/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from django.core.asgi import get_asgi_application
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'leadsdb.settings')
|
||||
|
||||
application = get_asgi_application()
|
||||
Loading…
Reference in a new issue