diff options
author | gnowgi <nagarjun@gnowledge.org> | 2012-08-14 04:39:39 -0700 |
---|---|---|
committer | gnowgi <nagarjun@gnowledge.org> | 2012-08-14 04:39:39 -0700 |
commit | fd9cc8dfc4a21b606eddf9184da10aebe00f2644 (patch) | |
tree | 819e1e1bc8a492863e0bcace1b1a5e5150d20037 /gstudio/views | |
parent | 86e66913d92e2534ca9ddf8a1a61b323d0cf277a (diff) | |
parent | 374eb2576ac59e0792349e97ab5f689671d8712a (diff) | |
download | gnowsys-fd9cc8dfc4a21b606eddf9184da10aebe00f2644.tar.gz |
Merge pull request #82 from Dhiru/master
minor modifications of the templates of video, document and images.
Diffstat (limited to 'gstudio/views')
-rw-r--r-- | gstudio/views/video.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gstudio/views/video.py b/gstudio/views/video.py index 668e77b..65e9d43 100644 --- a/gstudio/views/video.py +++ b/gstudio/views/video.py @@ -60,10 +60,9 @@ def video(request): mapname = request.POST.get("mapname","") wename = request.POST.get("wename","") titlename = request.POST.get("titlename","") - password = request.POST.get("upload","") addtags = request.POST.get("addtags","") texttags = request.POST.get("texttags","") - + password = request.POST.get("videopassword","") if rate == '0': rate = 'No rating yet' else : @@ -120,7 +119,6 @@ def video(request): if clip != "": - userauth = authenticate(username=user, password=password) api.signup({'username':user,'password':password,'email':useremail}) save_file(clip,user) clipname = clip._get_name() @@ -131,7 +129,7 @@ def video(request): i=i+1 y=str(dirname) x=str(clipname[0]).upper() - CreateConfig(user) + CreateConfig(user,password) # os.system("pandora_client config") os.system("pandora_client add_volume "+ user+" "+MEDIA_ROOTNEW+"/"+user ) os.system("pandora_client scan") @@ -146,6 +144,8 @@ def video(request): m.content=content m.status=2 m.save() + m.sites.add(Site.objects.get_current()) + m.save() m.objecttypes.add(Objecttype.objects.get(id=p.id)) m.save() a=Attribute() @@ -235,6 +235,8 @@ def video(request): m.content=content m.status=2 m.save() + m.sites.add(Site.objects.get_current()) + m.save() m.objecttypes.add(Objecttype.objects.get(id=p.id)) m.save() a=Attribute() @@ -322,10 +324,10 @@ def sort_video(video): -def CreateConfig(user): +def CreateConfig(user,password): myfile = open(VIDEO_PANDORA_URL,'w') myfile = open(VIDEO_PANDORA_URL,'a') - myfile.write('{ \n "username":"'+user+'", \n "url":"http://wetube.gnowledge.org/api/",\n"cache": "~/.ox/client.sqlite",\n"media-cache": "~/.ox/media",\n"volumes":{},\n"password":"wetube"\n }') + myfile.write('{ \n "username":"'+user+'", \n "url":"http://wetube.gnowledge.org/api/",\n"cache": "~/.ox/client.sqlite",\n"media-cache": "~/.ox/media",\n"volumes":{},\n"password":"'+password+'"\n }') myfile.close() |