1. edanm
  2. stack2blog

Commits

Yuval Cohen  committed 640ad6c

Fixed a bug when no error message exists

  • Participants
  • Parent commits 455d662
  • Branches default

Comments (0)

Files changed (3)

File launchenv.bat

View file
 start cmd /k "title HG & hg stat"
-start cmd /k "title SERVER & cd stack2blog & manage.py runserver"
+start cmd /k "title SERVER & cd stack2blog & python manage.py runserver"
 start cmd /k "title MANAGE & cd stack2blog"

File stack2blog/settings_edanlap.py

View file
+from base_settings import *
+
+DEBUG = True
+TEMPLATE_DEBUG = DEBUG
+
+DATABASE_ENGINE = 'sqlite3'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+DATABASE_NAME   = 'C:/DATA/Projects/stack2blog/db/db.sqlite'
+DATABASE_USER = ''             # Not used with sqlite3.
+DATABASE_PASSWORD = ''         # Not used with sqlite3.
+DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
+DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
+
+# Absolute path to the directory that holds media.
+# Example: "/home/media/media.lawrence.com/"
+MEDIA_ROOT = 'c:/DATA/Projects/stack2blog/site_media'

File stack2blog/stack2blogapp/views.py

View file
 	# Get is someone looking at the homepage for the first time.
 	if request.method == 'GET':
 		# Get any error messages waiting.
-		error_message = request.session["error_message"]
+		error_message = request.session.get("error_message", "")
 		request.session["error_message"] = ""
 
 		return render_to_response('home.html', locals(), context_instance=RequestContext(request))