├── .idea ├── DjangoGetStarted.iml ├── misc.xml ├── modules.xml ├── vcs.xml └── workspace.xml ├── DjangoGetStarted ├── __init__.py ├── __init__.pyc ├── settings.py ├── settings.pyc ├── urls.py ├── urls.pyc ├── wsgi.py └── wsgi.pyc ├── Readme.md ├── apps ├── __init__.py └── message │ ├── __init__.py │ ├── __init__.pyc │ ├── admin.py │ ├── admin.pyc │ ├── apps.py │ ├── migrations │ ├── 0001_initial.py │ ├── 0001_initial.pyc │ ├── 0002_auto_20180107_1505.py │ ├── 0002_auto_20180107_1505.pyc │ ├── __init__.py │ └── __init__.pyc │ ├── models.py │ ├── models.pyc │ ├── tests.py │ ├── views.py │ └── views.pyc ├── db.sqlite3 ├── form.html ├── manage.py ├── requirements.txt ├── static └── css │ └── style.css └── templates └── message_form.html /.idea/DjangoGetStarted.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 28 | 29 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 64 | 65 | 66 | 67 | it Worked 68 | django.po 69 | STATIC_ROOT 70 | Meta 71 | ordering 72 | ave 73 | 74 | 75 | 76 | 78 | 79 | 92 | 93 | 94 | 95 | 96 | true 97 | DEFINITION_ORDER 98 | 99 | 100 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 108 |
109 | 110 | 111 | 116 | 117 | 122 | 123 | 128 |
129 | 133 | 134 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "DjangoGetStarted.settings") 7 | 8 | from django.core.management import execute_from_command_line 9 | 10 | execute_from_command_line(sys.argv) 11 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Django==1.9.8 2 | -------------------------------------------------------------------------------- /static/css/style.css: -------------------------------------------------------------------------------- 1 | 2 | .smart-green { 3 | margin-left: auto; 4 | margin-right: auto; 5 | max-width: 500px; 6 | background: #F8F8F8; 7 | padding: 30px 30px 20px 30px; 8 | font: 12px Arial, Helvetica, sans-serif; 9 | color: #666; 10 | border-radius: 5px; 11 | -webkit-border-radius: 5px; 12 | -moz-border-radius: 5px; 13 | } 14 | 15 | .smart-green h1 { 16 | font: 24px "Trebuchet MS", Arial, Helvetica, sans-serif; 17 | padding: 20px 0px 20px 40px; 18 | display: block; 19 | margin: -30px -30px 10px -30px; 20 | color: #FFF; 21 | background: #9DC45F; 22 | text-shadow: 1px 1px 1px #949494; 23 | border-radius: 5px 5px 0px 0px; 24 | -webkit-border-radius: 5px 5px 0px 0px; 25 | -moz-border-radius: 5px 5px 0px 0px; 26 | border-bottom: 1px solid #89AF4C; 27 | } 28 | 29 | .smart-green h1 > span { 30 | display: block; 31 | font-size: 11px; 32 | color: #FFF; 33 | } 34 | 35 | .smart-green label { 36 | display: block; 37 | margin: 0px 0px 5px; 38 | } 39 | 40 | .smart-green label > span { 41 | float: left; 42 | margin-top: 10px; 43 | color: #5E5E5E; 44 | } 45 | 46 | .smart-green input[type="text"], .smart-green input[type="email"], .smart-green textarea, .smart-green select { 47 | color: #555; 48 | height: 30px; 49 | line-height: 15px; 50 | width: 100%; 51 | padding: 0px 0px 0px 10px; 52 | margin-top: 2px; 53 | border: 1px solid #E5E5E5; 54 | background: #FBFBFB; 55 | outline: 0; 56 | -webkit-box-shadow: inset 1px 1px 2px rgba(238, 238, 238, 0.2); 57 | box-shadow: inset 1px 1px 2px rgba(238, 238, 238, 0.2); 58 | font: normal 14px/14px Arial, Helvetica, sans-serif; 59 | } 60 | 61 | .smart-green textarea { 62 | height: 100px; 63 | padding-top: 10px; 64 | } 65 | 66 | 67 | .smart-green .button { 68 | background-color: #9DC45F; 69 | border-radius: 5px; 70 | -webkit-border-radius: 5px; 71 | -moz-border-border-radius: 5px; 72 | border: none; 73 | padding: 10px 25px 10px 25px; 74 | color: #FFF; 75 | text-shadow: 1px 1px 1px #949494; 76 | } 77 | 78 | .smart-green .button:hover { 79 | background-color: #80A24A; 80 | } 81 | 82 | .error-msg{ 83 | color: red; 84 | margin-top: 10px; 85 | } 86 | .success-msg{ 87 | color: #80A24A; 88 | margin-top: 10px; 89 | margin-bottom: 10px; 90 | } 91 | -------------------------------------------------------------------------------- /templates/message_form.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |

留言信息 13 | 请留下你的信息. 14 |

15 | 22 | 23 | 28 | 29 | 34 | 35 | 40 |
41 | 45 | {% csrf_token %} 46 |
47 | 48 | 49 | --------------------------------------------------------------------------------