import new kw
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 5.2.10 on 2026-02-25 17:11
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('igny8_core_auth', '0036_add_paypal_plan_id_to_plan'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterUniqueTogether(
|
||||
name='seedkeyword',
|
||||
unique_together={('keyword', 'industry', 'sector', 'country')},
|
||||
),
|
||||
]
|
||||
@@ -781,7 +781,7 @@ class SeedKeyword(models.Model):
|
||||
|
||||
class Meta:
|
||||
db_table = 'igny8_seed_keywords'
|
||||
unique_together = [['keyword', 'industry', 'sector']]
|
||||
unique_together = [['keyword', 'industry', 'sector', 'country']]
|
||||
verbose_name = 'Seed Keyword'
|
||||
verbose_name_plural = 'Global Keywords Database'
|
||||
indexes = [
|
||||
|
||||
@@ -155,15 +155,20 @@ class KeywordImporter:
|
||||
return True
|
||||
|
||||
# Create keyword
|
||||
SeedKeyword.objects.create(
|
||||
keyword=keyword,
|
||||
industry=industry,
|
||||
sector=sector,
|
||||
volume=volume,
|
||||
difficulty=difficulty,
|
||||
country=country,
|
||||
is_active=True
|
||||
)
|
||||
try:
|
||||
SeedKeyword.objects.create(
|
||||
keyword=keyword,
|
||||
industry=industry,
|
||||
sector=sector,
|
||||
volume=volume,
|
||||
difficulty=difficulty,
|
||||
country=country,
|
||||
is_active=True
|
||||
)
|
||||
except Exception as e:
|
||||
self.log(f" ⚠ Error creating: {keyword} [{country}]: {e}", force=True)
|
||||
self.stats['errors'] += 1
|
||||
return False
|
||||
|
||||
self.log(f" ✓ Imported: {keyword} [{country}] (vol:{volume}, diff:{difficulty})")
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user