v
node2:/django/mysite/news#cat views.py
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
from django.shortcuts import render,render_to_response,redirect
from .models import Article
from django.http import HttpResponse, HttpResponseNotFound
import datetime
from django.views.decorators.http import require_http_methods,require_GET
from django.http import HttpResponseRedirect
from django.shortcuts import render
import os
from django import forms
def login(request):
if request.method == "GET":
print request
print request.GET
print '--------------'
print request.GET['aa']
print '--------------'
response = "You're looking at the second results of question "
return HttpResponse(response )
<WSGIRequest: GET '/login/?aa=bb'>
<QueryDict: {u'aa': [u'bb']}>
--------------
bb
--------------
[27/Nov/2017 16:32:26] "GET /login/?aa=bb HTTP/1.1" 200 50
http://192.168.137.3:9000/login/?aa=bb