Pagination not working with an old project.

49 views
Skip to first unread message

nathan

unread,
May 3, 2013, 11:33:23 AM5/3/13
to mezzani...@googlegroups.com
I have been horsing around with pagination in mezzanine.  When mezzanine lists the blogposts on blog_post_list, no matter which url it sends me to, the same first results are listed.  "?page=1" , "?page=2", all give me only the first results.  This is an old project and I'm not sure how long this problem has existed on my site.  Is this because the urls aren't being used as "querystring" correctly?

mezzanine = 1.4.6
django = 1.5.1

Mucho thanks,
Nate



Stephen McDonald

unread,
May 3, 2013, 11:37:36 PM5/3/13
to mezzani...@googlegroups.com
On Sat, May 4, 2013 at 1:33 AM, nathan <maier....@gmail.com> wrote:
I have been horsing around with pagination in mezzanine.  When mezzanine lists the blogposts on blog_post_list, no matter which url it sends me to, the same first results are listed.  "?page=1" , "?page=2", all give me only the first results.  This is an old project

How old? Mezzanine 1.4.6 is not even a week old yet.
 
and I'm not sure how long this problem has existed on my site.  Is this because the urls aren't being used as "querystring" correctly?

mezzanine = 1.4.6
django = 1.5.1

Mucho thanks,
Nate




--
You received this message because you are subscribed to the Google Groups "Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Stephen McDonald
http://jupo.org

nathan

unread,
May 7, 2013, 9:03:47 AM5/7/13
to mezzani...@googlegroups.com, st...@jupo.org


I have been horsing around with pagination in mezzanine.  When mezzanine lists the blogposts on blog_post_list, no matter which url it sends me to, the same first results are listed.  "?page=1" , "?page=2", all give me only the first results.  This is an old project

How old? Mezzanine 1.4.6 is not even a week old yet.

I've got to work on my communication/writing skills.  MY website is about three years old.  I have reinstalled mezzanine and then added my "mezzanine.db" from the OLD project as well as the static files and templates.


 

Ken Bolton

unread,
May 7, 2013, 10:09:57 AM5/7/13
to mezzanine-users
Hi Nathan,

What process did you use to update from Mezzanine? A simple `pip install -U Mezzanine` will update the version of Mezzanine in site-packages used by your application. However, that `pip` command will not make the numerous changes required to upgrade *your* application to be compatible with the new version of Mezzanine. If you did not make many customizations, try hiding your custom templates and see if it works. Likely, you have the old pagination template, but the new version of Mezzanine doesn't do anything with them. 

I went through this process on a production Cartridge site four months ago, upgrading from pre-1.0 to 1.2.4. Depending on how heavily your site is customized, this can be harrowing. I had to rewrite lots of custom checkout code and rebuild numerous custom views and templates. Some tips:

1. You ideally want to do this upgrade to production *one time*. Therefore, do it to your local development environment early and often, and make sure you can repeat it to a Vagrant that is identical to production.

2. Set up a Sentry server, initially just for your local development environment, but eventually for the Vagrant, stage, and production. After you get out to production, deactivate Sentry in all the environments except production and selectively activate it in environments as needed.

3. You are going to need to exercise every one of your custom views and templates to find breaking changes. Automate this with Selenium or something similar.

4. After you thoroughly exercise the application, your Sentry should have lots of handy debugging information waiting for you about each problem.

5. Use the django-debug-toolbar. The "Templates" panel will help prevent you from endlessly editing a template that isn't being called. 

hth,
ken
Message has been deleted

Stephen McDonald

unread,
May 13, 2013, 11:20:08 PM5/13/13
to mezzani...@googlegroups.com
Thanks for the update - good to know!

On Mon, May 13, 2013 at 11:29 AM, nathan <maier....@gmail.com> wrote:
Thanks for you help folks.  I am getting familiar with Sentry, Selenium, etc....  I appreciate putting up all the information, and I hope it helps some people.

I found a solution to this problem on my own.  I decided to test the pagination while just running the localhost server. (./manage.py runserver.)  The pagination worked.  So I knew it must be my nginx conf, or suspected.  So I looked at nginx.conf and compared it to some on example websites.  I noticed that "fastcgi_param   QUERY_STRING $querystring" was missing.  Added that param, though I don't know how those fastcgi_params work.  It is solved.

Lots of love,
Nate
Reply all
Reply to author
Forward
0 new messages