def contact(request): if request.method == "POST": form = ContactForm(request.POST.copy()) if form.is_valid(): send_mail("Pardus.org.tr bilgi formu", form.cleaned_data["text"], "%s <%s>" % (form.cleaned_data["name"], form.cleaned_data["email"]), ["*****@*****.**"], fail_silently=True) mail_sent = True return render_response(request, "iletisim.html", locals()) else: form = ContactForm() return render_response(request, "iletisim.html", locals())
def tag_detail(request, tag): try: flatpages = FlatPage.objects.filter(tags__name__exact=tag) except Tag.DoesNotExist: raise Http404 return render_response(request, 'tag/tag_detail.html', locals())
def screenshot_detail(request, step): step = int(step) screenshot = get_object_or_404(ScreenShot, step=step) if ScreenShot.objects.filter(step=step - 1).count(): previous = ScreenShot.objects.get(step=step - 1) if ScreenShot.objects.filter(step=step + 1).count(): next = ScreenShot.objects.get(step=step + 1) return render_response(request, "kurulum/screenshot_detail.html", locals())
def home(request): mainnews = News.objects.filter(is_main=True, is_published=True).order_by("-date")[:1] stories = SuccessStory.objects.filter( is_main=True, is_published=True).order_by("-date")[:1] news = News.objects.filter(is_main=False, is_published=True, is_big=False).order_by("-date")[:2] bignews = News.objects.filter(is_big=True, is_published=True).order_by("-date")[:1] return render_response(request, 'home.html', locals())
def search(request): searched = False if request.method == 'POST': form = SearchForm(request.POST.copy()) if form.is_valid(): term = form.cleaned_data['term'] flatpage_list = FlatPage.objects.filter( Q(title__icontains=term) | Q(is_active=True) | Q(text__icontains=term)).order_by('-update')[:50] news_list = News.objects.filter( Q(title__icontains=term) | Q(is_published=True) | Q(text__icontains=term)).order_by('-date')[:50] searched = True else: form = SearchForm() return render_response(request, "arama.html", locals())
def news_printable(request, slug): news = get_object_or_404(News, slug=slug) if not news.is_published and not request.user.has_perm( "editor.change_contributednews"): return render_response(request, "404.html") return render_response(request, 'news/news_printable.html', locals())
def main(request): bulletins = Bulletin.objects.filter(is_published=True).order_by("-date") return render_response(request, "basin/bultenlervegorseller.html", locals())
def news_list(request): news = News.objects.filter(is_published=True, is_main=False).order_by("-date") return render_response(request, 'news/news_list.html', locals())
def news_detail(request, slug): news = get_object_or_404(News, slug=slug) if not news.is_published and not request.user.has_perm("st.change_news"): return render_response(request, "404.html") return render_response(request, 'news/news_detail.html', locals())
def product_detail(request, slug): product = get_object_or_404(Product, slug=slug) return render_response(request, "urun/urun.html", locals())
def story_list(request): stories = SuccessStory.objects.filter(is_published=True).order_by("date") return render_response(request, 'successstory/successstory_list.html', locals())
def page(request, year, month, day, slug, page): page = get_object_or_404(Page, issue__date=datetime.date(int(year),int(month),int(day)), issue__publication__slug=slug, number=int(page)) return render_response(request, "basin/sayfa.html", locals())
def robots(request): return render_response(request, 'robots.txt')
def release_notes(request, slug): version = get_object_or_404(Version, slug=slug) return render_response(request, "surum_notlari.html", locals())
def main(request): products = Product.objects.all() return render_response(request, "urun/liste.html", locals())
def bulletin_detail(request, slug): bulletin = get_object_or_404(Bulletin, slug=slug) return render_response(request, "basin/bulten.html", locals())
def home(request): pages = FlatPage.objects.all() return render_response(request, 'home.html', locals())
def year(request, year): #TODO: Dynamically populate years from database years = ("2009","2008","2007","2006","2005") issues = Issue.objects.filter(date__year=year) return render_response(request, "basin/liste.html", locals())
def main(request): version = Version.objects.filter(status=True)[0] downloads = Download.objects.filter(version=version, status=True) return render_response(request, "indir.html", locals())