Пример #1
0
	def get(self):
		users = models.get_user_count()
		if users > 0:
			template_values = {
				'users': True,
			}
		else:
			template_values = {
				'users': False,
			}
		helpers.render_uncacheable_template(self, "adminviews/createfirstuser.html", template_values)
Пример #2
0
	def post(self):
		email = self.request.get("email")
		password = self.request.get("password")
		if len(email) == 0 or len(password) == 0:
			template_values = {
				'users': False,
			}
		else:
			user = models.User.get_or_insert(email, email=email, password=password)
			user.put()
			template_values = {
				'user': user,
				}
		helpers.render_uncacheable_template(self, "adminviews/createfirstuser.html", template_values)
Пример #3
0
	def get(self, term):
		searches = None
		searchthis = False
		returns = False
		if term == "activate09":
			term = "activate09"
			searchthis = True
		if searchthis:
			results, url = twitter.get_search(term)
			searches = results['results']
			messages, hasurl = twitter.handle_searches(searches, term)
		template_values = {
			'returns': searches,
			'returntype': "searches",
			'url': url,
			'hasurl': hasurl,
		}
		helpers.render_uncacheable_template(self, "webviews/data.html", template_values)
Пример #4
0
  def get(self):
	template_values = {
		'messages' : models.get_latest_messages(20),
	}
	helpers.render_uncacheable_template(self, "webviews/messagelist.html", template_values)
Пример #5
0
  def get(self):
	template_values = {
	}
	helpers.render_uncacheable_template(self, "webviews/home.html", template_values)