Fixtures are an essential part in local testing.

In order to load them, please run the following commands:

python manage.py flush
python manage.py loaddata leads.json
python manage.py assign_default_status
python manage.py recount_counters
python manage.py reset_kanban_order

The last command might be optional in the future but it’s required to create the leads kanban order

First you clear the database and old fixtures, then you load the fixtures, and finally you assign a default lead status for each category in the fixtures.

Modifying the fixtures:

Fixtures are a JSON file generated with fixture_generator.py script, located inside the fixtures folder. If you want to add, edit or remove stuff from the fixtures, you can modify the script.

The JSON file is generated simply by running the following command after navigating to the /fixtures/ folder:

python fixture_generator.py

CAREFUL: Modifying the fixture generator must be done with extreme care, as several associations between organizations, businesses, categories, leads and users are done manually by setting specific ids as foreign keys. If you want to modify the fixtures, try contacting Andrés first.

Organization Structure:

Upon loading the fixtures, the organizations are structured in the following way:

  • Freer Organization
    • Freer Dental
      • Dental Implants
      • Teeth Whitening
      • Dental Crowns
    • Freer Consulting
      • Free Consultation
      • Mastermind
  • Maggie Organization
    • Bailalo Studio
      • Salsa
      • Merengue
      • Bachata
    • Krakow Resorts
      • Properties For Sale
      • Real Estate Investing
  • RM Organization
    • Rm Car Studio
      • Ceramic Coating
      • Paint Protection Film
      • Car Was

User Roles:

The fixtures come with plenty of users for testing:

Super Users:

  • Andres (andres@preciousleads.io)
  • Yuan (yuan@preciousleads.io)

Andres and Yuan are admin users of all organizations. However, they have no businesses or categories explicitly assigned to them, so they cannot be assigned leads.

Freer Organization:

  • Alejandro
    • Admin User
      • Freer Dental
        • Dental Implants
        • Teeth Whitening
        • Dental Crowns
      • Freer Consulting
        • Freer Consultation
        • Mastermind
  • Gustavo
    • Business User
      • Freer Dental
        • Dental Implants
        • Teeth Whitening
        • Dental Crowns
      • Freer Consulting
        • Freer Consultation
        • Mastermind
  • Jose
    • Business User
      • Freer Dental
        • Dental Implants
        • Teeth Whitening
        • Dental Crowns
  • Raquel
    • Business User (no businesses or categories assigned)
  • Alonso
    • Business User (no categories assigned)
      • Freer Dental
  • Massimo
    • Category User
      • Freer Dental
        • Dental Implants
  • Karla
    • Category User (no categories assigned)
      • Freer Dental
  • Ciany
    • Lead User
      • Freer Dental
        • Teeth Whitening

Maggie Organization:

  • Maggie
    • Admin User
      • Bailalo Studio
        • Salsa
        • Merengue
        • Bachata
      • Krakow Resorts
        • Properties For Sale
        • Real Estate Investing
  • Yiwen
    • Business User
      • Bailalo Studio
        • Salsa
        • Merengue
        • Bachata
  • Karen
    • Category User
      • Bailalo Studio
        • Salsa
        • Merengue
  • Ricky
    • Category User
      • Bailalo Studio
        • Bachata

RM Organization:

  • Raul
    • Admin User
      • RM Car Studio
        • Ceramic Coating
        • Paint Protection Film
        • Car Wash

User without role:

  • John