diff options
author | Martin Green <martin.speleo@gmail.com> | 2011-05-01 23:21:47 +0100 |
---|---|---|
committer | Martin Green <martin.speleo@gmail.com> | 2011-05-01 23:21:47 +0100 |
commit | 254f028575f4cb69921fd817c461230e29e81072 (patch) | |
tree | d289af071899571e953aa7596cbce7f1cb94f629 | |
parent | 5ade60e0cfc63c33acdf8436e5650520acf59975 (diff) | |
download | troggle-254f028575f4cb69921fd817c461230e29e81072.tar.gz troggle-254f028575f4cb69921fd817c461230e29e81072.tar.bz2 troggle-254f028575f4cb69921fd817c461230e29e81072.zip |
FIX2
-rw-r--r-- | core/views_logbooks.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/views_logbooks.py b/core/views_logbooks.py index b1b0a5f..06afba1 100644 --- a/core/views_logbooks.py +++ b/core/views_logbooks.py @@ -173,14 +173,14 @@ def newLogbookEntry(request, expeditionyear, pdate = None, pslug = None): if request.method == 'POST': # If the form has been submitted...
tripForm = TripForm(request.POST) # A form bound to the POST data
personTripFormSet = PersonTripFormSet(request.POST)
- dateStr = tripForm.cleaned_data["date"].strftime("%Y-%m-%d")
- directory = os.path.join(settings.EXPOWEB,
- "years",
- expedition.year,
- "autologbook")
- filename = os.path.join(directory,
- dateStr + "." + slugify(tripForm.cleaned_data["title"])[:50] + ".html")
if tripForm.is_valid() and personTripFormSet.is_valid(): # All validation rules pass
+ dateStr = tripForm.cleaned_data["date"].strftime("%Y-%m-%d")
+ directory = os.path.join(settings.EXPOWEB,
+ "years",
+ expedition.year,
+ "autologbook")
+ filename = os.path.join(directory,
+ dateStr + "." + slugify(tripForm.cleaned_data["title"])[:50] + ".html")
if not os.path.isdir(directory):
os.mkdir(directory)
if pslug and pdate:
|