Commit 47de57dd authored by Ysobel Vera's avatar Ysobel Vera

edited .gitignore and added some sample entries to the database

+added .env, .pyc, and __pycache__ to .gitignore
+added sample entries to database for project screenshots
parent 2e1e5435
#Ignore secret key
.env
#Ignore pycache
__pycache__
.pyc
......@@ -37,7 +37,7 @@ class BookCreateView(CreateView):
if form.is_valid():
new_book = form.save()
url = "../" + new_book.get_absolute_url() +"/details/"
return HttpResponseRedirect(redirect_url)
return HttpResponseRedirect(url)
else:
return render(request, self.template_name, {'form': form})
......@@ -52,7 +52,7 @@ class AuthorCreateView(CreateView):
if form.is_valid():
new_author = form.save()
url = "../" + new_author.get_absolute_url() + "/details/"
return HttpResponseRedirect(redirect_url)
return HttpResponseRedirect(url)
else:
return render(request, self.template_name, {'form': form})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment