python - How can I debug Openstack Dashboard? -


i'm running openstack cloud system. installed , deployed kilo version on server successful, default version of openstack. that, want have modifies on openstack source , add more features it.

i started change openstack dashboard. however, there problems happened. therefore, have debugged django web application. have configured same official tutorials on openstack website (http://docs.openstack.org).

so, have search on server , find out 2 places have sources:

  • the first 1 /usr/share/openstack-dashboard/
  • the second 1 /usr/lib/python2.7/dist-packages/horizon/
  • and config file /etc/openstack-dashboard/local_settings.py

i set option debug = true in local_settings.py file.

on server typed these commands:

cd /usr/share/openstack-dashboard/ python manage.py runserver 

here output:

removedindjango18warning: xviewmiddleware has been moved django.contrib.admindocs.middleware. warning:py.warnings:removedindjango18warning: xviewmiddleware has been moved django.contrib.admindocs.middleware. removedindjango18warning: xviewmiddleware has been moved django.contrib.admindocs.middleware. warning:py.warnings:removedindjango18warning: xviewmiddleware has been moved django.contrib.admindocs.middleware. performing system checks...  system check identified no issues (0 silenced). august 05, 2015 - 09:28:50 django version 1.7.6, using settings 'openstack_dashboard.settings' starting development server @ http://127.0.0.1:8000/ quit server control-c. 

but in browser, shows error:

error

and then, on console, shows:

starting development server @ http://127.0.0.1:8000/                                                                                                                                                                                                                           quit server control-c.                                                                                                                                                                                                                                                 [05/aug/2015 10:21:29] "get / http/1.1" 302 0                                                                                                                                                                                                                                   not found: /horizon/auth/login/                                                                                                                                                                                                                                                 [05/aug/2015 10:21:29] "get /horizon/auth/login/?next=/ http/1.1" 404 4237                                                                                                                                                                                                      not found: /favicon.ico                                                                                                                                                                                                                                                         [05/aug/2015 10:21:29] "get /favicon.ico http/1.1" 404 4206   

please me out of problems. , how can debug openstack django website properly.thank !

as run server runserver command should go root url 127.0.0.1:8000/ not 127.0.0.1:8000/horizon

the difference in running method. when installed openstack_dashboard there apache config listen address http://host/horizon in /etc/apache2/conf/sites-available/

the directories

/usr/lib/python2.7/dist-packages/horizon/

is framework dashboards

/usr/share/openstack-dashboard/

is default dashboard openstack

/etc/openstack-dashboard/local_settings.py

the config file dashboard. here can apply changes default dash, example attach project modifies or extends default dash

so, problem solved if follow link http://127.0.0.1:8000/ debugging use

pdb or ide integrated debugger


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -