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

2015-03-15 Thread Charles Cossé
Hi, in admin under sites I had to change the 127.0.0.1:8000 entry to my 
real hostname in going from dev to production.  Maybe that's it.  If you 
can't get to your admin then you can access by manage.py ... in case you 
need the approximate commands it would be something like this:

./manage.py dbshell
select * from django_site;
update django_site set domain="www.yourdoamin.com" where id="3";

Charlie

On Sunday, March 15, 2015 at 12:00:42 AM UTC-6, Philip Southwell wrote:
>
> Hi there,
>
> I've been trying to sort this out for about 30 hours and it's killing me 
> so any help would be appreciated. 
>
> I have a django/mezzanine site which is working *perfectly* in 
> development. Now it's deployment time and I'm getting a NoReverseMatch for 
> every Mezzanine page and Mezzanine admin page. It's throwing the same error 
> for every page not to do with my custom app "free2me". I've created a 
> generic mezzanine project successfully with the same virtual environment so 
> I know that all the libraries are working as intended.
>
> The home page is fine http://test.free2me.com.au/ (or will be once I can 
> get to the admin)
> However when I link to any of the Mezzanine pages I get errors like this: 
> http://test.free2me.com.au/about/
>
> When I login to the admin I get a variety of similar errors each time I 
> refresh, but relating to different models:
> http://dpaste.com/1P4DHBZ
> http://dpaste.com/1WBS0M9
> http://dpaste.com/1AT8H4P
>
> For completeness I've attached settings.py which is overwritten by 
> local_settings.py for ADMINS, ALLOWED_HOSTS, DATABASES, MEDIA_ROOT, 
> MEDIA_URL, STATIC_ROOT, STATIC_URL and KEYS.
>
> I'm using a mod_wsgi 3.5/Python 3.3 webfaction app with a virtual 
> environment. My app uses the geodjango component of django in case this 
> matters.
>
> Thanks in advance for any suggestions. This really is driving me crazy.
>

-- 
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.


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  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.


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

I googled the error

Exception Type: NoReverseMatch at /admin/

The responses seems to focus in on urls.py

Adding this was suggested in
https://groups.google.com/forum/#!topic/django-admin-tools/kNP490KP4Vs

urlpatterns  =  patterns('',
url(r'^admin_tools/',  include('admin_tools.urls')),
#...other url patterns...
)


g

On 15/03/15 19:29, Philip Southwell wrote:

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.


--
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.