summaryrefslogtreecommitdiff
path: root/gstudio
diff options
context:
space:
mode:
Diffstat (limited to 'gstudio')
-rw-r--r--gstudio/static/gstudio/js/addcontent.js26
-rw-r--r--gstudio/templates/gstudio/NewPage.html6
-rw-r--r--gstudio/templates/gstudio/NewSection1.html5
-rw-r--r--gstudio/templates/gstudio/docu.html38
-rw-r--r--gstudio/templates/gstudio/image.html45
-rw-r--r--gstudio/templates/gstudio/skeleton.html4
-rw-r--r--gstudio/templates/gstudio/tags/commentpage.html23
-rw-r--r--gstudio/templates/gstudio/video.html100
-rw-r--r--gstudio/templates/metadashboard/pgedashboard.html71
-rw-r--r--gstudio/views/page.py8
-rw-r--r--gstudio/views/video.py14
11 files changed, 234 insertions, 106 deletions
diff --git a/gstudio/static/gstudio/js/addcontent.js b/gstudio/static/gstudio/js/addcontent.js
index fe4f51c..655e2f5 100644
--- a/gstudio/static/gstudio/js/addcontent.js
+++ b/gstudio/static/gstudio/js/addcontent.js
@@ -4,6 +4,7 @@
$("#addcontent").one("click",function(){
//var abc = document.getElementById('pageid1').value;
//window.location.replace('sectionadd1/'+abc);
+ $("#save").show();
$("#chart").hide();
// var orgdata = document.getElementById('orgcontent').value;
document.getElementById('gnoweditor').style.visibility="visible";
@@ -27,6 +28,7 @@
$("#chart").hide();
document.getElementById('gnoweditor').style.visibility="visible";
$("#gnoweditor").orgitdown(mySettings);
+ $("#save1").show();
});
$("#save1").one("click",function() {
var org_data = $("#gnoweditor").val();
@@ -36,6 +38,8 @@
});
$("#editseccontent").one("click",function(){
+ $("#saveseccontent").show();
+
$("#chart").hide();
document.getElementById('gnoweditor').style.visibility="visible";
$("#gnoweditor").orgitdown(mySettings);
@@ -44,10 +48,6 @@
var screenTop = $(document).scrollTop();
$(".orgitdownContainer").css({
"margin-top":screenTop,});
- $("#savesubsec").hide();
- $("#savesubsec1").hide();
- $("#savepagecontent").hide();
-
});
$("#saveseccontent").one("click",function(){
var org_data = $("#gnoweditor").val();
@@ -85,6 +85,8 @@
});
$("#editsubsec").one("click",function(){
+ $("#savesubsec1").show();
+
$("#chart").hide();
document.getElementById('gnoweditor').style.visibility="visible";
$("#gnoweditor").orgitdown(mySettings);
@@ -93,10 +95,7 @@
var screenTop = $(document).scrollTop();
$(".orgitdownContainer").css({
"margin-top":screenTop,});
- $("#savesubsec").hide();
- $("#saveseccontent").hide();
- $("#savepagecontent").hide();
-
+
});
$("#savesubsec1").one("click",function(){
var org_data = $("#gnoweditor").val();
@@ -136,6 +135,7 @@
$("#editpagecontent").one("click",function(){
$("#chart").hide();
+ $("#savepagecontent").show();
document.getElementById('gnoweditor').style.visibility="visible";
$("#gnoweditor").orgitdown(mySettings);
@@ -144,10 +144,6 @@
var screenTop = $(document).scrollTop();
$(".orgitdownContainer").css({
"margin-top":screenTop,});
- $("#saveseccontent").hide();
- $("#savesubsec").hide();
- $("#savesubsec1").hide();
-
});
$("#savepagecontent").one("click",function(){
@@ -189,6 +185,8 @@
$("#createsubsection").one("click",function(){
+ $("#savesubsec").show();
+
$("#chart").hide();
document.getElementById('gnoweditor').style.visibility="visible";
$("#gnoweditor").orgitdown(mySettings);
@@ -196,9 +194,7 @@
var screenTop = $(document).scrollTop();
$(".orgitdownContainer").css({
"margin-top":screenTop,});
- $("#savesubsec1").hide();
- $("#saveseccontent").hide();
- $("#savepagecontent").hide();
+
});
$("#savesubsec").one("click",function() {
var org_data = $("#gnoweditor").val();
diff --git a/gstudio/templates/gstudio/NewPage.html b/gstudio/templates/gstudio/NewPage.html
index ac87a10..b73b0dc 100644
--- a/gstudio/templates/gstudio/NewPage.html
+++ b/gstudio/templates/gstudio/NewPage.html
@@ -1,6 +1,12 @@
{%extends "gstudio/base.html"%}
{%load i18n %}
{% block content %}
+<script src="http://code.jquery.com/jquery-latest.js"></script>
+ <script type="text/javascript" >
+ $(window).load(function() {
+ $("#save1").hide();});
+</script>
+
{%if user.is_authenticated%}
{% if errors %}
<ul>
diff --git a/gstudio/templates/gstudio/NewSection1.html b/gstudio/templates/gstudio/NewSection1.html
index 01cd3d9..daf29bc 100644
--- a/gstudio/templates/gstudio/NewSection1.html
+++ b/gstudio/templates/gstudio/NewSection1.html
@@ -1,6 +1,11 @@
{% extends "gstudio/base.html" %}
{% block content %}
+<script src="http://code.jquery.com/jquery-latest.js"></script>
+ <script type="text/javascript" >
+ $(window).load(function() {
+ $("#save").hide();});
+</script>
<h1>Add a new Section</h1>
{% if errors %}
<ul>
diff --git a/gstudio/templates/gstudio/docu.html b/gstudio/templates/gstudio/docu.html
index dc9f151..58e6a44 100644
--- a/gstudio/templates/gstudio/docu.html
+++ b/gstudio/templates/gstudio/docu.html
@@ -23,32 +23,26 @@ $(window).load(function() {
var i = 0;
</script>
<style type="text/css">
-#divpost
+#divsearch
+{
+position:absolute;
+}
+#upperdiv
{
position:relative;
+margin-bottom:35%;
}
-#divsearch
+#divpost
{
position:absolute;
-margin-left:61%;
-margin-top:-26%;
+margin-left:52%;
}
</style>
{% if user.is_authenticated %}
{% autopaginate documents 8 %}
<h2 style="color: teal;">Document Library</h2>
<br>
-<div id="divpost">
-<form enctype="multipart/form-data" method="post" action="">{% csrf_token %}
-<br/>
-Post File:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<input type=file name="doc[]" multiple="multiple" /><br><br>
-Description:&nbsp;&nbsp;<input type=textarea name="contenttext"/>
-<input type="hidden" name="user" value={{user.username}}><br><br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<input type="submit" value="Post">
-</form>
-</div>
+<div id="upperdiv">
<div id="divsearch">
<form method="post" action="">
@@ -67,6 +61,20 @@ Description:&nbsp;&nbsp;<input type=textarea name="contenttext"/>
<input type="submit" value="Search">
</form>
</div>
+
+<div id="divpost">
+<form enctype="multipart/form-data" method="post" action="">{% csrf_token %}
+<br/>
+<h4 style="color: black;">Post File:</h4>&nbsp;
+file:&nbsp;<input type=file name="doc[]" multiple="multiple" /><br><br>
+Description:&nbsp;&nbsp;<input type=textarea name="contenttext"/>
+<input type="hidden" name="user" value={{user.username}}><br><br>
+
+<input type="submit" value="Post">
+</form>
+</div>
+
+</div>
<br>
<br>
<br>
diff --git a/gstudio/templates/gstudio/image.html b/gstudio/templates/gstudio/image.html
index 293b7ec..73d05da 100644
--- a/gstudio/templates/gstudio/image.html
+++ b/gstudio/templates/gstudio/image.html
@@ -29,38 +29,34 @@ background-color:#E8E8E8 ;
background-color:white
}
-#divpost
+#divsearch
+{
+position:absolute;
+}
+#upperdiv
{
position:relative;
+margin-bottom:35%;
}
-#divsearch
+#divpost
{
position:absolute;
-margin-left:61%;
-margin-top:-35%;
+margin-left:52%;
}
+
</style>
{% if user.is_authenticated %}
{% autopaginate images 10 %}
<h2 style="color: teal;">Image Library</h2>
-<div id="divpost">
-<form enctype="multipart/form-data" method="post" action="">
-{% csrf_token %}
+<br/>
+<div id="upperdiv">
-<h1 style="color: black; margin-left: 0px;">Post Image:</h1>
-Title:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" name="title1"><br/><br/>
-Image:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type=file name="image[]" multiple="multiple" /><br/><br/>
-Description:&nbsp;&nbsp;<input type=textarea name="contenttext"/>
-<input type="hidden" name="user" value={{user.username}}><br/><br/>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value=" Post " size="900" name="post">
-</form>
-</div>
<div id="divsearch">
<form method="post" action="">
{% csrf_token %}
-<h1 style="color: black; margin-left: 0px;">Search Image:</h1>
+<h4 style="color: black; margin-left: 0px;">Search Image:</h4>
<p><input type="text" name="simg" value={{val}}></p>
<br/>
<p><div align="left">
@@ -72,8 +68,23 @@ Description:&nbsp;&nbsp;<input type=textarea name="contenttext"/>
<input type="submit" value="Search">
</form>
</div>
-<br>
+<div id="divpost">
+<form enctype="multipart/form-data" method="post" action="">
+{% csrf_token %}
+
+<h4 style="color: black; margin-left: 0px;">Post Image:</h4>
+Title:&nbsp; <input type="text" name="title1"><br/><br/>
+Image:&nbsp; <input type=file name="image[]" multiple="multiple" /><br/><br/>
+Description:&nbsp;&nbsp;<input type=textarea name="contenttext"/>
+<input type="hidden" name="user" value={{user.username}}><br/><br/>
+<input type="submit" value=" Post " size="900" name="post" onclick="return myupload();">
+
+
+</form>
+</div>
+</div>
+<br>
<div>
<h4 style="color: teal;">IMAGES</h4>
{% for image in images %}
diff --git a/gstudio/templates/gstudio/skeleton.html b/gstudio/templates/gstudio/skeleton.html
index 3e0de7f..176b0b3 100644
--- a/gstudio/templates/gstudio/skeleton.html
+++ b/gstudio/templates/gstudio/skeleton.html
@@ -293,6 +293,10 @@
<script type="text/javascript" src="{{STATIC_URL}}gstudio/js/topiccomment.js"></script>
+ <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
+ <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/orgitdown/orgitdown/sets/org/set.js"></script>
+
+ <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/orgitdown/orgitdown/jquery.orgitdown.js"></script>
<script type="text/javascript" src="{{STATIC_URL}}gstudio/js/orgitdown/orgitdown/sets/savedata.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
diff --git a/gstudio/templates/gstudio/tags/commentpage.html b/gstudio/templates/gstudio/tags/commentpage.html
index 1b5a0ca..a55f4ed 100644
--- a/gstudio/templates/gstudio/tags/commentpage.html
+++ b/gstudio/templates/gstudio/tags/commentpage.html
@@ -4,6 +4,8 @@
{% load gstudio_tags %}
{% load i18n %}
+{% load tagging_tags comments i18n %}
+
@@ -32,7 +34,26 @@
<input type="button" id="subsecorg" value="{{child.content_org}}" style="visibility:hidden;"/>
<input type="button" id="subsecid" value="{{child.id}}" style="visibility:hidden;"/>
<input type="checkbox" name="del_comment" value="delete_comment">
- <input type="submit" value="Delete this Subsection">
+ <input type="submit" value="Delete this Subsection"></br>
+ <form method="post" action="">{% csrf_token %}
+ <input type="hidden" name="docid" value={{child.id}}>
+ <input type="text" value="" name="texttags" />
+ <input type="submit" value="Add Tags" name="addtags" />
+ </form>
+ <br>
+ <div class="tags">
+ <p class="gbobject-tags span-16 last">
+ <strong>{% trans "Tags" %}</strong> :
+ {% tags_for_object child as tag_list %}
+ {% for tag in tag_list %}
+ <a href="{% url objectapp_tag_detail tag %}"
+ title="Tag {{ tag }}" rel="tag">{{ tag }}</a>
+ {% empty %}
+ <span>{% trans "No tags" %}</span>
+ {% endfor %}
+ </p>
+ </div>
+
</form>
{% show_commentpage child idusr flag admin_id attribute%}
</li>
diff --git a/gstudio/templates/gstudio/video.html b/gstudio/templates/gstudio/video.html
index f2ae11d..1a2f6bf 100644
--- a/gstudio/templates/gstudio/video.html
+++ b/gstudio/templates/gstudio/video.html
@@ -13,7 +13,7 @@
$(window).load(function() {
$("#chart").hide();});
$(window).load(function() {
-
+
$("#graphcss").hide();
});
var i = 0;
@@ -27,15 +27,33 @@ background-color:#E8E8E8 ;
{
background-color:white
}
-#divpost
+#divsearch
+{
+position:absolute;
+}
+#upperdiv
{
position:relative;
+margin-bottom:20%;
}
-#divsearch
+#divpost
{
position:absolute;
-margin-left:61%;
-margin-top:-23%;
+margin-left:52%;
+}
+#showingprocess
+{
+width:371px;
+height:38px;
+border:solid 1px #B3B3B3;
+}
+#inner{
+width:10px;
+height:36px;
+border:solid 1px blue;
+margin-top:1px;
+background: green;
+
}
</style>
@@ -46,28 +64,8 @@ margin-top:-23%;
<h2 style="color: teal;">Video Library</h2>
<br/>
-<div id="divpost">
-<form enctype="multipart/form-data" method="post" action="">
-{% csrf_token %}
-<p><h4 style="color: black;">Submit Videos:</h4>Video:&nbsp;<input type="file" name="clip" multiple="multiple" /></p><br/>
-Description:&nbsp;&nbsp;<input type=textarea name="contenttext"/>
-<input type="hidden" name="user" value={{user.username}}>
-<input type="hidden" name="userpassword" value={{user.password}}>
-<input type="hidden" name="useremail" value={{user.email}}>
-<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<input type="submit" value="Upload" onclick="return myupload();" >
-<input type="hidden" name="upload" id = "uploadid">
-<script type="text/javascript">
-function myupload()
-{
+<div id="upperdiv">
-var prompta = prompt("Enter your password")
-document.getElementById("uploadid").setAttribute("value",prompta);
-}
-</script>
-
-</form>
-</div>
<div id="divsearch">
<form method="post" action="">
{% csrf_token %}
@@ -79,7 +77,7 @@ document.getElementById("uploadid").setAttribute("value",prompta);
<option value="title">Title</option>
<option value="creation_date">Creation Date</option>
</select>
-
+<br/>
<input type="submit" name="norm" value="Search">
<input type="submit" name="spe" value="Search by User">
</form>
@@ -90,19 +88,63 @@ document.getElementById("uploadid").setAttribute("value",prompta);
<input type="submit" name="fav" value="View Favourites">
</form>
</div>
+<div id="divpost">
+<form enctype="multipart/form-data" method="post" action="">
+{% csrf_token %}
+<p><h4 style="color: black;">Submit Videos:</h4>Video:&nbsp;<input type="file" name="clip" multiple="multiple" /></p><br/>
+Description:&nbsp;&nbsp;<input type=textarea name="contenttext"/>
+<input type="hidden" name="user" value={{user.username}}>
+<input type="hidden" name="userpassword" value={{user.password}}>
+<input type="hidden" name="useremail" value={{user.email}}><br/><br/>
+<p><b> Enter the password of wetube.gnowledge.org</b> </p>
+<input type="password" name="videopassword" />
+<br/><br/>
+<input type="submit" value="Upload" onclick="return myupload();" >
+<script type="text/javascript">
+function myupload()
+{
+document.getElementById('showingprocess').style.visibility="visible";
+document.getElementById('headvideo').style.visibility="visible";
+
+ setInterval( function() {
+ if( i < 340 )
+ {
+
+ i = i + 20;
+ $("#inner").css({ "-moz-box-sizing":"border-box", "margin-left":i });
+ }
+ else
+ {
+ i = 0;
+ }
+ },1000);
+
+
+
+}
+</script>
+</form>
+</div>
+</div>
+
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
+<h2 id="headvideo" style="visibility:hidden;">Processing And Uploading Video</h2>
+<div id="showingprocess" style="visibility:hidden;">
+<div id="inner">
+</div>
+</div>
{% if fav %}
<h2 style="color: teal;">Favourite Videos</h2><br/>
{% else %}
<h2 style="color: teal;">List of Videos in the library </h2><br/>
{% endif %}
-
+<div id="listvideo">
{% for video in vids %}
<!--<iframe src="{{video.rurl}}/embed?in=0&out=10000&view=video" width="256" height="144" allowfullscreen></iframe>-->
@@ -180,7 +222,7 @@ document.getElementById("divvideo").setAttribute("id","div2");
{% endfor %}
-
+</div>
<br>
{% else %}
diff --git a/gstudio/templates/metadashboard/pgedashboard.html b/gstudio/templates/metadashboard/pgedashboard.html
index c46cc07..f06063a 100644
--- a/gstudio/templates/metadashboard/pgedashboard.html
+++ b/gstudio/templates/metadashboard/pgedashboard.html
@@ -3,6 +3,9 @@
{% load adminmedia grp_tags %}
{% load gstudio_tags %}
{% load pagination_tags %}
+{% load i18n objectapp_tags %}
+{% load tagging_tags comments i18n %}
+
<!-- {% load i18n %} -->
{% block content %}
<style>
@@ -20,6 +23,14 @@ $(window).load(function() {
$("#graphcss").hide();
});
+$(window).load(function() {
+
+ $("#savepagecontent").hide();
+ $("#saveseccontent").hide();
+ $("#savesubsec").hide();
+ $("#savesubsec1").hide();
+
+ });
</script>
@@ -39,32 +50,27 @@ $(window).load(function() {
<input type="button" id="editpagecontent" value="Edit"/>
<input type="button" id="savepagecontent" value="Save"/></br>
+ <form method="post" action="">{% csrf_token %}
+ <input type="hidden" name="docid" value={{page_ob.id}}>
+ <input type="text" value="" name="texttags" />
+ <input type="submit" value="Add Tags" name="addtags" />
+ </form>
+ <br>
+ <div class="tags">
+ <p class="gbobject-tags span-16 last">
+ <strong>{% trans "Tags" %}</strong> :
+ {% tags_for_object ot as tag_list %}
+ {% for tag in tag_list %}
+ <a href="{% url objectapp_tag_detail tag %}"
+ title="Tag {{ tag }}" rel="tag">{{ tag }}</a>
+ {% empty %}
+ <span>{% trans "No tags" %}</span>
+ {% endfor %}
+ </p>
+ </div>
<input type="button" id="pageid" value="{{page_ob.id}}" style="visibility:hidden;"/>
<input type="button" id="pageorg" value="{{page_ob.content_org}}" style="visibility:hidden;"/>
-
- <!-- <h3> This Discussion was initiated by {{admin_m.username}}</h3> -->
-
- <!-- <h>You are logged in as <font color="blue">{{user.username}}</font></h> -->
-
- <!-- {%if flag %} -->
- <!-- <div id="Release"> -->
- <!-- <form method="post" action=".">{% csrf_token %} -->
- <!-- <input type="submit" value="Release Replies"> -->
- <!-- <input type="hidden" value="hits" name = "pagerelease"> -->
- <!-- </form> -->
- <!-- </div> -->
- <!-- <div> -->
- <!-- <form method="post" action=".">{% csrf_token %} -->
- <!-- <input type="submit" value="Block Replies"> -->
- <!-- <input type="hidden" value="hits" name = "block"> -->
- <!-- </form> -->
- <!-- </div> -->
- <!-- {% endif %} -->
- <!-- </br> -->
-
-
<form method="post" action=".">{% csrf_token %}
-<!-- <input type="hidden" value="{{page_ob.id}}" name = "pageid">-->
<input type="button" id="newsection1" value="Add a new Section" onClick="location.href=parseURL('sectionadd1/{{page_ob.id}}');">
<input type="hidden" id="pageid1" value="{{page_ob.id}}"/>
</form>
@@ -89,6 +95,25 @@ $(window).load(function() {
{% endautoescape%}
<input type="button" id="editseccontent" value="Edit"/>
<input type="button" id="saveseccontent" value="Save"/>
+ <form method="post" action="">{% csrf_token %}
+ <input type="hidden" name="docid" value={{each.id}}>
+ <input type="text" value="" name="texttags" />
+ <input type="submit" value="Add Tags" name="addtags" />
+ </form>
+ <br>
+ <div class="tags">
+ <p class="gbobject-tags span-16 last">
+ <strong>{% trans "Tags" %}</strong> :
+ {% tags_for_object each as tag_list %}
+ {% for tag in tag_list %}
+ <a href="{% url objectapp_tag_detail tag %}"
+ title="Tag {{ tag }}" rel="tag">{{ tag }}</a>
+ {% empty %}
+ <span>{% trans "No tags" %}</span>
+ {% endfor %}
+ </p>
+ </div>
+
<input type="button" id="sectionorg" value="{{each.content_org}}" style="visibility:hidden;"/>
<input type="button" id="sectionid" value="{{each.id}}" style="visibility:hidden;"/>
<form method="post" action=".">{% csrf_token %}<br/>
diff --git a/gstudio/views/page.py b/gstudio/views/page.py
index d673f77..e59caec 100644
--- a/gstudio/views/page.py
+++ b/gstudio/views/page.py
@@ -39,12 +39,20 @@ def pagedashboard(request,pageid):
# # block = request.POST.get("block","")
section_del = request.POST.get("del_section", "")
comment_del = request.POST.get("del_comment", "")
+ docid = request.POST.get("docid","")
+ addtags = request.POST.get("addtags","")
+ texttags = request.POST.get("texttags","")
if section_del:
del_section(int(id_no))
if comment_del:
del_comment(int(id_no1))
if rating :
rate_section(int(id_no),request,int(rating))
+ if addtags != "":
+ i=Gbobject.objects.get(id=docid)
+ i.tags = i.tags+ ","+str(texttags)
+ i.save()
+
if rep :
if not id_no :
ptitle= make_title(int(id_no))
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()