Skip to content

Commit

Permalink
Merge pull request #845 from koriaf/dev-demo
Browse files Browse the repository at this point in the history
Demo-related bugfixes
  • Loading branch information
gwasser committed Jul 20, 2020
2 parents c5226e9 + cf98b4a commit d4ac8a7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ readme:
#: demo - Setup demo project using Python3.
.PHONY: demo
demo:
$(PIP) install -e . --user
$(PIP) install -e demo --user
# running it with and without --user flag because it started to be problematic for some setups
$(PIP) install -e . --user || $(PIP) install -e .
$(PIP) install -e demo --user || $(PIP) install -e demo
demodesk migrate --noinput
# Create superuser; user will be prompted to manually set a password
# When you get a prompt, enter a password of your choosing.
Expand Down
7 changes: 6 additions & 1 deletion demo/demodesk/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@
'django.contrib.sites',
'django.contrib.humanize',
'bootstrap4form',
'helpdesk'

'account', # Required by pinax-teams
'pinax.invitations', # required by pinax-teams
'pinax.teams', # team support
'helpdesk', # This is us!
'reversion', # required by pinax-teams
]

MIDDLEWARE = [
Expand Down
2 changes: 1 addition & 1 deletion helpdesk/views/public.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def form_valid(self, form):
# This submission is spam. Let's not save it.
return render(request, template_name='helpdesk/public_spam.html')
else:
ticket = form.save()
ticket = form.save(user=self.request.user if self.request.user.is_authenticated else None)
try:
return HttpResponseRedirect('%s?ticket=%s&email=%s&key=%s' % (
reverse('helpdesk:public_view'),
Expand Down
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ pytz
six
djangorestframework
django-model-utils
pinax-teams @ git+https://github.com/auto-mat/pinax-teams.git@slugify#egg=pinax-teams

# specific commit because the current release has no required library upgrade
pinax-teams @ git+https://github.com/pinax/pinax-teams.git@dd75e1c#egg=pinax-teams

0 comments on commit d4ac8a7

Please sign in to comment.