Monday 25 February 2019

django 1

python --version
Python 3.7.2

easy_install django
Installed

django-admin --version
2.2b1

#easy_install pywatchman
#error: Setup script exited with error: Microsoft Visual C++ 14.0

pip install django-watchman

INSTALLED_APPS = (
    ...
    'watchman',
)

urlpatterns = [
    path('admin/', admin.site.urls),
    path('music/', include('music.urls')),
    path('watchman/', include('watchman.urls')),
]

http://127.0.0.1:8000/watchman/
{"databases": [{"default": {"ok": true}}], "caches": [{"default": {"ok": true}}], "storage": {"ok": true}}

http://127.0.0.1:8000/watchman/dashboard/

python -m pip install --upgrade pip
Successfully installed pip-19.0.3

C:\Users\chuanshuo\Desktop> django-admin startproject project1
cd project1
ls

Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----        25/02/2019   1:17 PM            .idea
d----        25/02/2019   1:00 PM            project1
-a---        25/02/2019   1:00 PM        649 manage.py

python manage.py runserver

python manage.py startapp music

reference:
https://www.youtube.com/watch?v=qgGIqRFvFFk&index=1&list=PL6gx4Cwl9DGBlmzzFcLgDhKTTfNLfX1IK
https://wiki.python.org/moin/WindowsCompilers
https://developercommunity.visualstudio.com/content/problem/409173/error-microsoft-visual-c-140-is-required.html
https://stackoverflow.com/questions/43858836/python-installing-clarifai-vs14-0-link-exe-failed-with-exit-status-1158
https://github.com/mwarkentin/django-watchman

No comments:

Post a Comment