from django.http import HttpResponse
from django.shortcuts import render

# Create your views here.
from App.models import User


def home(request):
    data = User.objects.filter()
    print(data.query)

    print(data)
    return HttpResponse("首页")


def index(request):
    return HttpResponse("index")


def list_index(request):
    return HttpResponse("list")


def show(request,arg1,arg2):
    #参数类型都是字符串
    print(request.GET)
    print(arg1,arg2)
    print(type(arg2))
    return HttpResponse("show")



def show2(request,name,age):

    print(request.GET.get('gender','男'))
    #参数类型都是字符串
    return HttpResponse(name+"---"+age)


# def bbs_index(request,*args):
#     return None

def bbs_index(request,cid=0):
    cid = int(cid)
    print(cid)
    return HttpResponse(str(cid))