Beispiel #1
0
def delete(service_id):
    service = Service.objects().with_id(service_id)
    if service is None:
        return "Not found"
    else:
        service.delete()
        return redirect(url_for('admin'))
Beispiel #2
0
def info(service_id):
    info_service = Service.objects().with_id(service_id)
    info_pic = info_service.game + '.jpg'
    info_account = info_service.account
    info_game = info_service.game
    info_price = info_service.price
    info_contact = info_service.contact
    info_occupied = info_service.occupied
    return render_template('info.html',
                           info_pic=info_pic,
                           info_account=info_account,
                           info_game=info_game,
                           info_price=info_price,
                           info_contact=info_contact,
                           info_occupied=info_occupied)
def searchid(id):
    all_service = Service.objects(id=id)
    return render_template('searchid.html', all_service=all_service)
def service_page():
    all_service = Service.objects()
    return render_template('service-page.html', all_service=all_service)
def remove_all():
    all_service = Service.objects()
    all_service.delete()
    return redirect(url_for('admin'))
def admin():
    all_service = Service.objects()
    return render_template('admin.html', all_service=all_service)
Beispiel #7
0
def customer(c):
    all_service = Service.objects(contacted=c, gender=1)
    return render_template('customer.html', all_service=all_service)
Beispiel #8
0
def search(g):
    all_service = Service.objects(gender=g)
    return render_template('search.html', all_service=all_service)
from Models.service import Service
import mlab

mlab.connect()

all_service = Service.objects(contacted='true')

all_service = Service.objects(contacted='false')

for index, service in enumerate(all_service):
    print(service['name'])
    if index == 9:
        break
Beispiel #10
0
def admin():
    return render_template('admin.html', services=Service.objects())
def search(game):
    filtered_services = Service.objects(game=game, occupied=False)
    return render_template('search.html', all_services=filtered_services)
Beispiel #12
0
def search(g):
    all_service = Service.objects(gender=g, yob__lte=2000, address__icontains="Hà Nội")
    return render_template('search.html', all_service=all_service)