summaryrefslogtreecommitdiff
path: root/gstudio/views
diff options
context:
space:
mode:
authorDhiru <dhiru@labadmin-P5E-Deluxe.(none)>2012-08-14 14:49:47 +0530
committerDhiru <dhiru@labadmin-P5E-Deluxe.(none)>2012-08-14 14:49:47 +0530
commit374eb2576ac59e0792349e97ab5f689671d8712a (patch)
tree5fd5508ca0e1866926913778aaa7af3fc076a306 /gstudio/views
parenta5796265013443c349797508ef8066541c1a3a02 (diff)
downloadgnowsys-374eb2576ac59e0792349e97ab5f689671d8712a.tar.gz
modifying the looks of image,video and document library
Diffstat (limited to 'gstudio/views')
-rw-r--r--gstudio/views/video.py14
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()