The http://hostname auto redirect to http://hostname/homepage
all_novel
¶Require 6 objects of all status novels
read_novel
¶Require 6 objects of read novels status=1
want_novel
¶Require 6 objects of wanted novels status=4
weather_location
¶The location of the weather
weather_viewbox_n weather_path_n
The viewbox and path of the weather’svg
weather_text_n
¶The text of the weather
weather_temp_n_low weather_temp_n_high
The tempurature of the days
account.
views
¶login
(request)¶If GET
, it will return a page to login. If POST
, it need username
and password
. If the username
and password
is correct, it will
redirect to home, else it will return the login page with a warning.
Note
If already login, it will return the ‘has_login.html’
logout
(request)¶It will logout the account and redirect to the login page.
account.models.
Profile
¶It add sex, birthday and image to django’s default user
django.contrib.auth.models.User
using OneToOneField
.