0

I have this simple view where the user confirms or declines an offer:

def confirmoffer(request, offerid):
    offer = Offer.objects.get(id = offerid)
    if 'confirm' in request.GET:

        offer.traveler_approval = True;
    else:
        offer.traveler_approval = False;
    offer.save()

    return HttpResponseRedirect("/dashboard#excursionoffers/")

I'm trying to return the user to her dashboard but to a certain part instead of the begining of the page thus I did this: dashboard#excursionoffers/ however a slash gets automatically added to look like this:

http://127.0.0.1:8000/dashboard/#excursionoffers/

Which renders the id with no effect.

That's the url for the dashboard:

url(r'^dashboard/$', views.dashboard, name="dashboard"),
Seif
  • 701
  • 4
  • 13
  • 32
  • Possible duplicate of [URL Fragment and 302 redirects](https://stackoverflow.com/questions/2286402/url-fragment-and-302-redirects) – Klaus D. Jun 01 '17 at 11:45

1 Answers1

1

In your urls.py, you may have added this dashboard/$.

Remove slash at the end to make it look like dashboard$. It may help

Jahongir Rahmonov
  • 13,083
  • 10
  • 47
  • 91