Exemplo n.º 1
0
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())
Exemplo n.º 2
0
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())
Exemplo n.º 3
0
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())
Exemplo n.º 4
0
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())
Exemplo n.º 5
0
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())
Exemplo n.º 6
0
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())
Exemplo n.º 7
0
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())
Exemplo n.º 8
0
def main(request):
    bulletins = Bulletin.objects.filter(is_published=True).order_by("-date")
    return render_response(request, "basin/bultenlervegorseller.html", locals())
Exemplo n.º 9
0
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())
Exemplo n.º 10
0
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())
Exemplo n.º 11
0
def product_detail(request, slug):
    product = get_object_or_404(Product, slug=slug)
    return render_response(request, "urun/urun.html", locals())
Exemplo n.º 12
0
def story_list(request):
    stories = SuccessStory.objects.filter(is_published=True).order_by("date")
    return render_response(request, 'successstory/successstory_list.html',
                           locals())
Exemplo n.º 13
0
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())
Exemplo n.º 14
0
def robots(request):
    return render_response(request, 'robots.txt')
Exemplo n.º 15
0
def release_notes(request, slug):
    version = get_object_or_404(Version, slug=slug)
    return render_response(request, "surum_notlari.html", locals())
Exemplo n.º 16
0
def main(request):
    products = Product.objects.all()
    return render_response(request, "urun/liste.html", locals())
Exemplo n.º 17
0
def bulletin_detail(request, slug):
    bulletin = get_object_or_404(Bulletin, slug=slug)
    return render_response(request, "basin/bulten.html", locals())
Exemplo n.º 18
0
def robots(request):
    return render_response(request, 'robots.txt')
Exemplo n.º 19
0
def home(request):
    pages = FlatPage.objects.all()
    return render_response(request, 'home.html', locals())
Exemplo n.º 20
0
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())
Exemplo n.º 21
0
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())