diff --git a/web_app_django/Pipfile b/web_app_django/Pipfile index 8d396a3b8d0882c26ce7f60f9bc5e3ef5076146c..28b9ed60d445c674f6709ac1ff0720b8e4082eef 100644 --- a/web_app_django/Pipfile +++ b/web_app_django/Pipfile @@ -8,6 +8,7 @@ verify_ssl = true [packages] django = "*" couchdb = "*" +djangp = "*" [requires] python_version = "3.6" diff --git a/web_app_django/the_deadly_sins/settings.py b/web_app_django/the_deadly_sins/settings.py index 8819ba5eacb143edfe0d39a36b06402000d340bc..2ca12342d7d299cc95b920f4f74ca31801ef0953 100644 --- a/web_app_django/the_deadly_sins/settings.py +++ b/web_app_django/the_deadly_sins/settings.py @@ -124,3 +124,7 @@ USE_TZ = True # https://docs.djangoproject.com/en/2.2/howto/static-files/ STATIC_URL = '/static/' +STATICFILES_DIRS = [ + os.path.join(BASE_DIR, "static"), + +] diff --git a/web_app_django/tweet/static/images/circle.png b/web_app_django/tweet/static/images/circle.png new file mode 100644 index 0000000000000000000000000000000000000000..8510accf77434e3815005f1923478ea1216b05bf Binary files /dev/null and b/web_app_django/tweet/static/images/circle.png differ diff --git a/web_app_django/tweet/templates/index.html b/web_app_django/tweet/templates/index.html index b3b5a69d5197ff5cd90d9dbf68d79d268d4f74c8..8dc9394298ce2663f19a51d503d90f1e4bee73b5 100644 --- a/web_app_django/tweet/templates/index.html +++ b/web_app_django/tweet/templates/index.html @@ -1,21 +1,38 @@ +{% load static %} <html> <head> <title>Comfy Django</title> </head> <body> <h1>CouchDB in Django</h1> <form method="post" action="."> - <table> - <tr> - <td> Title for new document </td> - <td><input type="text" name="title"></td> - <td><input type="submit"></td> - </tr> - </table> - </form> + <script> + var valmel = "{{city.value}}"; + + </script> + <img src="https://www.teachingtreasures.com.au/teaching-tools/gknowledgeK-3/major-cities/aussiemap.gif" + style='position:absolute;left:15px;top:35px;z-index:0;'width="745" height="586" alt="MapTest" usemap="#ausmap"> + <img src="{% static 'images/circle.png'%}" + style='position:absolute;left:520px;top:455px;z-index:1;'width= height="150"alt="circlemel"> + + <map name="ausmap"> + <area shape="circle" coords="567,483,25" alt="Melbourne" href="sun.htm"> + + </map> + + + <hr> - <ol> + + {% if cityInfo %} + {% for city in cityInfo %} + <td>{{city.key}}</td> + <td> {{city.value}}</td> + + {% endfor %} + {%else%} + <hr>NO DATA</hr> + {% endif %} + - <li>{{ file.text }}</li> - - </ol> + </body> </html> \ No newline at end of file