2017-09-13 99 views
0

不是首發我已創建Django的Python應用程序,當我按F5,它會彈出一個Python殼它說Python應用程序在Visual Studio

Available subcommands: 

[auth] 
changepassword 
createsuperuser 

[django] 
check 
compilemessages 
createcachetable 
dbshell 
diffsettings 
dumpdata 
flush 
inspectdb 
loaddata 
makemessages 
makemigrations 
migrate 
runfcgi 
shell 
showmigrations 
sql 
sqlall 
sqlclear 
sqlcustom 
sqldropindexes 
sqlflush 
sqlindexes 
sqlmigrate 
sqlsequencereset 
squashmigrations 
startapp 
startproject 
syncdb 
test 
testserver 
validate 

[sessions] 
clearsessions 

[staticfiles] 
collectstatic 
findstatic 
runserver 
Press any key to continue . . . 

但它不會打開任何瀏覽器和應用程序沒有運行,當我按任何鍵時,它只是停止應用程序。

我在想這是什麼問題。奇怪的是,前幾天這個應用程序工作正常,之後我什麼也沒做。

+0

如果你使用Django,你必須手動運行它,進入終端並鍵入python manage.py runserver –

+0

你能夠使用[這些命令](https://djangobook.com/developing-django-visual -studio /#leanpub-auto-integration-of-django-management-commands)來啓動服務器。 – PRMoureu

+0

@MauricioCortazar我已經從VStudio早些時候運行過它,不確定現在是什麼問題。 –

回答

0

我解決了這個問題。問題是與端口8000,我的系統不允許我訪問端口號:8000.

所以我去VisualStudio ---->調試---->項目屬性在底部--->調試--->輸入端口號:5000

然後它就像魅力一樣工作。