Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8337021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:10:01+00:00 2026-06-09T04:10:01+00:00

I have profile edit page with several tabs. Each tab is a separate page,

  • 0

I have profile edit page with several tabs. Each tab is a separate page, so when I access it, I add “tab” parameter:

/edit/?tab=general 
/edit/?tab=contacts

When user finishes to fill a form on one of these tabs (for example, /edit/?tab=general), he submit it. If form is not valid, I need to render it with errors. Browser URL input need to be filled with /edit/?tab=general, but when I render page, URL is /edit/.

Can I change it somehow? Thanks.

Code:

def _profile_edit_general(request):
profile = request.user.get_profile()
if request.method == 'POST':
    form = forms.ProfileEditGeneralForm(request.POST, instance=profile)
    if form.is_valid():
        form.save()
else:
    form = forms.ProfileEditGeneralForm(instance=profile)
return render_template(request, 'profiles/edit/general.html', {
    'profile_edit_general_form': form
})

@login_required
def profile_edit(request):
if request.method == 'POST':
    if 'profile_edit_general_submit' in request.POST:
        return _profile_edit_general(request)
else:
    tab = request.GET.get('tab')
    if tab == 'general':
        return _profile_edit_general(request)
    else:
        return Http404
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T04:10:03+00:00Added an answer on June 9, 2026 at 4:10 am

    It sounds like the problem is that your form action doesn’t include the query string.

    Normally with Django forms and views, you’ll be posting to the same URL as you’re already on, which means you can do something like this:

    <form method="post" action="?tab={{ current_tab }}">
    
    ...
    
    </form>
    

    Where current_tab is a context variable indicating which tab is selected. Based on your code at the moment, you’ll need to add it to the dict in your render_template call. If you’re using JavaScript to switch tabs, you’ll need to update the action attribute when the tab switches too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my application I have an edit profile page which you can see below;
I have a Ruby on Rails page to edit a users profile. The form
SQl Server 2008 example: on the page to edit user profile settings like DOB,
I have an edit page for user profiles. One option is 'Country' with all
Let's say you have a profile page that can only be accessed by the
I have created an application which needs to have a profile box tab which
I am trying to make clean url with htaccess I have a profile.php page
In my CakePHP 1.2.5 app, I have a Profile model that belongsTo a User
I have a page which displays a form that a logged-in user can use
In my users photo album page they see photos they have uploaded and each

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.