+21,8 @@ 21 21
         <br>
22 22
         <input type='tel' name='tel' class='form-control' placeholder='Tel.' required/>
23 23
         <br>
24
+        <input type='text' name='line_id' class='form-control' placeholder='Line ID'/>
25
+        <br>
24 26
         <label>อัพโหลดภาพ</label>
25 27
         <input type="file" name='photo' accept="image/*;capture=camera" class='form-control' required> </br>
26 28
         <span class="glyphicon glyphicon-map-marker"></span>

+ 2 - 0
app/front/views.py

@@ -15,6 +15,8 @@ def index(request):
15 15
         p.geolocation = request.POST.get('geo')
16 16
         p.birth_date = request.POST.get('bd')
17 17
         p.comment = request.POST.get('comment')
18
+        p.tel = request.POST.get('tel')
19
+        p.line_id = request.POST.get('line_id')
18 20
         p.photo = request.FILES.get('photo')
19 21
         p.patient_status = "request"
20 22
         p.save()

BIN
app/shaqfindbed/__pycache__/__init__.cpython-39.pyc


BIN
app/shaqfindbed/__pycache__/settings.cpython-39.pyc


BIN
app/shaqfindbed/__pycache__/urls.cpython-39.pyc


BIN
app/shaqfindbed/__pycache__/wsgi.cpython-39.pyc


+ 5 - 1
app/shaqfindbed/settings.py

@@ -27,7 +27,11 @@ SECRET_KEY = 'django-insecure-!=!d6rsewcddw=hr-j46#))^nd-32(kkjmnpxxioi(v&c9!*xn
27 27
 # SECURITY WARNING: don't run with debug turned on in production!
28 28
 DEBUG = True
29 29
 
30
-ALLOWED_HOSTS = []
30
+ALLOWED_HOSTS = [
31
+    "167.71.218.44",
32
+    "localhost",
33
+    '.findbed.xyz'
34
+]
31 35
 
32 36
 
33 37
 # Application definition

+ 1 - 1
app/shaqfindbed/urls.py

@@ -20,8 +20,8 @@ from django.conf.urls import url
20 20
 from django.conf.urls.static import static
21 21
 
22 22
 urlpatterns = [
23
+    path('', include('front.urls')),
23 24
     path('backend/', include('backend.urls')),
24
-    path('front/', include('front.urls')),
25 25
     path('admin/', admin.site.urls),
26 26
     url(r'^chaining/', include('smart_selects.urls')),
27 27
 ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

BIN
data/.DS_Store


BIN
data/db/.DS_Store


+ 0 - 1
data/db/PG_VERSION

@@ -1 +0,0 @@
1
-13

BIN
data/db/base/1/112


BIN
data/db/base/1/113


BIN
data/db/base/1/1247


BIN
data/db/base/1/1247_fsm


BIN
data/db/base/1/1247_vm


BIN
data/db/base/1/1249


BIN
data/db/base/1/1249_fsm


BIN
data/db/base/1/1249_vm


BIN
data/db/base/1/1255


BIN
data/db/base/1/1255_fsm


BIN
data/db/base/1/1255_vm


BIN
data/db/base/1/1259


BIN
data/db/base/1/1259_fsm


BIN
data/db/base/1/1259_vm


BIN
data/db/base/1/13245


BIN
data/db/base/1/13245_fsm


BIN
data/db/base/1/13245_vm


+ 0 - 0
data/db/base/1/13247


BIN
data/db/base/1/13249


BIN
data/db/base/1/13250


BIN
data/db/base/1/13250_fsm


BIN
data/db/base/1/13250_vm


+ 0 - 0
data/db/base/1/13252


BIN
data/db/base/1/13254


BIN
data/db/base/1/13255


BIN
data/db/base/1/13255_fsm


BIN
data/db/base/1/13255_vm


+ 0 - 0
data/db/base/1/13257


BIN
data/db/base/1/13259


BIN
data/db/base/1/13260


BIN
data/db/base/1/13260_fsm


BIN
data/db/base/1/13260_vm


+ 0 - 0
data/db/base/1/13262


BIN
data/db/base/1/13264


+ 0 - 0
data/db/base/1/1417


Some files were not shown because too many files changed in this diff

tum/tmt_learning - Gogs: Simplico Git Service

暂无描述

Prach Pongpanich 6f337d0a21 install tailwind alpine daisyui 2 年之前
..
LICENSE 6f337d0a21 install tailwind alpine daisyui 2 年之前
README.md 6f337d0a21 install tailwind alpine daisyui 2 年之前
once.js 6f337d0a21 install tailwind alpine daisyui 2 年之前
package.json 6f337d0a21 install tailwind alpine daisyui 2 年之前

README.md

once

Only call a function once.

usage

var once = require('once')

function load (file, cb) {
  cb = once(cb)
  loader.load('file')
  loader.once('load', cb)
  loader.once('error', cb)
}

Or add to the Function.prototype in a responsible way:

// only has to be done once
require('once').proto()

function load (file, cb) {
  cb = cb.once()
  loader.load('file')
  loader.once('load', cb)
  loader.once('error', cb)
}

Ironically, the prototype feature makes this module twice as complicated as necessary.

To check whether you function has been called, use fn.called. Once the function is called for the first time the return value of the original function is saved in fn.value and subsequent calls will continue to return this value.

var once = require('once')

function load (cb) {
  cb = once(cb)
  var stream = createStream()
  stream.once('data', cb)
  stream.once('end', function () {
    if (!cb.called) cb(new Error('not found'))
  })
}

once.strict(func)

Throw an error if the function is called twice.

Some functions are expected to be called only once. Using once for them would potentially hide logical errors.

In the example below, the greet function has to call the callback only once:

function greet (name, cb) {
  // return is missing from the if statement
  // when no name is passed, the callback is called twice
  if (!name) cb('Hello anonymous')
  cb('Hello ' + name)
}

function log (msg) {
  console.log(msg)
}

// this will print 'Hello anonymous' but the logical error will be missed
greet(null, once(msg))

// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time
greet(null, once.strict(msg))