Migrating changes done to my branch. Including completed archiving querying features and views and templates belong to them.
This commit is contained in:
parent
4ccc5d5cd9
commit
159a65786c
|
@ -19,3 +19,6 @@ class QueryForm(forms.Form):
|
|||
q_author_name = forms.CharField(max_length=25, required = False, label = 'Adı')
|
||||
q_author_surname = forms.CharField(max_length=25, required = False, label = 'Soyadı')
|
||||
q_text = forms.CharField(required = False, label = 'Aradığınız metin', widget = forms.widgets.Textarea() )
|
||||
q_date_year = forms.IntegerField(required = False, label = 'Blog girdisine ait yıl(Örn:2010)', widget=forms.widgets.DateTimeInput())
|
||||
q_date_month = forms.IntegerField(required = False, label = 'Blog girdisine ait ay(Örn:03)', widget=forms.widgets.DateTimeInput())
|
||||
q_date_day = forms.IntegerField(required = False, label = 'Blog girdisine ait gün (Örn:27)', widget=forms.widgets.DateTimeInput())
|
||||
|
|
|
@ -35,7 +35,7 @@ def main(request):
|
|||
last_entry_date = Entries.objects.all()[0].date
|
||||
day = datetime.timedelta(days=1)
|
||||
last_date_li = []
|
||||
for x in xrange(6):
|
||||
for x in xrange(5):
|
||||
last_entry_date -= day
|
||||
last_date_li.append(last_entry_date)
|
||||
|
||||
|
@ -116,16 +116,52 @@ def list_members(request):
|
|||
return render_response(request, 'main/members.html', {'members': authors, 'BASE_URL': BASE_URL,'info_area' : info_area })
|
||||
|
||||
def query(request):
|
||||
# Determine if method is POST.
|
||||
if (request.method == 'POST'):
|
||||
## If Yes:
|
||||
form = QueryForm(request.POST)
|
||||
|
||||
q_form = QueryForm()
|
||||
# Determine if all of them were valid.
|
||||
if (form.is_valid()):
|
||||
|
||||
return render_response(request,'main/query.html',{
|
||||
'BASE_URL' : BASE_URL,
|
||||
'q_form':q_form,
|
||||
})
|
||||
## If Yes:
|
||||
|
||||
def archive(request,archive_year='',archive_month='',archive_day=''):
|
||||
q_author_name = request.POST['q_author_name']
|
||||
q_author_surname = request.POST['q_author_surname']
|
||||
q_text = request.POST['q_text']
|
||||
q_date_year = request.POST['q_date_year']
|
||||
q_date_month = request.POST['q_date_month']
|
||||
q_date_day = request.POST['q_date_day']
|
||||
# Redirect or call /archive/ view with the existing POST arguments.
|
||||
#++ Complex string operations in order to form needed target_url.
|
||||
args_part = "?q_author_name=%s&q_author_surname=%s&q_text=%s" % (q_author_name,q_author_surname,q_text)
|
||||
date_part = ''
|
||||
if (q_date_year):
|
||||
date_part = q_date_year
|
||||
if(q_date_month):
|
||||
date_part += "/" + q_date_month
|
||||
if(q_date_day):
|
||||
date_part += "/" + q_date_day + "/"
|
||||
target_url = BASE_URL+"/archive/" + date_part + args_part
|
||||
#--
|
||||
return HttpResponseRedirect(target_url)
|
||||
else:
|
||||
# Issue an error message and show the form again.
|
||||
form = QueryForm()
|
||||
info_area = "query"
|
||||
|
||||
return render_to_response('main/query.html', {'q_form': form, 'BASE_URL': BASE_URL,'info_area':info_area})
|
||||
else:
|
||||
# Show the form.
|
||||
|
||||
form = QueryForm()
|
||||
info_area = "query"
|
||||
|
||||
return render_to_response('main/query.html', {'q_form': form, 'BASE_URL': BASE_URL,'info_area':info_area})
|
||||
|
||||
|
||||
def archive(request,archive_year=None,archive_month=None,archive_day=None):
|
||||
info_area = 'archive'
|
||||
# This setting gets the content truncated which contains more than <truncate_words> words.
|
||||
truncate_words = 250
|
||||
items_per_page = 25
|
||||
|
@ -133,140 +169,103 @@ def archive(request,archive_year='',archive_month='',archive_day=''):
|
|||
#get the last run time
|
||||
run_time = RunTime.objects.all()[0]
|
||||
|
||||
|
||||
### Determine if the request object includes any querying input or not. ###
|
||||
|
||||
if ( (request.GET) and ('q_author_name' in request.GET or 'q_author_surname' in request.GET or 'q_text' in request.GET ) ):
|
||||
# Switch to 'return the result of query' mode.
|
||||
info_area = 'query'
|
||||
|
||||
#Querying
|
||||
#TODO: We should improve querying method implemented here.
|
||||
q_author_name,q_author_surname,q_text = '','',''
|
||||
authors = Authors.objects.all()
|
||||
if ( ('q_author_name' in request.GET) and (request.GET['q_author_name'] )):
|
||||
q_author_name = request.GET['q_author_name']
|
||||
authors = authors.filter(author_name__iexact = q_author_name)
|
||||
|
||||
|
||||
if (('q_author_surname' in request.GET) and (request.GET['q_author_surname'])):
|
||||
q_author_surname = request.GET['q_author_surname']
|
||||
authors = authors.filter(author_surname__iexact = q_author_surname)
|
||||
|
||||
|
||||
for item in authors:
|
||||
|
||||
try:
|
||||
entries_list |= item.entries_set.all()
|
||||
except:
|
||||
entries_list = item.entries_set.all()
|
||||
|
||||
if( ('q_text' in request.GET)and(request.GET['q_text'])):
|
||||
q_text = request.GET['q_text']
|
||||
if (q_author_name or q_author_surname):
|
||||
|
||||
entries_list = entries_list.filter(content_text__icontains = q_text)
|
||||
else:
|
||||
entries_list = Entries.objects.filter(content_text__icontains = q_text)
|
||||
|
||||
|
||||
|
||||
try:
|
||||
if(not(entries_list)):
|
||||
return HttpResponseRedirect(BASE_URL+"/query")
|
||||
except:
|
||||
return HttpResponseRedirect(BASE_URL+ "/query")
|
||||
|
||||
#here is gonna be edited [X]
|
||||
# Pagination
|
||||
|
||||
elements_in_a_page = 25 # This determines, how many elements will be displayed in a paginator page.
|
||||
paginator = Paginator(entries_list,elements_in_a_page)
|
||||
# Validation for page number if it is not int return first page.
|
||||
try:
|
||||
page = int(request.GET.get('page', '1'))
|
||||
except ValueError:
|
||||
page = 1
|
||||
|
||||
# If page request is out of range, return last page .
|
||||
try:
|
||||
p_entries_list = paginator.page(page)
|
||||
except (EmptyPage, InvalidPage):
|
||||
p_entries_list = paginator.page(paginator.num_pages)
|
||||
|
||||
return render_to_response('main/archive.html' ,{
|
||||
'entries_list':entries_list,
|
||||
'p_entries_list':p_entries_list,
|
||||
'truncate_words':truncate_words,
|
||||
'items_per_page':repr(items_per_page),
|
||||
'run_time':run_time,
|
||||
'info_area':info_area,
|
||||
'q_author_name':q_author_name,
|
||||
'q_author_surname':q_author_surname,
|
||||
'q_text':q_text,
|
||||
'BASE_URL':BASE_URL,
|
||||
})
|
||||
### If not ###
|
||||
# Now we are creating few scenarios depending on the incoming variables.
|
||||
# This part is for validation.
|
||||
if ('q_author_name' in request.GET and request.GET['q_author_name']): #If that exists and not empty
|
||||
q_author_name = request.GET['q_author_name']
|
||||
else:
|
||||
#Switch to return the result of arguments provided mode(archive viewing mode).
|
||||
info_area = 'archive' # \This variable is used for determining which infoarea text should be used in "contenttop" div in /main/base.html
|
||||
q_author_name = ""
|
||||
if ('q_author_surname' in request.GET and request.GET['q_author_surname']): #If that exists and not empty
|
||||
q_author_surname = request.GET['q_author_surname']
|
||||
else:
|
||||
q_author_surname = ""
|
||||
if ('q_text' in request.GET and request.GET['q_text']): #If that exists and not empty
|
||||
q_text = request.GET['q_text']
|
||||
else:
|
||||
q_text = ""
|
||||
if ('q_label_personal' in request.GET and request.GET['q_label_personal'] == '1'): #If that exists and not empty
|
||||
q_label_personal = request.GET['q_label_personal']
|
||||
else:
|
||||
q_label_personal = ""
|
||||
if ('q_label_community' in request.GET and request.GET['q_label_community'] == '1'):
|
||||
q_label_community = request.GET['q_label_community']
|
||||
else:
|
||||
q_label_community = ""
|
||||
|
||||
selected_entries = Entries.objects.select_related()
|
||||
if ('q_label_lkd' in request.GET and request.GET['q_label_lkd']=='1'):
|
||||
q_label_lkd = request.GET['q_label_lkd']
|
||||
else:
|
||||
q_label_lkd = ""
|
||||
#--
|
||||
#--
|
||||
|
||||
# For entry categories
|
||||
entries_list1 = selected_entries.filter(entry_id__label_personal = 1)
|
||||
entries_list2 = selected_entries.filter(entry_id__label_lkd = 1)
|
||||
entries_list3 = selected_entries.filter(entry_id__label_community = 1)
|
||||
entries_list = entries_list1 | entries_list2 | entries_list3
|
||||
# Querying
|
||||
entries_list = Entries.objects.select_related()
|
||||
# Name - surname queries.
|
||||
|
||||
## Validating arguments provided by urls.py.
|
||||
# Check if archive_year is not empty and numeric.
|
||||
if((archive_year != '' ) and (str(archive_year).isalnum()) and (not(str(archive_year).isalpha()))):
|
||||
entries_list = entries_list.filter(date__year=archive_year)
|
||||
else:
|
||||
# Fall back to main view.
|
||||
return HttpResponseRedirect(BASE_URL+"/main")
|
||||
#pass
|
||||
if(q_author_name):
|
||||
entries_list = entries_list.filter(entry_id__author_name__iexact = q_author_name)
|
||||
if(q_author_surname):
|
||||
entries_list = entries_list.filter(entry_id__author_surname__iexact = q_author_surname)
|
||||
elif(q_author_surname):
|
||||
entries_list = entries_list.filter(entry_id__author_surname__iexact = q_author_surname)
|
||||
|
||||
# Check if archive_month is not empty and numeric.
|
||||
if(archive_month != ''and (str(archive_month).isalnum()) and not(str(archive_month).isalpha())):
|
||||
entries_list = entries_list.filter(date__month=archive_month)
|
||||
|
||||
# Check if archive_day is not empty and numeric.
|
||||
if(archive_day != ''and (str(archive_day).isalnum()) and not(str(archive_day).isalpha())):
|
||||
entries_list = entries_list.filter(date__day=archive_day)
|
||||
##
|
||||
# Label based queries.
|
||||
if(q_label_personal):
|
||||
entries_list = entries_list.filter(entry_id__label_personal = 1)
|
||||
if(q_label_community):
|
||||
entries_list = entries_list.filter(entry_id__label_community = 1)
|
||||
if(q_label_lkd):
|
||||
entries_list = entries_list.filter(entry_id__label_lkd = 1)
|
||||
|
||||
|
||||
# Pagination
|
||||
elements_in_a_page = 25 # This determines, how many elements will be displayed in a paginator page.
|
||||
paginator = Paginator(entries_list,elements_in_a_page)
|
||||
# Text search.
|
||||
if(q_text):
|
||||
entries_list = entries_list.filter(content_text__icontains = q_text)
|
||||
# Date based queries.
|
||||
if(archive_year):
|
||||
entries_list = entries_list.filter(date__year = archive_year)
|
||||
if(archive_month):
|
||||
entries_list = entries_list.filter(date__month = archive_month)
|
||||
if(archive_day):
|
||||
entries_list = entries_list.filter(date__day = archive_day)
|
||||
|
||||
# Validation for page number if it is not int return first page.
|
||||
try:
|
||||
page = int(request.GET.get('page', '1'))
|
||||
except ValueError:
|
||||
page = 1
|
||||
#--
|
||||
|
||||
# If page request is out of range, return last page .
|
||||
try:
|
||||
p_entries_list = paginator.page(page)
|
||||
except (EmptyPage, InvalidPage):
|
||||
p_entries_list = paginator.page(paginator.num_pages)
|
||||
# Pagination
|
||||
elements_in_a_page = 25 # This determines, how many elements will be displayed in a paginator page.
|
||||
paginator = Paginator(entries_list,elements_in_a_page)
|
||||
# Validation for page number if it is not int return first page.
|
||||
try:
|
||||
page = int(request.GET.get('page', '1'))
|
||||
except ValueError:
|
||||
page = 1
|
||||
|
||||
# If page request is out of range, return last page .
|
||||
try:
|
||||
p_entries_list = paginator.page(page)
|
||||
except (EmptyPage, InvalidPage):
|
||||
p_entries_list = paginator.page(paginator.num_pages)
|
||||
#--
|
||||
|
||||
return render_to_response('main/archive.html' ,{
|
||||
'entries_list':entries_list,
|
||||
'p_entries_list':p_entries_list,
|
||||
'truncate_words':truncate_words,
|
||||
'items_per_page':repr(items_per_page),
|
||||
'run_time':run_time,
|
||||
'info_area':info_area,
|
||||
'archive_year' : archive_year,
|
||||
'archive_month' : archive_month,
|
||||
'archive_day' : archive_day,
|
||||
'q_author_name':q_author_name,
|
||||
'q_author_surname':q_author_surname,
|
||||
'q_text':q_text,
|
||||
'BASE_URL':BASE_URL,
|
||||
})
|
||||
|
||||
|
||||
return render_to_response('main/archive.html' ,{
|
||||
'entries_list':entries_list,
|
||||
'p_entries_list':p_entries_list,
|
||||
'truncate_words':truncate_words,
|
||||
'items_per_page':repr(items_per_page),
|
||||
'run_time':run_time,
|
||||
'archive_year':archive_year,
|
||||
'archive_month':archive_month,
|
||||
'archive_day':archive_day,
|
||||
#'error':error,
|
||||
'BASE_URL':BASE_URL,
|
||||
'info_area':info_area,
|
||||
})
|
||||
def issue_error(request,error_msg=None):
|
||||
info_area = 'error'
|
||||
if not(error_msg):
|
||||
error_msg = 'Bilinmeyen bir hata oluştu!'
|
||||
return render_response(request, 'main/error.html', {'error_msg': error_msg,'info_area' : info_area })
|
|
@ -65,7 +65,7 @@ id = 5
|
|||
|
||||
[http://blog.oguz.biz/category/gezegen/rss2]
|
||||
name = Alper Oğuz
|
||||
face =
|
||||
face =
|
||||
nick = aoguz
|
||||
label = Personal
|
||||
id = 6
|
||||
|
@ -371,7 +371,7 @@ label = Personal
|
|||
id = 51
|
||||
|
||||
# Rsssindeki tarih sorunundan dolayı girdisinin gezegende tekrarlı gösteriminden dolayı geçici süre kaldırıldı 17112008
|
||||
# kendisinden gelen update ile adresi düzenlendi
|
||||
# kendisinden gelen update ile adresi düzenlendi
|
||||
[http://tonguc.name/blog/?flav=atom]
|
||||
name = Tonguç Yumruk
|
||||
face = tongucyumruk.png
|
||||
|
|
|
@ -44,8 +44,7 @@ TEMPLATE_FILES = "examples/basic/planet.html.tmpl"
|
|||
import sys
|
||||
import os
|
||||
# In order to reduce integration issues, this path gets defined automatically.
|
||||
sys.path.append(os.path.abspath('../..'))
|
||||
|
||||
sys.path.append("ABSOLUTEPATH")
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'djagen.settings'
|
||||
from djagen.collector.models import *
|
||||
|
||||
|
@ -260,21 +259,48 @@ def main():
|
|||
id_hash = item.id_hash
|
||||
|
||||
try:
|
||||
entry = author.entries_set.get(id_hash = id_hash)
|
||||
entry.title = item.title
|
||||
entry.content_html = item.content
|
||||
entry.content_text = entry.sanitize(item.content)
|
||||
entry.summary = item.summary
|
||||
entry.link = item.link
|
||||
#Only check for get if that fails then switch to create new entry mode.
|
||||
entry = author.entries_set.get(id_hash = item.id_hash)
|
||||
|
||||
try:
|
||||
entry.title = item.title
|
||||
except:
|
||||
#print "title"
|
||||
entry.title = None
|
||||
try:
|
||||
entry.content_html = item.content
|
||||
except:
|
||||
entry.content_html = None
|
||||
try:
|
||||
entry.content_text = entry.sanitize(item.content)
|
||||
except:
|
||||
entry.content_text = None
|
||||
try:
|
||||
|
||||
entry.summary = item.summary
|
||||
except:
|
||||
#print "summary"
|
||||
entry.summary = None
|
||||
try:
|
||||
|
||||
entry.link = item.link
|
||||
except:
|
||||
#print "link"
|
||||
entry.link = None
|
||||
|
||||
d = item.date
|
||||
|
||||
|
||||
entry.date = datetime.datetime(d[0], d[1], d[2], d[3], d[4], d[5])
|
||||
|
||||
|
||||
except:
|
||||
content_html = item.content
|
||||
#content_text = entry.sanitize(content_html)
|
||||
d = item.date
|
||||
if not item.has_key('summary'): summary = None
|
||||
else: summary = item.summary
|
||||
entry = author.entries_set.create(id_hash=id_hash, title=item.title, content_html=item.content, summary=summary, link=item.link, date=datetime.datetime(d[0], d[1], d[2], d[3], d[4], d[5]))
|
||||
entry = author.entries_set.create(id_hash= item.id_hash, title=item.title, content_html=item.content, summary=summary, link=item.link, date=datetime.datetime(d[0], d[1], d[2], d[3], d[4], d[5]))
|
||||
entry.content_text = entry.sanitize(content_html)
|
||||
|
||||
entry.save()
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
<body onload="BrowserCompatible.check()">
|
||||
<div class="wrapper">
|
||||
<div class="icons">
|
||||
<a href="#"><img src="/djagenmedia/img/Newsfeed-RSS-icon.png" alt="RSS" width="16" height="16" /></a>
|
||||
<a href="#"><img src="/djagenmedia/img/Newsfeed-Atom-icon.png" alt="Atom" width="16" height="16" /></a>
|
||||
<a href="#"><img src="/djagenmedia/img/newsfeed-rss-icon.png" alt="RSS" width="16" height="16" /></a>
|
||||
<a href="#"><img src="/djagenmedia/img/newsfeed-atom-icon.png" alt="Atom" width="16" height="16" /></a>
|
||||
</div>
|
||||
<div class="hdr">
|
||||
<div class="logo"></div>
|
||||
|
@ -45,10 +45,12 @@
|
|||
{% blocktrans %}<li><a href="{{ BASE_URL }}/english">İngilizce Günlükler</a></li>{% endblocktrans %}
|
||||
<li><a href="#" id="arsiv">Arşiv</a>
|
||||
<ul class="navlist">
|
||||
<li><a href="{{ BASE_URL }}/query/">{% trans "Ara" %}</a></li>
|
||||
{% for dt in last_date_li %}
|
||||
<li><a href="{{ BASE_URL }}/archive/{{ dt|date:"Y/m/d"}}">{{ dt|date:"d.m.Y" }}</a>
|
||||
{% endfor %}
|
||||
<li><a href="{{ BASE_URL }}/main/">{% trans "Tümü" %}</a></li>
|
||||
|
||||
<li><a href="{{ BASE_URL }}/archive/">{% trans "Tümü" %}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -59,36 +61,48 @@
|
|||
<div class="contenttop">
|
||||
|
||||
{% if info_area == "main" %}
|
||||
<p>Gezegen her 10 dakikada bir yenilenir. Son güncelleme: {{ run_time.get_run_time }}</p>
|
||||
<p>Gezegen her <b>10</b> dakikada bir yenilenir. Son güncelleme: <b>{{ run_time.get_run_time }}</b></p>
|
||||
{% endif %}
|
||||
|
||||
{% if info_area == "archive" %}
|
||||
<p>Gezegen arşivi: <b>{{ archive_year }}</b> yılı,
|
||||
{% if archive_month %}
|
||||
<b>{{ archive_month }}</b>. ay,
|
||||
{% endif %}
|
||||
{% if archive_day %}
|
||||
<b>{{ archive_day }}</b>. gün
|
||||
{% endif %}
|
||||
arşivini gezmektesiniz. Bu arşivde toplam <b>{{ entries_list|length }}</b> blog girdisi mevcuttur.</p>
|
||||
{% if entries_list|length %}
|
||||
<p>{% if archive_year %}
|
||||
<b>{{ archive_year }}</b> yılı,
|
||||
{% endif %}
|
||||
{% if archive_month %}
|
||||
<b>{{ archive_month }}</b>. ayı,
|
||||
{% endif %}
|
||||
{% if archive_day %}
|
||||
<b>{{ archive_day }}</b>. günü
|
||||
{% endif %}
|
||||
|
||||
{% if q_author_name or q_author_surname %}
|
||||
{% if q_author_name %}
|
||||
<b>{{ q_author_name }}</b> isimli,
|
||||
{% endif %}
|
||||
{% if q_author_surname %}
|
||||
<b>{{ q_author_surname }}</b> soyisimli,
|
||||
{% endif %}
|
||||
yazara ait
|
||||
{% endif %}
|
||||
|
||||
{% if q_text %}
|
||||
içinde <b>"{{ q_text|truncatewords:4 }} ..."</b> geçen yazıların olduğu
|
||||
{% endif %}
|
||||
{% if archive_year or q_author_name or q_author_surname or q_text %}
|
||||
gezegen
|
||||
{% else %}
|
||||
Gezegen
|
||||
{% endif %}
|
||||
arşivini gezmektesiniz.
|
||||
Bu arşivde toplam <b>{{ entries_list|length }}</b> blog girdisi mevcuttur.</p>
|
||||
{% else %}
|
||||
<p><img src="/djagenmedia/img/warning.png" width="25" height="25" /> Bu kriterlere ait herhangi bir girdi <b>bulunmuyor</b>!</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if info_area == "query" %}
|
||||
<p>Aradığınız kriterler:
|
||||
{% if q_author_name or q_author_surname %}
|
||||
{% if q_author_name %}
|
||||
<b>{{ q_author_name }}</b>
|
||||
{% endif %}
|
||||
|
||||
{% if q_author_surname %}
|
||||
<b> {{ q_author_surname }}</b>
|
||||
{% endif %}
|
||||
isimli yazarlar
|
||||
{% endif %}
|
||||
|
||||
{% if q_text %}
|
||||
İçinde <b>{{ q_text|truncatewords:8 }}</b> geçen girdiler
|
||||
{% endif %}.</p>
|
||||
<p>Lütfen aramak istediğiniz kriterleri giriniz.</p>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
@ -109,9 +123,7 @@
|
|||
|
||||
{% block footer%}
|
||||
<div id="footer">
|
||||
{% blocktrans %}<p>Bu sayfa içerisinde yazılanlar doğru veya yanlış herhangi bir biçimde <a href="http://www.lkd.org.tr/">Linux Kullanıcıları Derneği</a>'ni bağlamaz</p>{% endblocktrans %}
|
||||
{% blocktrans %}<p>LKD yalnızca Linux Gezegeni için teknik olanakları (sunucu, yazılım, bant genişliği) sağlar.</p>{% endblocktrans %}
|
||||
{% blocktrans %}<p>Ayrıca Gezegen istatistiklere <a href="http://gezegen.linux.org.tr/stats">buradan</a> ulaşabilirsiniz.</p>{% endblocktrans %}
|
||||
{% blocktrans %}<p>Bu sayfa içerisinde yazılanlar doğru veya yanlış herhangi bir biçimde LKD<http://www.lkd.org.tr/>'yi bağlamaz. Ayrıca Gezegen istatistiklere buradan<http://gezegen.linux.org.tr/stats> ulaşabilirsiniz.</p>{% endblocktrans %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% extends "main/base.html" %}
|
||||
{% block body %}
|
||||
{% comment %}
|
||||
<form action='{{ BASE_URL }}/archive ' method='GET'>
|
||||
<form action="{{ BASE_URL }}/query" method='GET'>
|
||||
<b>Yazar<br> Adı:</b><input type="text" name="q_author_name">
|
||||
ve/veya
|
||||
<b>Soyadı:</b><input type="text" name="q_author_surname"><br>
|
||||
|
@ -11,7 +11,7 @@
|
|||
</form>
|
||||
{% endcomment %}
|
||||
|
||||
<form action="{{ BASE_URL }}/archive" method="GET" enctype="multipart/form-data">
|
||||
<form action="{{ BASE_URL }}/query/" method="POST" enctype="multipart/form-data">
|
||||
{% for field in q_form %}
|
||||
<div class="fieldWrapper">
|
||||
{% if field.errors %}
|
||||
|
|
|
@ -22,7 +22,7 @@ urlpatterns = patterns('',
|
|||
(r'^archive/$','djagen.collector.views.archive'),
|
||||
(r'^archive/(?P<archive_year>\d{4})/$', archive),
|
||||
(r'^archive/(?P<archive_year>\d{4})/(?P<archive_month>\d{1,2})/$', archive),
|
||||
(r'^archive/(?P<archive_year>\d{4})/(?P<archive_month>\d{1,2})/(?P<archive_day>\d{1,2})$', archive),
|
||||
(r'^archive/(?P<archive_year>\d{4})/(?P<archive_month>\d{1,2})/(?P<archive_day>\d{1,2})/$', archive),
|
||||
(r'^djagen/$',main),
|
||||
(r'^query/$',query),
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user