[netbox plugin] CommandError: This command is available for development purposes only.

560 views
Skip to first unread message

Livio Zanol Puppim

unread,
May 12, 2020, 2:01:38 PM5/12/20
to NetBox
Hello everybody, I'm following the tutorial on https://netbox.readthedocs.io/en/stable/plugins/development/ trying to understand how to delevop a new plugin.

I'm having trouble on this command on the Database Models section on the page :
"./manage.py makemigrations netbox_animal_sounds"

since I'm on the plugin directory, this command doesn't exists. 

I tried using the command present on netbox folder (/opt/netbox-2.8.3/netbox/manage.py) but got this result:
"CommandError: This command is available for development purposes only. It will
NOT resolve any issues with missing or unapplied migrations. For assistance,
please post to the NetBox mailing list:

I have already executed "python setup.py develop". I don't know what to do, if someone could help I would appreciate.


Thanks in advance.



-----

Commands:
(as root on a container) cd ~/
mkdir animal_sounds

cd animal_sounds
vi setup.py

<pasted this content:
https://github.com/netbox-community/netbox-animal-sounds/blob/master/setup.py>
echo "TEST" > README



cd animal_sounds


vi __init__.py
<pasted this content: https://github.com/netbox-community/netbox-animal-sounds/blob/master/netbox_animal_sounds/__init__.py>



vi models.py
<pasted this content: https://github.com/netbox-community/netbox-animal-sounds/blob/master/netbox_animal_sounds/models.py>


cd ..
(venv) root@8c5f9e5d7066:~/animal_sounds# python setup.py develop

running develop
running egg_info
creating netbox_animal_sounds
.egg-info
writing netbox_animal_sounds
.egg-info/PKG-INFO
writing dependency_links to netbox_animal_sounds
.egg-info/dependency_links.txt
writing top
-level names to netbox_animal_sounds.egg-info/top_level.txt
writing manifest file
'netbox_animal_sounds.egg-info/SOURCES.txt'
reading manifest file
'netbox_animal_sounds.egg-info/SOURCES.txt'
writing manifest file
'netbox_animal_sounds.egg-info/SOURCES.txt'
running build_ext
Creating /opt/netbox-2.8.3/venv/lib/python3.6/site-packages/netbox-animal-sounds.egg-link (link to .)
Adding netbox-animal-sounds 0.1 to easy-install.pth file


Installed /root/animal_sounds
Processing dependencies for netbox-animal-sounds==0.1
Finished processing dependencies for netbox-animal-sounds==0.1




(venv) root@8c5f9e5d7066:~/animal_sounds/animal_sounds# /opt/netbox-2.8.3/netbox/manage.py makemigrations netbox_animal_sounds
CommandError: This command is available for development purposes only. It will
NOT resolve any issues
with missing or unapplied migrations. For assistance,
please post to the
NetBox mailing list:
    https
://groups.google.com/forum/#!forum/netbox-discuss


John Anderson

unread,
May 12, 2020, 5:37:40 PM5/12/20
to NetBox
The makemigration command is disabled unless the DEVELOPER setting in configuration.py is set to True. https://netbox.readthedocs.io/en/stable/configuration/optional-settings/

Livio Zanol Puppim

unread,
May 13, 2020, 8:33:22 AM5/13/20
to John Anderson, NetBox
Thank you very much!

I've changed the configuration.py to include this.

Now I'm getting "No installed app with label 'netbox-animal-sounds'."

Already tried "python setup.py develop" and  "python setup.py install"

Em ter., 12 de mai. de 2020 às 18:37, John Anderson <lamp...@gmail.com> escreveu:
The makemigration command is disabled unless the DEVELOPER setting in configuration.py is set to True. https://netbox.readthedocs.io/en/stable/configuration/optional-settings/

--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/7831a65b-5dd5-4aab-b02a-85310d18cfd1%40googlegroups.com.


--
[]'s

Lívio Zanol Puppim

Remo Grueebler

unread,
Jul 1, 2020, 7:14:02 AM7/1/20
to NetBox
I'm getting the same error. Did you find a solution?

Thanks
Remo


On Wednesday, 13 May 2020 14:33:22 UTC+2, Livio Zanol Puppim wrote:
Thank you very much!

I've changed the configuration.py to include this.

Now I'm getting "No installed app with label 'netbox-animal-sounds'."

Already tried "python setup.py develop" and  "python setup.py install"

Em ter., 12 de mai. de 2020 às 18:37, John Anderson <lamp...@gmail.com> escreveu:
The makemigration command is disabled unless the DEVELOPER setting in configuration.py is set to True. https://netbox.readthedocs.io/en/stable/configuration/optional-settings/

--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages