Ejemplo n.º 1
0
 def post(self, sporocilo_id):
     izbris = Forum.get_by_id(int(sporocilo_id))
     #vmesnoime.key.delete()
     izbris.deleted = True
     izbris.put()
     time.sleep(1)
     self.redirect_to("forum1")
Ejemplo n.º 2
0
def create_thread(request, forumid):
    forum = Forum.get_by_id(int(forumid))

    return render_to_response('home/create_thread.html', {
        'forum': forum,
        'thread_form': ThreadForm()
    })
Ejemplo n.º 3
0
def forum(request, forumid):
	forum = Forum.get_by_id(int(forumid))
	return render_to_response('home/forum.html',
	{
		'forum' : forum,
		'threadsviewmodel' : ThreadsViewModel(forum)
	})
Ejemplo n.º 4
0
 def post(self, sporocilo_id):
     izbris = Forum.get_by_id(int(sporocilo_id))
     #vmesnoime.key.delete()
     izbris.deleted=True
     izbris.put()
     time.sleep(1)
     self.redirect_to("forum1")
Ejemplo n.º 5
0
 def get(self, sporocilo_id):
     sporocilo = Forum.get_by_id(int(sporocilo_id))
     params = {"forum": sporocilo}
     #tale forum gre potem v html vse forum.neki itd.
     paramsif = is_logged_in()
     params.update(paramsif)
     self.render_template("zbrisiforum.html", params=params)
Ejemplo n.º 6
0
 def get(self, sporocilo_id):
     sporocilo = Forum.get_by_id(int(sporocilo_id))
     params = {"forum": sporocilo}
     #tale forum gre potem v html vse forum.neki itd.
     paramsif = is_logged_in()
     params.update(paramsif)
     self.render_template("zbrisiforum.html", params=params)
Ejemplo n.º 7
0
def create_thread(request, forumid):
	forum = Forum.get_by_id(int(forumid))
	
	return render_to_response('home/create_thread.html',
	{
		'forum' : forum,
		'thread_form' : ThreadForm()
	})
Ejemplo n.º 8
0
def create_thread_submit(request, forumid):
    forum = Forum.get_by_id(int(forumid))
    thread = Thread(forum=forum,
                    user=request._user,
                    content="Default",
                    title="Default")
    data = ThreadForm(request.POST, instance=thread)
    if data.is_valid():
        entity = data.save(commit=False)
        entity.put()
        forum.increment_thread_count()
        forum.set_last_thread(entity)
        return HttpResponseRedirect('/forum/{0}'.format(forum.key().id()))

    return render_to_response('home/create_thread.html', {'thread_form': data})
Ejemplo n.º 9
0
def create_thread_submit(request, forumid):
	forum = Forum.get_by_id(int(forumid))
	thread = Thread(forum=forum,user=request._user, content="Default", title="Default")
	data = ThreadForm(request.POST, instance=thread)
	if data.is_valid():
		entity = data.save(commit=False)
		entity.put()
		forum.increment_thread_count()
		forum.set_last_thread(entity)
		return HttpResponseRedirect('/forum/{0}'.format(forum.key().id()))

	return render_to_response('home/create_thread.html',
	{
		'thread_form' : data
	})
Ejemplo n.º 10
0
 def post(self, sporocilo_id):
     vnosi = self.request.get("ime")
     vnosp = self.request.get("priimek")
     vnose = self.request.get("email")
     vnoss = self.request.get("sporocilo")
     if not vnosi:
         vnosi = "Neznanec"
     vmesnoime = Forum.get_by_id(int(sporocilo_id))
     vmesnoime.fime = vnosi
     vmesnoime.fpriimek = vnosp
     vmesnoime.femail = vnose
     vmesnoime.fsporocilo = vnoss
     vmesnoime.put()
     time.sleep(1)
     self.redirect_to("forum1")
Ejemplo n.º 11
0
 def post(self, sporocilo_id):
     vnosi = self.request.get("ime")
     vnosp = self.request.get("priimek")
     vnose = self.request.get("email")
     vnoss = self.request.get("sporocilo")
     if not vnosi:
         vnosi="Neznanec"
     vmesnoime = Forum.get_by_id(int(sporocilo_id))
     vmesnoime.fime = vnosi
     vmesnoime.fpriimek = vnosp
     vmesnoime.femail = vnose
     vmesnoime.fsporocilo = vnoss
     vmesnoime.put()
     time.sleep(1)
     self.redirect_to("forum1")
Ejemplo n.º 12
0
def forum(request, forumid):
    forum = Forum.get_by_id(int(forumid))
    return render_to_response('home/forum.html', {
        'forum': forum,
        'threadsviewmodel': ThreadsViewModel(forum)
    })
Ejemplo n.º 13
0
 def get(self, forum_id):
     sporocilo = Forum.get_by_id(int(forum_id))
     paramsif = is_logged_in()
     params = {"forum": sporocilo}
     params.update(paramsif)
     self.render_template("posamezen-forum.html", params=params)
Ejemplo n.º 14
0
 def get(self, forum_id):
     sporocilo = Forum.get_by_id(int(forum_id))
     paramsif = is_logged_in()
     params = {"forum": sporocilo}
     params.update(paramsif)
     self.render_template("posamezen-forum.html", params=params)