afterauth 是authtoken什么意思思 百度云的

百度云平台+django实战记录
百度云平台+django实战记录
发布时间: 18:49:53
编辑:www.fx114.net
本篇文章主要介绍了"百度云平台+django实战记录",主要涉及到百度云平台+django实战记录方面的内容,对于百度云平台+django实战记录感兴趣的同学可以参考一下。
日22:28:26:shit! Win7上 TortoiseSVN连不上,无语。用浏览器直接访问svn地址都可以,用TortoiseSVN却不可以,谁的问题?为了连接svn,搞了一晚上了。
试了TortoiseGit也不行,好吧,不用svn了,直接用自带的包上传更新功能。
问了百度客服,目前不支持TortoiseSVN 1.8,建议换成1.6,我换成1.7就OK了。
先从django开始
bae预装django 1.4,官网现在最新是1.5,没办法用1.4了。
1.下载安装django 1.4
前提:ubuntu 13.04 + python 2.7 + mysql已经都装好,ubuntu下装很方便的,python已经自带了。
要装一个python-mysqldb
sudo apt-get install python-mysqldb
官网下载地址:/download/1.4.5/tarball/
参考1.4版本的安装教程:/en/1.4/intro/install/
其实也就是解压,然后运行
sudo python setup.py install
下面命令验证安装结果:
&&& import django
&&& print django.get_version()
2.创建django项目
切换到一个目录,然后运行
django-admin.py startproject mysite
运行一个开发测试服务器,输入下面的命令:
python manage.py runserver
然后在浏览器访问http://127.0.0.1:8000/&
3.设置数据库
编辑mysite/settings.py,修改DATABASES一项
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'db_name', # Or path to database file if using sqlite3.
'USER': 'root', # Not used with sqlite3.
'PASSWORD': 'your_mysql_passwd', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
django默认安装的应用有:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
# Uncomment the next line to enable the admin:
#'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
运行下面的命令,同步数据库,为默认安装的应用创建table:
python manage.py syncdb
4.创建自己的app
输入下面的命令,创建一个叫polls的应用
python manage.py startapp polls
这时候创建了一个polls文件夹:
__init__.py
接下来创建模型(models),按照官网的例子,编辑polls/models.py
from django.db import models
class Poll(models.Model):
question = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
class Choice(models.Model):
poll = models.ForeignKey(Poll)
choice = models.CharField(max_length=200)
votes = models.IntegerField()
这里的意思创建了两个模型:Poll、Choice。
激活模型,编辑mysite/settings.py中INSTALLED_APP,如下:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
# Uncomment the next line to enable the admin:
# 'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
可以在shell下输入一些python语句,进入shell环境的命令:
python manage.py shell
&&& from polls.models import Poll, Choice # Import the model classes we just wrote.
# No polls are in the system yet.
&&& Poll.objects.all()
# Create a new Poll.
&&& from django.utils import timezone
&&& p = Poll(question=&What's new?&, pub_date=timezone.now())
# Save the object into the database. You have to call save() explicitly.
&&& p.save()
# Now it has an ID. Note that this might say &1L& instead of &1&, depending
# on which database you're using. That' it just means your
# database backend prefers to return integers as Python long integer
# objects.
给模型增加一个__unicode__()方法,让模型显示默认的信息:
class Poll(models.Model):
def __unicode__(self):
return self.question
class Choice(models.Model):
def __unicode__(self):
return self.choice
5.激活admin应用
首先在mysite/settings.py里打开django.contrib.admin应用,然后同步下数据库python&manage.py&syncdb &。
接着编辑mysite/urls.py,编辑后如下:
from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', '{{ project_name }}.views.home', name='home'),
# url(r'^{{ project_name }}/', include('{{ project_name }}.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
接下来启动测试服务器python manage.py runserver,在浏览器中输入http://127.0.0.1:8000/admin/,就可看到admin界面。
admin里并没有我们刚才创建的模型,需要如下修改:
在polls目录下创建一个admin.py文件,文件内容为
from polls.models import Poll
from django.contrib import admin
admin.site.register(Poll)
重启测试服务器,能看到新加的模型。
5.创建视图
编辑mysite/urls.py如下:
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^polls/$', 'polls.views.index'),
url(r'^polls/(?P&poll_id&\d+)/$', 'polls.views.detail'),
url(r'^polls/(?P&poll_id&\d+)/results/$', 'polls.views.results'),
url(r'^polls/(?P&poll_id&\d+)/vote/$', 'polls.views.vote'),
url(r'^admin/', include(admin.site.urls)),
写第一个view,编辑polls/views.py:
from django.http import HttpResponse
def index(request):
return HttpResponse(&Hello, world. You're at the poll index.&)
往下更进一步的丰富视图略。
到此一个简单的django站点就建好了,接下来是部署百度云平台。
第二部分 部署百度云平台
1.注册账号是最简单的。
妈的,在bae上就是不成功。
换成阿里云服务器吧,本篇结束,另起一篇。
一、不得利用本站危害国家安全、泄露国家秘密,不得侵犯国家社会集体的和公民的合法权益,不得利用本站制作、复制和传播不法有害信息!
二、互相尊重,对自己的言论和行为负责。
本文标题:
本页链接:&After… THE ANIMATION全集百度云 After… THE ANIMATION1-2合集magnet磁力下载
After… THE ANIMATION全集百度云 After… THE ANIMATION1-2合集magnet磁力下载
热度排行榜
资讯早知道
广州恒大外援前锋高拉特是哪国人?(答题格式:FF答案,例如答案是梅西,则输入:FF梅西)这道问题FIFAOnline3微信每日一题的问题,估计很多的玩家都不清楚这个问题的答案吧!下面皮皮养生网小编为大家带来微信每日一题的答案,想知道最新的每日一题答案请关注皮皮养生网。 广州恒大外援前锋高拉特是哪国人?
星云战神的技能除了行星守护之外,还有一个技能叫?答题格式:fc+答案,例如答案是飞车,则回复fc飞车答题】这道问题天天飞车微信每日一题的问题,估计很多的玩家都不清楚这个问题的答案吧!下面皮皮养生网小编为大家带来微信每日一题的答案,想知道最新的每日一题答案请关注皮皮养生网。
星云战神的技能除了行星守
参与公众号的感恩母亲节活动,最多可以获得多少欢乐豆呢?(答题格式dd+答案,例如答案是3,则输入dd3),下面皮皮养生网小编就为大家带来了5.15欢乐斗地主微信每日一题的正确答案!
参与公众号的感恩母亲节活动,最多可以获得多少欢乐豆呢? 答案 dd
多少封家书可以兑换绿色副将宝箱?(答题格式为yl+答案)这道问题是御龙在天手游微信每日一题的问题,估计很多的玩家都不清楚这个问题的答案吧!下面皮皮养生网小编为大家带来微信每日一题的答案,想知道最新的每日一题答案请关注皮皮养生网。
多少封家书可以兑换绿色副将宝箱? 答案 yl
题目:莫忘尘与风摇筝的关系是? A、姐弟 B、母子 C、夫妻(5分钟之内输入答案才有效哦),下面皮皮养生网小编为大家带来微信每日一题的答案,想知道最新的每日一题答案请关注皮皮养生网。
题目:莫忘尘与风摇筝的关系是? A、姐弟 B、母子 C、夫妻 (5分钟之内输入答案才有效哦) 答案A、姐弟最近百度云盘不提供搜索,闲来无事,玩玩python爬虫,爬一下百度云盘的资源 - 推酷
最近百度云盘不提供搜索,闲来无事,玩玩python爬虫,爬一下百度云盘的资源
最近百度云盘不知道为啥不提供资源检索,正好最近看了一下python,正好来练练手,写歌爬虫爬一下百度云盘的资源。
分析了一下百度云盘的网友源码和js文件,里面有大量ajax的东西,利用json传输数据,前端显示。话说,这样数据爬去就方便多了,也不要用scrapy啥的,直接解析json数据就好。
分析js文件提炼了下面三个链接:
URL_SHARE = '/pcloud/feed/getsharelist?auth_type=1&start={start}&limit=20&query_uk={uk}&urlid={id}'
URL_FOLLOW = '/pcloud/friend/getfollowlist?query_uk={uk}&limit=20&start={start}&urlid={id}'
#/pcloud/friend/getfanslist?query_uk=&limit=25&start=0
URL_FANS = '/pcloud/friend/getfanslist?query_uk={uk}&limit=20&start={start}&urlid={id}'
整个数据爬取流程起到很重要的作用。
爬虫分三步,一个是urlids 保存要爬取的网址,一个是user存放用户uk,另一个是share存放user分享的数据,包含任何你想要的数据。
下面提供三个核心函数代码:
#演示站http://wwww.yunsou.me
def response_worker():
global news,totals
dbconn = mdb.connect(DB_HOST, DB_USER, DB_PASS, 'baiduyun', charset='utf8')
dbcurr = dbconn.cursor()
dbcurr.execute('SET NAMES utf8')
dbcurr.execute('set global wait_timeout=60000')
while True:
print &function response_worker&,hc_r.qsize()
# if hc_r.qsize()==0:
print &continue&
metadata, effective_url = hc_r.get()
print &response_worker:&, effective_url
tnow = datetime.datetime.utcnow()
date = (tnow + datetime.timedelta(hours=8))
date = datetime.datetime(date.year, date.month, date.day)
if news&=100:
dbcurr.execute('INSERT INTO spider_statusreport(date,new_hashes,total_requests)
VALUES(%s,%s,%s) ON DUPLICATE KEY UPDATE ' +'total_requests=total_requests+%s,new_hashes=new_hashes+%s',
(date, news,totals,totals,news))
except Exception as ex:
print &E10&, str(ex)
id = re_urlid.findall(effective_url)[0]
start = re_start.findall(effective_url)[0]
if 'getfollowlist' in effective_url: #type = 1
follows = json.loads(metadata)
print &-------------------------------------follows-------------------------------\n&
uid = re_uid.findall(effective_url)[0]
if &total_count& in follows.keys() and follows[&total_count&]&0 and str(start) == &0&:
for i in range((follows[&total_count&]-1)/ONEPAGE):
dbcurr.execute('INSERT INTO urlids(uk, start, limited, type, status) VALUES(%s, %s, %s, 1, 0)' % (uid, str(ONEPAGE*(i+1)), str(ONEPAGE)))
except Exception as ex:
print &E1&, str(ex)
if &follow_list& in follows.keys():
for item in follows[&follow_list&]:
if item['pubshare_count']==0:
print &---------------------count ==0-------------------------------------------\n&
y = dbcurr.execute('SELECT id FROM user WHERE userid=%s', (item['follow_uk'],))
y = dbcurr.fetchone()
print &user uk&,item['follow_uk']
dbcurr.execute('INSERT INTO user(userid, username, files, status, downloaded, lastaccess,avatar_url,fans_count,follow_count,album_count) VALUES(%s, &%s&, %s, 0, 0, &%s&,&%s&,%s,%s,%s)' % (item['follow_uk'], item['follow_uname'],item['pubshare_count'],tnow,item['avatar_url'],item['fans_count'],item['follow_count'],item['album_count']))
except Exception as ex:
print &E13&, str(ex)
print &-----------------userid exists---------------------------------\n&
print &delete 1&, uid, start
dbcurr.execute('delete from urlids where uk=%s and type=1 and start&%s' % (uid, start))
elif 'getfanslist' in effective_url: #type = 2
fans = json.loads(metadata)
print &----------------------------------------fans----------------------------------\n&
uid = re_uid.findall(effective_url)[0]
if &total_count& in fans.keys() and fans[&total_count&]&0 and str(start) == &0&:
for i in range((fans[&total_count&]-1)/ONEPAGE):
dbcurr.execute('INSERT INTO urlids(uk, start, limited, type, status) VALUES(%s, %s, %s, 2, 0)' % (uid, str(ONEPAGE*(i+1)), str(ONEPAGE)))
except Exception as ex:
print &E2&, str(ex)
if &fans_list& in fans.keys():
for item in fans[&fans_list&]:
if item['pubshare_count']==0:
print &---------------------count ==0-------------------------------------------\n&
y = dbcurr.execute('SELECT id FROM user WHERE userid=%s', (item['fans_uk'],))
y = dbcurr.fetchone()
print &user uk&,item['fans_uk']
dbcurr.execute('INSERT INTO user(userid, username, files, status, downloaded, lastaccess,avatar_url,fans_count,follow_count,album_count) VALUES(%s, &%s&, %s, 0, 0, &%s&,&%s&,%s,%s,%s)' % (item['fans_uk'], item['fans_uname'],item['pubshare_count'],tnow,item['avatar_url'],item['fans_count'],item['follow_count'],item['album_count']))
except Exception as ex:
print &E23&, str(ex)
print &-----------------userid exists---------------------------------\n&
print &delete 2&, uid, start
dbcurr.execute('delete from urlids where uk=%s and type=2 and start&%s' % (uid, start))
shares = json.loads(metadata)
print &shares&
uid = re_uid.findall(effective_url)[0]
if &total_count& in shares.keys() and shares[&total_count&]&0 and str(start) == &0&:
for i in range((shares[&total_count&]-1)/ONESHAREPAGE):
dbcurr.execute('INSERT INTO urlids(uk, start, limited, type, status) VALUES(%s, %s, %s, 0, 0)' % (uid, str(ONESHAREPAGE*(i+1)), str(ONESHAREPAGE)))
except Exception as ex:
print &E3&, str(ex)
if &records& in shares.keys():
for item in shares[&records&]:
print &-------------------------------------filename------------------ &,item['title']
print &---------------------------------------------------------------\n&
stamp_t=int(item[&feed_time&])/1000
t= time.localtime(int(stamp_t))
share_time=time.strftime(&%Y-%m-%d %H:%M:%S&,t)
if &shorturl& in item.keys():
urls=item['shorturl']
if &filelist& in item.keys():
length=str(item['filelist'][0]['size'])
dbcurr.execute('INSERT INTO share(fid,userid, filename, shareid, status,filetype,share_time,create_time,urls,down,length) VALUES(&%s&,%s, &%s&, %s, 0,&%s&,&%s&,&%s&,&%s&,0,&%s&)' % (sid(int(item['shareid'])),uid, item['title'], item['shareid'],get_category(get_ext(item['title'])),share_time,tnow,urls,length))
# time.sleep(10)
except Exception as ex:
print &\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&E33\n&, str(ex)
print &item ---------------------------------------------\n&
# time.sleep(10)
print &delete 0&, uid, start
dbcurr.execute('delete from urlids where uk=%s and type=0 and start&%s' % (uid, str(start)))
dbcurr.execute('delete from urlids where id=%s' % (id, ))
except Exception as ex:
print &E5&, str(ex), id
pid = re_pptt.findall(effective_url)
print &pid&&&&, pid
ppid = int(pid[0])
PROXY_LIST[ppid][6] -= 1
dbcurr.close()
dbconn.close()
#演示站http://wwww.yunsou.me
def worker(k):
global success, failed
dbconn = mdb.connect(DB_HOST, DB_USER, DB_PASS, 'baiduyun', charset='utf8')
dbcurr = dbconn.cursor()
dbcurr.execute('SET NAMES utf8')
dbcurr.execute('set global wait_timeout=60000')
while True:
#dbcurr.execute('select * from urlids where status=0 order by type limit 1')
dbcurr.execute('select * from urlids where status=0 limit %s,1'%(str(k),))
d = dbcurr.fetchall()
id = d[0][0]
uk = d[0][1]
start = d[0][2]
limit = d[0][3]
type = d[0][4]
dbcurr.execute('update urlids set status=1 where id=%s' % (str(id),))
if type == 0:
url = URL_SHARE.format(uk=uk, start=start, id=id).encode('utf-8')
type == 1:
url = URL_FOLLOW.format(uk=uk, start=start, id=id).encode('utf-8')
elif type == 2:
url = URL_FANS.format(uk=uk, start=start, id=id).encode('utf-8')
hc_q.put((type, url))
if len(d)==0:
print &\ndata user uk\n &
dbcurr.execute('select * from user where status=0 limit %s,100'%(str(k*100),))
print &user &
d = dbcurr.fetchall()
#print &uk&,d
for item in d:
print &update user&,item[1]
dbcurr.execute('insert into urlids(uk, start, limited, type, status) values(&%s&, 0, %s, 0, 0)' % (item[1], str(ONESHAREPAGE)))
dbcurr.execute('insert into urlids(uk, start, limited, type, status) values(&%s&, 0, %s, 1, 0)' % (item[1], str(ONEPAGE)))
dbcurr.execute('insert into urlids(uk, start, limited, type, status) values(&%s&, 0, %s, 2, 0)' % (item[1], str(ONEPAGE)))
dbcurr.execute('update user set status=1 where userid=%s and id=%s' % (item[1],item[6]))
except Exception as ex:
print &E6&, str(ex)
time.sleep(1)
dbcurr.close()
dbconn.close()
#演示站http://wwww.yunsou.me
def req_worker(inx):
s = requests.Session()
while True:
time.sleep(1)
req_item = hc_q.get()
req_type = req_item[0]
url = req_item[1]
r = s.get(url)
hc_r.put((r.text, url))
for item in range(3):
t = threading.Thread(target = req_worker, args = (item,))
t.setDaemon(True)
for item in range(2):
s = threading.Thread(target = worker, args = (item,))
s.setDaemon(True)
for item in range(2):
t = threading.Thread(target = response_worker, args = ())
t.setDaemon(True)
ok,完工,想看的可以来看下
已发表评论数()
请填写推刊名
描述不能大于100个字符!
权限设置: 公开
仅自己可见
正文不准确
标题不准确
排版有问题
主题不准确
没有分页内容
图片无法显示
视频无法显示
与原文不一致下次自动登录
现在的位置:
& 综合 & 正文
百度云平台+django实战记录
日22:28:26:shit! Win7上 TortoiseSVN连不上,无语。用浏览器直接访问svn地址都可以,用TortoiseSVN却不可以,谁的问题?为了连接svn,搞了一晚上了。
试了TortoiseGit也不行,好吧,不用svn了,直接用自带的包上传更新功能。
问了百度客服,目前不支持TortoiseSVN 1.8,建议换成1.6,我换成1.7就OK了。
先从django开始
bae预装django 1.4,官网现在最新是1.5,没办法用1.4了。
1.下载安装django 1.4
前提:ubuntu 13.04 + python 2.7 + mysql已经都装好,ubuntu下装很方便的,python已经自带了。
要装一个python-mysqldb
sudo apt-get install python-mysqldb
官网下载地址:/download/1.4.5/tarball/
参考1.4版本的安装教程:
其实也就是解压,然后运行
sudo python setup.py install
下面命令验证安装结果:
&&& import django
&&& print django.get_version()
2.创建django项目
切换到一个目录,然后运行
django-admin.py startproject mysite
运行一个开发测试服务器,输入下面的命令:
python manage.py runserver
然后在浏览器访问
3.设置数据库
编辑mysite/settings.py,修改DATABASES一项
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'db_name',
# Or path to database file if using sqlite3.
'USER': 'root',
# Not used with sqlite3.
'PASSWORD': 'your_mysql_passwd',
# Not used with sqlite3.
'HOST': '',
# Set to empty string for localhost. Not used with sqlite3.
'PORT': '',
# Set to empty string for default. Not used with sqlite3.
django默认安装的应用有:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
# Uncomment the next line to enable the admin:
#'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
运行下面的命令,同步数据库,为默认安装的应用创建table:
python manage.py syncdb
4.创建自己的app
输入下面的命令,创建一个叫polls的应用
python manage.py startapp polls
这时候创建了一个polls文件夹:
__init__.py
接下来创建模型(models),按照官网的例子,编辑polls/models.py
from django.db import models
class Poll(models.Model):
question = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
class Choice(models.Model):
poll = models.ForeignKey(Poll)
choice = models.CharField(max_length=200)
votes = models.IntegerField()
这里的意思创建了两个模型:Poll、Choice。
激活模型,编辑mysite/settings.py中INSTALLED_APP,如下:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
# Uncomment the next line to enable the admin:
# 'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
可以在shell下输入一些python语句,进入shell环境的命令:
python manage.py shell
&&& from polls.models import Poll, Choice
# Import the model classes we just wrote.
# No polls are in the system yet.
&&& Poll.objects.all()
# Create a new Poll.
&&& from django.utils import timezone
&&& p = Poll(question="What's new?", pub_date=timezone.now())
# Save the object into the database. You have to call save() explicitly.
&&& p.save()
# Now it has an ID. Note that this might say "1L" instead of "1", depending
# on which database you're using. That' it just means your
# database backend prefers to return integers as Python long integer
# objects.
给模型增加一个__unicode__()方法,让模型显示默认的信息:
class Poll(models.Model):
def __unicode__(self):
return self.question
class Choice(models.Model):
def __unicode__(self):
return self.choice
5.激活admin应用
首先在mysite/settings.py里打开django.contrib.admin应用,然后同步下数据库python manage.py syncdb
接着编辑mysite/urls.py,编辑后如下:
from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', '{{ project_name }}.views.home', name='home'),
# url(r'^{{ project_name }}/', include('{{ project_name }}.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
接下来启动测试服务器python manage.py runserver,在浏览器中输入,就可看到admin界面。
admin里并没有我们刚才创建的模型,需要如下修改:
在polls目录下创建一个admin.py文件,文件内容为
from polls.models import Poll
from django.contrib import admin
admin.site.register(Poll)
重启测试服务器,能看到新加的模型。
5.创建视图
编辑mysite/urls.py如下:
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^polls/$', 'polls.views.index'),
url(r'^polls/(?P&poll_id&\d+)/$', 'polls.views.detail'),
url(r'^polls/(?P&poll_id&\d+)/results/$', 'polls.views.results'),
url(r'^polls/(?P&poll_id&\d+)/vote/$', 'polls.views.vote'),
url(r'^admin/', include(admin.site.urls)),
写第一个view,编辑polls/views.py:
from django.http import HttpResponse
def index(request):
return HttpResponse("Hello, world. You're at the poll index.")
往下更进一步的丰富视图略。
到此一个简单的django站点就建好了,接下来是部署百度云平台。
第二部分 部署百度云平台
1.注册账号是最简单的。
妈的,在bae上就是不成功。
换成阿里云服务器吧,本篇结束,另起一篇。
&&&&推荐文章:
【上篇】【下篇】}

我要回帖

更多关于 authtoken什么意思 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信