[Uludag-commits] r15241 - in trunk/pijama: . locale/tr/LC_MESSAGES pijidb templates
uludag-commits at pardus.org.tr
uludag-commits at pardus.org.tr
1 Eyl 2007 Cmt 12:56:11 EEST
Author: oguzy
Date: Sat Sep 1 12:56:10 2007
New Revision: 15241
Added:
trunk/pijama/locale/tr/LC_MESSAGES/django.mo (contents, props changed)
trunk/pijama/templates/HeadLogo.png (contents, props changed)
trunk/pijama/templates/HeadTile.png (contents, props changed)
trunk/pijama/templates/base.html~
trunk/pijama/templates/base_main.html~
trunk/pijama/templates/binary.html~
trunk/pijama/templates/binarypackagedetails.html
trunk/pijama/templates/binarypackagedetails.html~
trunk/pijama/templates/index.html~
trunk/pijama/templates/packagedetails.html
trunk/pijama/templates/packagedetails.html~
trunk/pijama/templates/packagerdetails.html~
trunk/pijama/templates/packagers.html~
trunk/pijama/templates/search.html
trunk/pijama/templates/search.html~
trunk/pijama/templates/search_result.html
trunk/pijama/templates/search_result.html~
trunk/pijama/templates/source.html~
trunk/pijama/templates/stil.css~
Modified:
trunk/pijama/locale/tr/LC_MESSAGES/django.po
trunk/pijama/pijidb/models.py
trunk/pijama/syncdb.py
trunk/pijama/urls.py
trunk/pijama/views.py
Log:
possible to make searchs according to the source or binary package, packager name or patch
Modified: trunk/pijama/locale/tr/LC_MESSAGES/django.po
=================================================================
--- trunk/pijama/locale/tr/LC_MESSAGES/django.po (original)
+++ trunk/pijama/locale/tr/LC_MESSAGES/django.po Sat Sep 1 12:56:10 2007
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-08-31 18:34+0300\n"
+"POT-Creation-Date: 2007-09-01 12:51+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Oğuz Yarımtepe <oguzy at comu.edu.tr>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
@@ -28,7 +28,7 @@
msgid "Binary Packages"
msgstr "İkilik Paketler"
-#: views.py:143
+#: views.py:143 templates/packagers.html:8 templates/base_main.html:19
msgid "Packagers"
msgstr "Paketçiler"
@@ -40,6 +40,32 @@
msgid "alphabetical"
msgstr "alfabetik"
+#: views.py:279 templates/search.html:8 templates/base_main.html:20
+msgid "Search"
+msgstr "Arama"
+
+#: views.py:284
+msgid "Search Result"
+msgstr "Arama Sonuçları"
+
+#: templates/search.html:19 templates/packagerdetails.html:15
+#: templates/packagers.html:16 templates/binary.html:16
+#: templates/source.html:16
+msgid "Packager"
+msgstr "Paketçi adı"
+
+#: templates/search.html:20
+msgid "Binary"
+msgstr ""
+
+#: templates/search.html:21
+msgid "Source"
+msgstr "Kaynak paketler"
+
+#: templates/search.html:22
+msgid "Patch"
+msgstr "Yamalar"
+
#: templates/packagedetails.html:20
msgid "License"
msgstr "Lisans"
@@ -90,11 +116,6 @@
msgid "Summary"
msgstr "Özet"
-#: templates/packagerdetails.html:15 templates/packagers.html:16
-#: templates/binary.html:16 templates/source.html:16
-msgid "Packager"
-msgstr "Paketçi adı"
-
#: templates/packagerdetails.html:18
msgid "Packages that he/she responsible from"
msgstr "Sorumlu olduğu paketler"
@@ -104,14 +125,22 @@
msgstr "Paket güncelleştirmeleri"
#: templates/binarypackagedetails.html:17
+msgid "Installed size"
+msgstr ""
+
+#: templates/binarypackagedetails.html:18
+msgid "Package size"
+msgstr "Paket büyüklüğü"
+
+#: templates/binarypackagedetails.html:20
msgid "Source package"
msgstr "Kaynak paketler"
-#: templates/binarypackagedetails.html:19
+#: templates/binarypackagedetails.html:22
msgid "Buildtime dependencies"
msgstr "İnşa bağımlılıkları"
-#: templates/binarypackagedetails.html:23
+#: templates/binarypackagedetails.html:26
msgid "Runtime dependencies"
msgstr "Çalışma zamanı bağımlılıkları"
@@ -147,9 +176,13 @@
msgid "Longest action.py file"
msgstr "En uzun inşa betiği:"
-#: templates/base_main.html:20
-msgid "Search"
-msgstr "Arama"
+#: templates/search_result.html:8
+msgid "Search Results"
+msgstr "Arama Sonuçları"
+
+#: templates/search_result.html:15
+msgid "Result"
+msgstr "Sonuç"
#: templates/base_main.html:21
msgid "Feed"
Modified: trunk/pijama/pijidb/models.py
=================================================================
--- trunk/pijama/pijidb/models.py (original)
+++ trunk/pijama/pijidb/models.py Sat Sep 1 12:56:10 2007
@@ -21,6 +21,7 @@
actionpylen=models.IntegerField(default=0)
numofpatchs=models.IntegerField(default=0)
path=models.CharField(maxlength=500, null=True)
+ summary=models.CharField(maxlength=2000, null=True)
def __str__(self):
return self.pkgname
@@ -67,6 +68,7 @@
pkgname=models.ForeignKey(RepoPackages)
name=models.CharField(maxlength=50)
reponame=models.CharField(maxlength=50)
+ summary=models.CharField(maxlength=2000)
def __str__(self):
return self.name
Modified: trunk/pijama/syncdb.py
=================================================================
--- trunk/pijama/syncdb.py (original)
+++ trunk/pijama/syncdb.py Sat Sep 1 12:56:10 2007
@@ -44,7 +44,7 @@
return datetime.date(int(li[0]), int(li[1]), int(li[2]))
- def tableactions(self, pckgname, reponame, dirs, root, actionfilelen, numofpatchs):
+ def tableactions(self, pckgname, reponame, dirs, root, actionfilelen, numofpatchs, summary):
try:#try whether there exists a package at the repo, if so just edit the repo date edit info
something=__import__("pijama.pijidb.models")
@@ -74,7 +74,7 @@
#print pckgname, reponame, self.spec.source.isA[0], self.spec.source.partOf, actionfilelen
- x=t(pkgname=pckgname, reponame=reponame, isa=ISA, partof=PARTOF, actionpylen=actionfilelen, numofpatchs=numofpatchs, path=root)
+ x=t(pkgname=pckgname, reponame=reponame, isa=ISA, partof=PARTOF, actionpylen=actionfilelen, numofpatchs=numofpatchs, path=root, summary=summary)
x.save()
@@ -125,7 +125,7 @@
binaries=self.spec.packages
for binary in binaries:
- p.binarypacks_set.create(name=binary.name, reponame=reponame)
+ p.binarypacks_set.create(name=binary.name, reponame=reponame, summary=binary.summary)
print "binaries done"
for pkgknowledge in binaries:
@@ -178,7 +178,7 @@
else: t1=history[-1].type
if history[0].type == None: t2="normal"
else: t2=history[0].type
- p.history_set.create(updatetype=t1, date=self.makedate(history[-1].date)i reponame=reponame)#first relase date
+ p.history_set.create(updatetype=t1, date=self.makedate(history[-1].date), reponame=reponame)#first relase date
p.history_set.create(updatetype=t2, date=self.makedate(history[0].date), reponame=reponame)#last edit date
if "screenshots" in dirs:
@@ -226,11 +226,15 @@
print self.pkgname
numofpatchs=len(self.spec.source.patches)
+ summary=self.spec.source.summary
+ print summary
+ #if summary.has_key("en"):summary=summary["en"]
+ #if summary.has_key("tr"):summary=summary["tr"]
f=open(os.path.join(root,"actions.py"))
actionfilelen=len(f.readlines())
f.close()
- self.tableactions(self.pkgname, self.reponame, dirs, root, actionfilelen, numofpatchs)
+ self.tableactions(self.pkgname, self.reponame, dirs, root, actionfilelen, numofpatchs, summary)
if __name__ == "__main__":
Modified: trunk/pijama/urls.py
=================================================================
--- trunk/pijama/urls.py (original)
+++ trunk/pijama/urls.py Sat Sep 1 12:56:10 2007
@@ -23,4 +23,6 @@
(r'^main/(?P<reponame>.*)/packagers/(?P<packagername>.*)/$', 'pijama.views.showpackagerdetails'),
(r'^main/(?P<reponame>.*)/sources/(?P<packagename>.*)/$', 'pijama.views.showpkgdetails'),
(r'^main/(?P<reponame>.*)/binaries/(?P<packagename>.*)/$', 'pijama.views.showbinarydetails'),
+ (r'^main/(?P<reponame>.*)/search/$', 'pijama.views.search'),
+ (r'^main/(?P<reponame>.*)/search_result/$', 'pijama.views.searchresult'),
)
Modified: trunk/pijama/views.py
=================================================================
--- trunk/pijama/views.py (original)
+++ trunk/pijama/views.py Sat Sep 1 12:56:10 2007
@@ -267,11 +267,65 @@
h=spec.history
pkgversion=h[0].version
- return render_to_response("binarypackagedetails.html", {"pkgname":packagename, "builddeps":builddeps, "runtimedeps":runtimedeps, "pkgversion":pkgversion, "pkgsource":pkgsource, "reponame":reponame})
+ pisi.api.init(write=False)
+ x=pisi.context.packagedb.get_package(pkg)
+ pkginstalledsize=x.installedSize
+ pkgpackagesize=x.packageSize
+
+ return render_to_response("binarypackagedetails.html", {"title":title,"pkgname":packagename, "builddeps":builddeps, "runtimedeps":runtimedeps, "pkgversion":pkgversion, "pkgsource":pkgsource, "reponame":reponame, "pkginstalledsize":pkginstalledsize, "pkgpackagesize":pkgpackagesize})
+def search(request, reponame):
+
+ title=_("Search")
+ return render_to_response("search.html", {"title":title, "reponame":reponame})
+def searchresult(request, reponame):
+
+ title=_("Search Result")
+
+ wordli=request.POST["keywords"].strip().split()
+ something=__import__("pijama.pijidb.models")
+ rsltli=[]
+ option=""
+ if request.POST["searchin"] == "packager":
+
+ t=something.pijidb.models.__getattribute__("Packager")
+ for word in wordli:
+ p=t.objects.filter(name__icontains=word, reponame=reponame).values("name")
+ li1=[x["name"] for x in p]
+ rsltli=list(set(li1+rsltli))
+
+ if request.POST["searchin"] == "binary":
+
+ pisi.api.init(write=False)
+ t=something.pijidb.models.__getattribute__("BinaryPacks")
+ for word in wordli:
+ p=t.objects.filter(name__icontains=word, reponame=reponame).values("name")
+ li1=[x["name"] for x in p]
+ p=t.objects.filter(summary__icontains=word, reponame=reponame).values("name")
+ li2=[x["name"] for x in p]
+ rsltli=list(set(li1+rsltli))
+
+ if request.POST["searchin"] == "source":
+
+ pisi.api.init(write=False)
+ t=something.pijidb.models.__getattribute__("RepoPackages")
+ for word in wordli:
+ p=t.objects.filter(pkgname__icontains=word, reponame=reponame).values("pkgname")
+ li1=[x["pkgname"] for x in p]
+ p=t.objects.filter(summary__icontains=word, reponame=reponame).values("pkgname")
+ li2=[x["pkgname"] for x in p]
+ rsltli=list(set(li1+rsltli))
+
+ if request.POST["searchin"] == "patch":
+
+ pisi.api.init(write=False)
+ t=something.pijidb.models.__getattribute__("Patch")
+ for word in wordli:
+ p=t.objects.filter(name__icontains=word, reponame=reponame)
+ rsltli=[(x.name,x.pkgname.path+"/files/"+x.name) for x in p]
+
-
-
\ No newline at end of file
+ return render_to_response("search_result.html", {"title":title, "reponame":reponame, "rslt":rsltli, "option":request.POST["searchin"]})
\ No newline at end of file
Uludag-commits mesaj listesiyle ilgili
daha fazla bilgi