expand fixtures
This commit is contained in:
parent
6fc66ffb78
commit
28ce263a99
2
Makefile
2
Makefile
|
@ -35,6 +35,7 @@ clean:
|
||||||
sudo find . \( -name __pycache__ -o -name "*.pyc" \) -delete
|
sudo find . \( -name __pycache__ -o -name "*.pyc" \) -delete
|
||||||
sudo rm -rf htmlcov/
|
sudo rm -rf htmlcov/
|
||||||
sudo rm -f */migrations/0*.py
|
sudo rm -f */migrations/0*.py
|
||||||
|
sudo rm .second_run
|
||||||
|
|
||||||
cleanall:
|
cleanall:
|
||||||
docker-compose -f docker-compose-development.yml down -v --rmi local
|
docker-compose -f docker-compose-development.yml down -v --rmi local
|
||||||
|
@ -42,3 +43,4 @@ cleanall:
|
||||||
sudo find . \( -name __pycache__ -o -name "*.pyc" \) -delete
|
sudo find . \( -name __pycache__ -o -name "*.pyc" \) -delete
|
||||||
sudo rm -rf htmlcov/
|
sudo rm -rf htmlcov/
|
||||||
sudo rm */migrations/*.py
|
sudo rm */migrations/*.py
|
||||||
|
sudo rm .second_run
|
||||||
|
|
|
@ -1,21 +1,49 @@
|
||||||
- model: devices.DeviceManufacturer
|
- model: devices.DeviceManufacturer
|
||||||
fields:
|
fields:
|
||||||
name: Dell
|
name: Dell #1
|
||||||
- model: devices.DeviceManufacturer
|
- model: devices.DeviceManufacturer
|
||||||
fields:
|
fields:
|
||||||
name: HP
|
name: HP #2
|
||||||
- model: devices.DeviceManufacturer
|
- model: devices.DeviceManufacturer
|
||||||
fields:
|
fields:
|
||||||
name: Axxiv
|
name: Axxiv #3
|
||||||
- model: devices.DeviceManufacturer
|
- model: devices.DeviceManufacturer
|
||||||
fields:
|
fields:
|
||||||
name: Acer
|
name: Acer #4
|
||||||
- model: devices.DeviceManufacturer
|
- model: devices.DeviceManufacturer
|
||||||
fields:
|
fields:
|
||||||
name: Asus
|
name: Asus #5
|
||||||
- model: devices.DeviceManufacturer
|
- model: devices.DeviceManufacturer
|
||||||
fields:
|
fields:
|
||||||
name: Lenovo
|
name: Lenovo #6
|
||||||
- model: devices.DeviceManufacturer
|
- model: devices.DeviceManufacturer
|
||||||
fields:
|
fields:
|
||||||
name: Samsung
|
name: Samsung #7
|
||||||
|
- model: devices.DeviceManufacturer
|
||||||
|
fields:
|
||||||
|
name: Apple #8
|
||||||
|
|
||||||
|
- model: devices.HardwareModel
|
||||||
|
fields:
|
||||||
|
name: MacBook Pro
|
||||||
|
manufacturer: 8
|
||||||
|
- model: devices.HardwareModel
|
||||||
|
fields:
|
||||||
|
name: MacBook Air
|
||||||
|
manufacturer: 8
|
||||||
|
- model: devices.HardwareModel
|
||||||
|
fields:
|
||||||
|
name: Latidude 74XX
|
||||||
|
manufacturer: 1
|
||||||
|
- model: devices.HardwareModel
|
||||||
|
fields:
|
||||||
|
name: Latidude 75XX
|
||||||
|
manufacturer: 1
|
||||||
|
- model: devices.HardwareModel
|
||||||
|
fields:
|
||||||
|
name: Latidude 54XX
|
||||||
|
manufacturer: 1
|
||||||
|
- model: devices.HardwareModel
|
||||||
|
fields:
|
||||||
|
name: Latidude 55XX
|
||||||
|
manufacturer: 1
|
||||||
|
|
5
run.sh
5
run.sh
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [ -f /var/cache/network_inventory/.second_run ]; then
|
if [ -f .second_run ]; then
|
||||||
sleep 2
|
sleep 2
|
||||||
python manage.py collectstatic --noinput
|
python manage.py collectstatic --noinput
|
||||||
python manage.py makemigrations
|
python manage.py makemigrations
|
||||||
|
@ -24,8 +24,7 @@ else
|
||||||
python manage.py loaddata nets
|
python manage.py loaddata nets
|
||||||
python manage.py loaddata softwares
|
python manage.py loaddata softwares
|
||||||
python manage.py shell -c "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('admin', 'admin@example.com', 'password')"
|
python manage.py shell -c "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('admin', 'admin@example.com', 'password')"
|
||||||
mkdir -p /var/cache/network_inventory
|
touch .second_run
|
||||||
touch /var/cache/network_inventory/.second_run
|
|
||||||
fi
|
fi
|
||||||
find . \( -name __pycache__ -o -name "*.pyc" \) -delete
|
find . \( -name __pycache__ -o -name "*.pyc" \) -delete
|
||||||
gunicorn network_inventory.wsgi:application --reload --bind 0.0.0.0:8000 --workers 3
|
gunicorn network_inventory.wsgi:application --reload --bind 0.0.0.0:8000 --workers 3
|
||||||
|
|
Loading…
Reference in New Issue