Re: [mezzanine-users] Re: Site working perfectly in development, but admin and static pages are crashing in production

2015-03-15 Thread Philip Southwell


 Thanks Graham - that's where I was looking but I think I have that covered 
 already. My urls.py is below


urls.py
from __future__ import unicode_literals

from django.conf.urls import patterns, include, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib.gis import admin

from mezzanine.core.views import direct_to_template

admin.autodiscover()

urlpatterns = i18n_patterns(,
(^admin/, include(admin.site.urls)),
)

urlpatterns += patterns('',
url(r'^advertisers/', include('free2me.urls', namespace=advertiser)),
url(r'^deals/', include('free2me.urls_public', namespace=public)),
url(^$, free2me.views.deals_home_page, name=home),

(^, include(mezzanine.urls)),
)
handler404 = mezzanine.core.views.page_not_found
handler500 = mezzanine.core.views.server_error
 

-- 
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-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Re: Site working perfectly in development, but admin and static pages are crashing in production

2015-03-15 Thread Graham Oliver
ok - looking at the error messages
They seem to be being tiggered by

{% admin_dropdown_menu %}

which is in mezzanine_tags.py

def admin_dropdown_menu(context):  Renders the app list for the admin
dropdown menu navigation.  user = context[request].user if
user.is_staff: context[dropdown_menu_app_list] = admin_app_list(context[
request]) if user.is_superuser: sites = Site.objects.all() else: sites =
user.sitepermissions.get().sites.all() context[dropdown_menu_sites] = list
(sites) context[dropdown_menu_selected_site_id] = current_site_id() return
context
Would it work to put some error trapping in this function?
g

On 15 March 2015 at 22:11, Philip Southwell p...@zoothink.com wrote:

 Thanks Graham - that's where I was looking but I think I have that covered
 already. My urls.py is below


 urls.py
 from __future__ import unicode_literals

 from django.conf.urls import patterns, include, url
 from django.conf.urls.i18n import i18n_patterns
 from django.contrib.gis import admin

 from mezzanine.core.views import direct_to_template

 admin.autodiscover()

 urlpatterns = i18n_patterns(,
 (^admin/, include(admin.site.urls)),
 )

 urlpatterns += patterns('',
 url(r'^advertisers/', include('free2me.urls', namespace=advertiser)),
 url(r'^deals/', include('free2me.urls_public', namespace=public)),
 url(^$, free2me.views.deals_home_page, name=home),

 (^, include(mezzanine.urls)),
 )
 handler404 = mezzanine.core.views.page_not_found
 handler500 = mezzanine.core.views.server_error


 --
 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-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
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-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Re: Site working perfectly in development, but admin and static pages are crashing in production

2015-03-15 Thread Philip Southwell
The page errors only occur when I'm logged in as a user.

-- 
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-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Re: Site working perfectly in development, but admin and static pages are crashing in production

2015-03-15 Thread Philip Southwell


 That sounds like a great path Graham. Unfortunately I'll not be able to do 
 that until tomorrow but I'll get back and let you know how it's been. 
 Thanks a lot.


Phil 

-- 
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-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.