This is my template:

{% block content %}
    <h2>Report Writing Types</h2>
    <ul>
        {% for type in object_list %}
            <li>{{ type.name }} <a href="/reportwriting/types/edit/
{{ type.id }}/?next={{request.path}}?page={{ page_obj.number }}">Edit</
a></li>
        {% endfor %}
    </ul>

<div class="pagination">
    <span class="step-links">
        {% if page_obj.has_previous %}
            <a href="?
page={{ page_obj.previous_page_number }}">previous</a>
        {% endif %}

        <span class="current">
            Page {{ page_obj.number }} of
{{ page_obj.paginator.num_pages }}.
        </span>

        {% if page_obj.has_next %}
            <a href="?page={{ page_obj.next_page_number }}">next</a>
        {% endif %}
    </span>
</div>

{% endblock %}

And this is my urls.py:

    url(r'^reportwriting/types/$', ListView.as_view(
        model=Type, paginate_by=2
    )),
        url(r'^reportwriting/types/edit/(?P<pk>\d+)/?$',
UpdateView.as_view(
            model=Type
    )),

The URL I am trying to return to the following URL after successful
form submission:

/reportwriting/types/?page=2

is this possible please?

Thanks for any assistance.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to