Re: [mezzanine-users] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Jesse Carrigan
Ken, thank you for posting the link to the Effective Django tutorial. Looks 
really useful.

-- 
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] Can't figure out why my Static Files won't load

2014-03-31 Thread Jesse Carrigan
Rather than the IP address of the host, have you tried your live hostname 
(e.g. "www.example.com" or "example.com")? My sites are hosted on Digital 
Ocean and that's what needed to be in the ALLOWED_HOSTS list. Same for the 
server_name in the ngnix configs.

-- 
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: Cartridge shop missing from admin on deployed site

2014-03-31 Thread Jesse Carrigan
Looks like this was a caching issue on the browser. After going into Chrome 
dev tools and disabling the cache, the shop information showed up in the 
admin.

-- 
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] Where to define Proccessor_for.py

2014-03-31 Thread Tameen Malik
All i have to do is to add this mezzanine.pages.views.page  line in 
views.py file?

-- 
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: Where to define Proccessor_for.py

2014-03-31 Thread Tameen Malik
To associate a Page Processor to a custom Page model you must create the 
function for it in a module called page_processors.py inside one of your 
INSTALLED_APPS and decorate it using the decorator
mezzanine.pages.page_processors.processor_for.  I know this is the answer 
of my question. I have mentioned mezzanine.pages.page_processors.processor_for 
i my installed apps and 

from mezzanine.pages import page_processors
page_processors.autodiscover()

lines in in my urls.py file but what to do more to access this?

-- 
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] Where to define Proccessor_for.py

2014-03-31 Thread Stephen McDonald
>From the docs:

"you must create the function for it in a module called page_processors.py
inside one of your INSTALLED_APPS"

http://mezzanine.jupo.org/docs/content-architecture.html#page-processors




On Tue, Apr 1, 2014 at 4:32 PM, Tameen Malik  wrote:

> from django import forms
> from django.http import HttpResponseRedirect
> from mezzanine.pages.page_processors import processor_for
> from .models import Author
>
> This is processor.py file: Now i save this in /myproject/proccessor.py. My
> question can be simple but i am confuse that now where i have to define
> this to access this form. (in url.py file using views or in template or is
> there any other way too!)
>
> *class AuthorForm(forms.Form):*
> *name = forms.CharField()*
> *email = forms.EmailField()*
>
> *@processor_for(Author)*
> *def author_form(request, page):*
> *form = AuthorForm()*
> *if request.method == "POST":*
> *form = AuthorForm(request.POST)*
> *if form.is_valid():*
> *# Form processing goes here.*
> *redirect = request.path + "?submitted=true"*
> *return HttpResponseRedirect(redirect)*
> *return {"form": form}*
>
> --
> 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.
>



-- 
Stephen McDonald
http://jupo.org

-- 
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: Where to define Proccessor_for.py

2014-03-31 Thread Tameen Malik
and how to define this in template to make this accessible?

-- 
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] Where to define Proccessor_for.py

2014-03-31 Thread Tameen Malik
from django import forms
from django.http import HttpResponseRedirect
from mezzanine.pages.page_processors import processor_for
from .models import Author

This is processor.py file: Now i save this in /myproject/proccessor.py. My 
question can be simple but i am confuse that now where i have to define 
this to access this form. (in url.py file using views or in template or is 
there any other way too!)

*class AuthorForm(forms.Form):*
*name = forms.CharField()*
*email = forms.EmailField()*

*@processor_for(Author)*
*def author_form(request, page):*
*form = AuthorForm()*
*if request.method == "POST":*
*form = AuthorForm(request.POST)*
*if form.is_valid():*
*# Form processing goes here.*
*redirect = request.path + "?submitted=true"*
*return HttpResponseRedirect(redirect)*
*return {"form": form}*

-- 
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] Can't figure out why my Static Files won't load

2014-03-31 Thread Kyle Pennell
This is on Digital Ocean.  How would I check out firewall related issues?

On Saturday, March 29, 2014 2:00:08 AM UTC-6, Luc Milland wrote:
>
> could this be firewall related ? 
>
> Le vendredi 28 mars 2014 à 18:20 -0700, Kyle Pennell a écrit : 
> > First off, thanks so much for taking the time to respond to another 
> > beginner.  I'm on tutorial number 5 now of trying to figure this out. 
>  I'm 
> > amazed I haven't yet.  What a challenge. 
> > 
> > Changed that file: 
> > 
> > server { 
> > > server_name 107.170.215.138; 
> > > access_log off; 
> > > location /static/ { 
> > > alias /opt/myenv/mezzanine_app; 
> > > } 
> > > location / { 
> > > proxy_pass http://127.0.0.1:8001; 
> > > proxy_set_header X-Forwarded-Host $server_name; 
> > > proxy_set_header X-Real-IP $remote_addr; 
> > > add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL 
> UNI 
> > > COM NAV"'; 
> > > } 
> > > } 
> > > 
> > > 
> > My static ip was in the allowed hosts: 
> > 
> > ALLOWED_HOSTS = [ 
> > > '107.170.215.138', 
> > > '107.170.215.138.', 
> > > ] 
> > 
> > 
> > 
> > Error logs are the same. 
> > 
> > 
> > If you happen to have any random ideas, they'd be very much appreciated. 
> > 
> > Kyle 
> > 
> > On Friday, March 28, 2014 2:48:01 PM UTC-6, Matthew Summers wrote: 
> > > 
> > > On Fri, Mar 28, 2014 at 1:35 PM, Kyle Pennell 
> > > > 
>
> > > wrote: 
> > > > Thanks for responding. 
> > > > 
> > > > Double checking I understand: 
> > > > 
> > > >location /static/ { 
> > > > alias  /opt/myenv/mezzanine_app/static/; 
> > > > } 
> > > > 
> > > > Should be: 
> > > > 
> > > >location /static/ { 
> > > > alias  /opt/myenv/mezzanine_app/static; 
> > > > } 
> > > > 
> > > > Or? 
> > > > 
> > > >location /static/ { 
> > > > alias  /opt/myenv/mezzanine_app; 
> > > > } 
> > > > 
> > > > 
> > > 
> > > You'll want this one assuming the mezz project layout where your 
> > > static dir is directly under your messanine_app dir: 
> > > 
> > > location /static/ { 
> > >  alias  /opt/myenv/mezzanine_app; 
> > >  } 
> > > 
> > > 
> > > As far as your error log, it looks like you might need to add the 
> > > static ip of your server to ALLOWED_HOSTS in settings. Your app server 
> > > is refusing to respond to nginx. 
> > > 
> > > Cheers, 
> > > Matt 
> > > 
> > 
>
>
>

-- 
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] Default fabfile deploy, Internal Server Error

2014-03-31 Thread Josh Cartmell
Thanks Steve and Matt, I'm running with DEBUG = False now which is great.

I think you are spot on Steve, I see now that the supervisor directory in
/var/log has three log files, and two of them appear to be specific to
gunicorn.  I'm guessing that will help me moving forwards, and is probably
where the error messages ended up.


On Mon, Mar 31, 2014 at 4:14 PM, Matthew Summers wrote:

> Josh,
> It seems so. Although if you're not  running with --daemon stdout might
> come into play. In which case supervisord might handle the redirect to a
> file. I prefer to explicitly use a file for my use cases, and I'm not using
> supervisord at the moment.
>
> Cheers,
> Matt
>
> --
> 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] Default fabfile deploy, Internal Server Error

2014-03-31 Thread Matthew Summers
Josh,
It seems so. Although if you're not  running with --daemon stdout might
come into play. In which case supervisord might handle the redirect to a
file. I prefer to explicitly use a file for my use cases, and I'm not using
supervisord at the moment.

Cheers,
Matt

-- 
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] Default fabfile deploy, Internal Server Error

2014-03-31 Thread Stephen McDonald
As I understand supervisor will log stdout/stderr for any procs it manages
under /var/log/supervisord), such as gunicorn. This is why gunicorn's own
logging is disabled in the default setup. Maybe it'd be better to configure
the opposite (gunicorn logs all and sends nothing to stdout/stderr),
personally the log file naming convention supervisor uses is a bit annoying.


On Tue, Apr 1, 2014 at 8:02 AM, Doug Evenhouse  wrote:

> I'm interested in the gunicorn logging question as well. I had a similar
> issue as yours Josh and ended up putting the following line in the
> gunicorn.conf.py file of my project in order to get some logged output
> that led me to the cause of the error.
>
> errorlog = "/tmp/gunicorn.error.log"
>
>
> On Monday, March 31, 2014 2:35:48 PM UTC-5, Josh Cartmell wrote:
>
>> Thanks again for the help Steve!  I ended up figuring it out and feel a
>> bit silly now, I had some CDN hosted javascript inside the compress
>> template tag resulting in an incompressible file error.
>>
>> My biggest question at this point is which log file should I have found
>> that in.  I'm still wondering if gunicorn produces a separate log file from
>> niginx and supervisor.
>>
>> Thanks!
>>
>>
>> On Sun, Mar 30, 2014 at 10:06 PM, Josh Cartmell wrote:
>>
>>>  Thanks for giving it a shot Steve!  I didn't get it to work yet (since
>>> it was just a non production demo I was satisfied to leave it with DEBUG
>>> True).
>>>
>>> I'll triple check those things in the morning and let you know how it
>>> goes.
>>>
>>> By the way, does gunicorn have a log of it's own or is it logged with
>>> nginx and/or supervisor?
>>>
>>>
>>> On Sun, Mar 30, 2014 at 4:16 PM, Stephen McDonald wrote:
>>>
 I can't reproduce this - just did deploy of Mezzanine 3.0.9 to a fresh
 ubuntu 12.04 machine without any issue.

 Only thing I can think of is some mismatch between ALLOWED_HOSTS, Site
 objects, and NGINX config - triple check those since the behaviour changes
 with DEBUG False.


 On Sat, Mar 29, 2014 at 5:25 AM, Josh Cartmell wrote:

> I'm working on putting a dev server up for a client (to show them my
> progress) and figured I could do that quickly with the bundled fabfile and
> a VPS from Digital Ocean.  I'm using essentially unmodified deploy config
> (I commented out some SSL stuff in the nginx config) and the VPS is 64 bit
> Ubuntu 12.0.4.
>
> If I set DEBUG = True the site runs fine, but when it is false the
> site just says Internal Server Error.
>
> I've checked the nginx and supervisor logs and nothing shows up in
> either when the site produces the error.  Does gunicorn have a logfile and
> if so where is it?
>
> I also tried 64 bit Debian 7, and that also resulted in Internal
> Server Errors.
>
> Thanks!
>
> --
> 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/d/optout.
>



 --
 Stephen McDonald
 http://jupo.org

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



-- 
Stephen McDonald
http://jupo.org

-- 
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] Default fabfile deploy, Internal Server Error

2014-03-31 Thread Josh Cartmell
Thanks Matt and Doug, that's very helpful. So logging is disabled by
default and then enabled if you specify a file location?


On Mon, Mar 31, 2014 at 2:05 PM, Matthew Summers wrote:

> Just for reference, --log-file and --error-logfile are the same
> http://docs.gunicorn.org/en/latest/settings.html#errorlog
>
> Cheers,
> Matt
>
> --
> 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] Default fabfile deploy, Internal Server Error

2014-03-31 Thread Matthew Summers
Just for reference, --log-file and --error-logfile are the same
http://docs.gunicorn.org/en/latest/settings.html#errorlog

Cheers,
Matt

-- 
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] Default fabfile deploy, Internal Server Error

2014-03-31 Thread Doug Evenhouse
I'm interested in the gunicorn logging question as well. I had a similar 
issue as yours Josh and ended up putting the following line in the 
gunicorn.conf.py file of my project in order to get some logged output that 
led me to the cause of the error.

errorlog = "/tmp/gunicorn.error.log"

On Monday, March 31, 2014 2:35:48 PM UTC-5, Josh Cartmell wrote:
>
> Thanks again for the help Steve!  I ended up figuring it out and feel a 
> bit silly now, I had some CDN hosted javascript inside the compress 
> template tag resulting in an incompressible file error.
>
> My biggest question at this point is which log file should I have found 
> that in.  I'm still wondering if gunicorn produces a separate log file from 
> niginx and supervisor.
>
> Thanks!
>
>
> On Sun, Mar 30, 2014 at 10:06 PM, Josh Cartmell 
> 
> > wrote:
>
>> Thanks for giving it a shot Steve!  I didn't get it to work yet (since it 
>> was just a non production demo I was satisfied to leave it with DEBUG True).
>>
>> I'll triple check those things in the morning and let you know how it 
>> goes.
>>
>> By the way, does gunicorn have a log of it's own or is it logged with 
>> nginx and/or supervisor?
>>
>>
>> On Sun, Mar 30, 2014 at 4:16 PM, Stephen McDonald 
>> 
>> > wrote:
>>
>>> I can't reproduce this - just did deploy of Mezzanine 3.0.9 to a fresh 
>>> ubuntu 12.04 machine without any issue.
>>>
>>> Only thing I can think of is some mismatch between ALLOWED_HOSTS, Site 
>>> objects, and NGINX config - triple check those since the behaviour changes 
>>> with DEBUG False.
>>>
>>>
>>> On Sat, Mar 29, 2014 at 5:25 AM, Josh Cartmell 
>>> 
>>> > wrote:
>>>
 I'm working on putting a dev server up for a client (to show them my 
 progress) and figured I could do that quickly with the bundled fabfile and 
 a VPS from Digital Ocean.  I'm using essentially unmodified deploy config 
 (I commented out some SSL stuff in the nginx config) and the VPS is 64 bit 
 Ubuntu 12.0.4.

 If I set DEBUG = True the site runs fine, but when it is false the site 
 just says Internal Server Error.

 I've checked the nginx and supervisor logs and nothing shows up in 
 either when the site produces the error.  Does gunicorn have a logfile and 
 if so where is it?

 I also tried 64 bit Debian 7, and that also resulted in Internal Server 
 Errors.

 Thanks!

 -- 
 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/d/optout.

>>>
>>>
>>>
>>> -- 
>>> Stephen McDonald
>>> http://jupo.org 
>>>
>>> -- 
>>> 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/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] Default fabfile deploy, Internal Server Error

2014-03-31 Thread Matthew Summers
On Mon, Mar 31, 2014 at 2:35 PM, Josh Cartmell  wrote:
> Thanks again for the help Steve!  I ended up figuring it out and feel a bit
> silly now, I had some CDN hosted javascript inside the compress template tag
> resulting in an incompressible file error.
>
> My biggest question at this point is which log file should I have found that
> in.  I'm still wondering if gunicorn produces a separate log file from
> niginx and supervisor.
>
> Thanks!

Josh,

You can configure both access and error logs for gunicorn using the
following directives in the gunicorn invocation or config file (here
its a different syntax than below, but should be pretty obvious to
figure out):

--access-logfile /path/to/log-access.log
--log-file /path/to/log-error.log

I use both nginx for access logs and the above for logging with
gunicorn at the moment. This is mainly because I wanted to make sure I
wouldn't miss anything important. I suspect that using gunicorn's
access-logfile is redundant with nginx, but the --log-file (error log)
has been helpful.

It might also be worth noting that I don't use the fabfile or any
deploy config shipped with Mezzanine. It simply did not fit for my
requirements on Hardened Gentoo. It was helpful to read, in any case.

Thanks,
Matt

-- 
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: Sitemap Page

2014-03-31 Thread Josh Cartmell
Mezzanine creates it and it should just work.  Here it is on the demo site,
http://mezzanine.jupo.org/sitemap.xml

Did you encounter any particular errors?


On Mon, Mar 31, 2014 at 7:09 AM, green  wrote:

>
> I am new to Mezzanine myself.  I could not even get sitemap.xml.  Sorry
> for not able to help but would appreciate if you can advise me how you get
> your sitemap.xml and where does it locate.
>
> Thanks in advance for your help
>
>
> On Tuesday, 4 February 2014 15:07:28 UTC, mich...@blazingtheagency.comwrote:
>>
>>
>> Hello All,
>>
>> I am new to  Mezzanine, so if I am asking a silly question, I do
>> apologize.
>>
>> Is there a way to build a site map view? One that can be styled and
>> automatically include all pages that are supposed to "show in sitemap" ?
>>
>> I've searched the documentation; the sitemap.xml does work perfectly, but
>> I am looking to have a styled sitemap for visitors to be able to use.
>>
>> Thanks in advance for any help anyone can provide..
>>
>  --
> 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: Subclass model of form page

2014-03-31 Thread Josh Cartmell
Here are the docs on creating page subclasses,
https://mezzanine.jupo.org/docs/content-architecture.html#creating-custom-content-types.
You would need to copy everything you want from Form and add anything extra
you need.


On Sat, Mar 29, 2014 at 1:00 PM, Cajoline  wrote:

> Ok thank you,
> How can I do to create my own page form subclass without error?
> because I prefer this solution that uses field injection
>
> Thank you
>
> Le samedi 29 mars 2014 20:37:31 UTC+1, Josh Cartmell a écrit :
>>
>> Yeah, your options are to use field injection or create you own page
>> subclass =)
>>
>>
>> On Sat, Mar 29, 2014 at 12:07 PM, Cajoline  wrote:
>>
>>> Ok thank you, so if I understand well
>>> this is the only way to add a field to form page types?
>>>
>>> Thank you
>>>
>>> Le samedi 29 mars 2014 02:37:39 UTC+1, Josh Cartmell a écrit :

 Hey Cajoline, I would use field injection to add the new fields you
 want to the current form class, https://mezzanine.jupo.org/doc
 s/model-customization.html#field-injection


 On Fri, Mar 28, 2014 at 5:23 PM, Cajoline wrote:

> I'll rephrase what I'd like to do :)
> I would like to create my own custom content form page, to add one or
> two additional fields.
>
> I tried to inherit the Page model but I have form fields that appear
> etc (this is normal) and if I try to inherit the model Form I get an error
> because apparently I can not get there directly.
>
> My question is how can I do to have inherited Page content model with
> the ability to create form fields and options that exist in the Forms 
> pages
>
> thank you,
>
> Regards
>
>>
>>  --
> 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/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-use...@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.
>

-- 
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] Default fabfile deploy, Internal Server Error

2014-03-31 Thread Josh Cartmell
Thanks again for the help Steve!  I ended up figuring it out and feel a bit
silly now, I had some CDN hosted javascript inside the compress template
tag resulting in an incompressible file error.

My biggest question at this point is which log file should I have found
that in.  I'm still wondering if gunicorn produces a separate log file from
niginx and supervisor.

Thanks!


On Sun, Mar 30, 2014 at 10:06 PM, Josh Cartmell wrote:

> Thanks for giving it a shot Steve!  I didn't get it to work yet (since it
> was just a non production demo I was satisfied to leave it with DEBUG True).
>
> I'll triple check those things in the morning and let you know how it goes.
>
> By the way, does gunicorn have a log of it's own or is it logged with
> nginx and/or supervisor?
>
>
> On Sun, Mar 30, 2014 at 4:16 PM, Stephen McDonald  wrote:
>
>> I can't reproduce this - just did deploy of Mezzanine 3.0.9 to a fresh
>> ubuntu 12.04 machine without any issue.
>>
>> Only thing I can think of is some mismatch between ALLOWED_HOSTS, Site
>> objects, and NGINX config - triple check those since the behaviour changes
>> with DEBUG False.
>>
>>
>> On Sat, Mar 29, 2014 at 5:25 AM, Josh Cartmell wrote:
>>
>>> I'm working on putting a dev server up for a client (to show them my
>>> progress) and figured I could do that quickly with the bundled fabfile and
>>> a VPS from Digital Ocean.  I'm using essentially unmodified deploy config
>>> (I commented out some SSL stuff in the nginx config) and the VPS is 64 bit
>>> Ubuntu 12.0.4.
>>>
>>> If I set DEBUG = True the site runs fine, but when it is false the site
>>> just says Internal Server Error.
>>>
>>> I've checked the nginx and supervisor logs and nothing shows up in
>>> either when the site produces the error.  Does gunicorn have a logfile and
>>> if so where is it?
>>>
>>> I also tried 64 bit Debian 7, and that also resulted in Internal Server
>>> Errors.
>>>
>>> Thanks!
>>>
>>> --
>>> 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.
>>>
>>
>>
>>
>> --
>> Stephen McDonald
>> http://jupo.org
>>
>> --
>> 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] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Ken Bolton
Django-CMS is a completely different project from Django and also from
Mezzanine. Django-CMS has some nice features, but I am pretty sure it
duplicates most of what Mezzanine does. I do not recommend using
Django-CMS. I find the code more complicated than Mezzanine's, harder to
read, and therefore harder to debug and improve. Admittedly, I have not had
to use Django-CMS since Mezzanine came out, so those problems may be gone
now.

Learn Django first. The tutorial all the way through once or twice should
get you comfortable with the basics and capable of working with Mezzanine.
Do not begin to think about a sub-framework such as Mezzanine or Django-CMS
until you have made it through the tutorial! Get yourself comfortable with
Python, too. If you do not know how to create functions, lists, and tuples
in Python, you won't get very far with Django. As Mezzanine-is-just-Django,
Django-is-just-Python.

k


On Mon, Mar 31, 2014 at 1:49 PM, Tameen Malik  wrote:

> Yes you are right sir!
>>
> hmm there are two things i am moving towards Django -cms and
> Mezzanine. Should i move to django-cms first to getbetter understanding
> to mezzanine world or both are different?
>
> --
> 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] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Tameen Malik

>
> Yes you are right sir!
>
hmm there are two things i am moving towards Django -cms and Mezzanine. 
Should i move to django-cms first to getbetter understanding to 
mezzanine world or both are different?

-- 
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] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Ken Bolton
If you do the Django tutorial, it will teach you how to synchronize the
database. The Mezzanine documentation does not cover this, but the opening
words of the Mezzanine docs are:

A working knowledge of Django  is required
to work with Mezzanine and the documentation assumes as much. If you’re new
to Django, you’ll need to work through the Django
tutorial
before
being able to understand the concepts used throughout the Mezzanine
documentation.



On Mon, Mar 31, 2014 at 12:21 PM, Tameen Malik  wrote:

> yes i studied first 5 chapters of djangobook.com this week. hmm i don't
>> know i just stuck here in mezzanine. Sir can't you give me small example
>> (if you can). Mezzanine documentation is not detailed or may be my mind
>> can't work unless i go through 3,4 examples! :(
>>
>  --
> 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] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Tameen Malik

>
> yes i studied first 5 chapters of djangobook.com this week. hmm i don't 
> know i just stuck here in mezzanine. Sir can't you give me small example 
> (if you can). Mezzanine documentation is not detailed or may be my mind 
> can't work unless i go through 3,4 examples! :(
>

-- 
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] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Ken Bolton
Have you done the Django tutorial at
https://docs.djangoproject.com/en/1.6/intro/tutorial01/?

South is highly recommended for managing your database schema:
http://mezzanine.jupo.org/docs/model-customization.html#field-injection-caveats

I would also take a step back and go through http://effectivedjango.com/.

ken




On Mon, Mar 31, 2014 at 11:55 AM, Tameen Malik  wrote:

>  Thank You!
>>>
>>hmmm see i have created models.py file in project have these lines:
>>
>> from django.db import modelsfrom mezzanine.pages.models import Pageclass 
>> Author(Page):
>> dob = models.DateField("Date of birth")
>> class Book(models.Model):
>> author = models.ForeignKey("Author")
>> cover = models.ImageField(upload_to="authors")
>>
>> and admin.py with these:
>>
>> from django.contrib import adminfrom mezzanine.pages.admin import 
>> PageAdminfrom .models import Author
>>
>>
>
>> admin.site.register(Author, PageAdmin)
>>
>>
>> Now i write these commands: python manage.py syncdb,  python manage.py
>> migrate,
>> and then open python shell to write  Author.objects.create(dob =
>> "12/12/2014")
>>
>> That generates error that author is not defined. It's true because no
>> tables created in my database.!
>>
>
>
>>  --
> 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] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Tameen Malik

>
> Thank You!
>>
>hmmm see i have created models.py file in project have these lines:
>
> from django.db import modelsfrom mezzanine.pages.models import Pageclass 
> Author(Page):
> dob = models.DateField("Date of birth")
> class Book(models.Model):
> author = models.ForeignKey("Author")
> cover = models.ImageField(upload_to="authors")
>
> and admin.py with these:
>
> from django.contrib import adminfrom mezzanine.pages.admin import 
> PageAdminfrom .models import Author  
>
>  

> admin.site.register(Author, PageAdmin)
>
>
> Now i write these commands: python manage.py syncdb,  python manage.py 
> migrate,  
> and then open python shell to write  Author.objects.create(dob = 
> "12/12/2014")
>
> That generates error that author is not defined. It's true because no 
> tables created in my database.!
>
 

>

-- 
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] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Tameen Malik

>
> Thank You!
>
   hmmm see i have created models.py file in project have these lines:

from django.db import modelsfrom mezzanine.pages.models import Pageclass 
Author(Page):
dob = models.DateField("Date of birth")
class Book(models.Model):
author = models.ForeignKey("Author")
cover = models.ImageField(upload_to="authors")

and admin.py with these:

from django.contrib import adminfrom mezzanine.pages.admin import PageAdminfrom 
.models import Author
 


Now i write these commands: python manage.py syncdb,  python manage.py 
migrate,  
and then open python shell to write  Author.objects.create(dob = 
"12/12/2014")

That generates error that author is not defined. It's true because no 
tables created in my database.!

-- 
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: How and where to create sitemap.xml and robot.txt

2014-03-31 Thread Eduardo Rivas

Ah! There it is! I'm not using the default Nginx config. Thanks a lot.

--
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: How and where to create sitemap.xml and robot.txt

2014-03-31 Thread Ken Bolton
Hi Eduardo,

https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/project_template/deploy/nginx.conf#L36-L40contains
the Nginx directives for robots.txt. If you do not use the stock
Fabric script and Nginx configuration, you will not get robots.txt by
default and will have to add it to your custom configuration.

best,
ken


On Mon, Mar 31, 2014 at 11:30 AM, Eduardo Rivas wrote:

> Well that's a new one for me! I know sitemaps are automatically generated
> from Displayable instances, but never knew robots.txt was being inserted in
> production. It's weird, my sites return a 404 when I look for robots.txt.
> May I suggest we provide an option to modify robots.txt from the Site
> settings? That'd be pretty handy.
>
> --
> 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: How and where to create sitemap.xml and robot.txt

2014-03-31 Thread Eduardo Rivas
Well that's a new one for me! I know sitemaps are automatically generated 
from Displayable instances, but never knew robots.txt was being inserted in 
production. It's weird, my sites return a 404 when I look for robots.txt. 
May I suggest we provide an option to modify robots.txt from the Site 
settings? That'd be pretty handy.

-- 
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] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Ken Bolton
Hi Tameen,

I urge you to read the Mezzanine documentation thoroughly. As with Django,
the Mezzanine documentation is of extraordinary quality and covers the
topics you bring up much more thoroughly than I will do below. Actually,
after reading the documentation myself briefly to make sure I don't give
you bad information, I have changed my mind and will link to sections in
the docs.

On Mon, Mar 31, 2014 at 11:15 AM, Tameen Malik  wrote:

> First Scenario: I go to http://127.0.0.1:8000/admin/ page. i log-in using
my admin account. I go to `Pages`, add new
> page named `FirstPage` . This page has one submission form to get email
id , user name etc. Now i can see this
> page in my site.This goes fine. Problem is How to get data/values posted
in this form of FirstPage.

Have you tried adding a "Form" in the admin rather than a "Page"?
http://mezzanine.jupo.org/docs/content-architecture.html#page-templatesdiscusses
how to use page processors to do things with the posted form data.

> Second Scenario: I have created an html page using my editor. I save this
page to my templates folder. i want to
> bind this page to menu of home page. How to do this.

http://mezzanine.jupo.org/docs/content-architecture.html#page-templates

-- 
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] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Tameen Malik

>
> Kenneth Bolton i am still confuse with two things:
>

First Scenario: I go to http://127.0.0.1:8000/admin/ page. i log-in using 
my admin account. I go to `Pages`, add new page named `FirstPage` . This 
page has one submission form to get email id , user name etc. Now i can see 
this page in my site.This goes fine. Problem is How to get data/values 
posted in this form of FirstPage.

Second Scenario: I have created an html page using my editor. I save this 
page to my templates folder. i want to bind this page to menu of home page. 
How to do this.

My questions can similar to my first/last one's. But i am not getting my 
way that's why i need your assistance

Thank's for precious time.
Regards
Tameen


-- 
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] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Tameen Malik

>
> Great reply.
>>
>  
>
>> Thank's Kenneth Bolton
>>
>
>   Can i ask you more question's if i face any problems further :)
>   
>   Regards
>   Tameen 
>

-- 
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] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Tameen Malik

>
> Great reply. 
>>
>  
>
>> Thank's Kenneth Bolton
>>
>
>   Can i ask you more question's if i face any problems further :)
>   
>   Regards
>   Tameen 
>

-- 
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] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Tameen Malik

>
> Great reply. 
>
 

> Thank's Kenneth Bolton
>

  Can i ask you more question's if i face any problems further :)
  
  Regards
  Tameen 

-- 
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] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Ken Bolton
Hi Tameen,

See my response inline below.

On Mon, Mar 31, 2014 at 10:06 AM, Tameen Malik  wrote:

> if i create page i don't find this in templates folder and if i create
html page and store this in templates/pages folder,
> how to show this in menu of home page?

Pages are created in the admin interface, not in the templates folder. The
templates folder is for templates that are used to render the pages.

> using django.http.HttpRequest.method we return page url so that's work
similar to django framework?

Mezzanine doesn't just "work similar to django framework", it *is* simply a
Django application. Anything you can do with a Django application can be
done in Mezzanine *exactly* the same way.

ken

-- 
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: Sitemap Page

2014-03-31 Thread green

I am new to Mezzanine myself.  I could not even get sitemap.xml.  Sorry for 
not able to help but would appreciate if you can advise me how you get your 
sitemap.xml and where does it locate.

Thanks in advance for your help

On Tuesday, 4 February 2014 15:07:28 UTC, mich...@blazingtheagency.com 
wrote:
>
>
> Hello All,
>
> I am new to  Mezzanine, so if I am asking a silly question, I do apologize.
>
> Is there a way to build a site map view? One that can be styled and 
> automatically include all pages that are supposed to "show in sitemap" ?
>
> I've searched the documentation; the sitemap.xml does work perfectly, but 
> I am looking to have a styled sitemap for visitors to be able to use.
>
> Thanks in advance for any help anyone can provide..
>

-- 
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] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Tameen Malik

>
> Hi Kenneth Bolton Thank's for quick response. Few more questions:
>>
> In the admin interface for the page, look for the fields "Show in menus". 
>  -*- using admin interface if i create page i don't find this in 
> templates folder and if i create html page and store this in 
> templates/pages folder, how to show this in menu of home page?*
>  
> using 
> django.http.HttpRequest.method
>  *we return page url so that's work similar to django framework?*
>
> Thank's Looking forward to your reply :)
>
 Tameen 

-- 
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] How and where to create sitemap.xml and robot.txt

2014-03-31 Thread Ken Bolton
Have you looked for the files at the root of your deployed project? For
instance, http://mezzanine.jupo.org/sitemap.xml and
http://mezzanine.jupo.org/robots.txt.

If you want to see how they get generated, use the source:
https://github.com/stephenmcd/mezzanine/blob/754d94e79ea05038a62296f16221abc9a43c08cd/mezzanine/urls.py#L42-L54

best of luck,
ken


On Mon, Mar 31, 2014 at 8:24 AM, green  wrote:

> Sorry for asking silly questions but I am stuck and don't know where to
> look for this after searching around the net.
>
> I have may Mezzanine project up and running but I do not know how to
> create sitemap file.  I notice that pages has 'show in site map' tick but
> where is it?
>
> Do I need to write a code to get sitemapfile and if so how?
>
> No clue as to how/where sitemap.xml and robot.txt shld be created and
> located.  Any pointers are much appreciated.  Thank you.
>
> --
> 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] How and where to create sitemap.xml and robot.txt

2014-03-31 Thread green
Sorry for asking silly questions but I am stuck and don't know where to 
look for this after searching around the net.  

I have may Mezzanine project up and running but I do not know how to create 
sitemap file.  I notice that pages has 'show in site map' tick but where is 
it?  

Do I need to write a code to get sitemapfile and if so how?   

No clue as to how/where sitemap.xml and robot.txt shld be created and 
located.  Any pointers are much appreciated.  Thank you.

-- 
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] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Ken Bolton
Hi Tameen,

Great questions, all. I urge you to go through the entire Django tutorial
if you have not already. During my first four years with Django, I did the
tutorial once a quarter to reinforce what I was learning. That is right, I
did the tutorial sixteen times!

My answers are inline below.


On Mon, Mar 31, 2014 at 4:26 AM, Tameen Malik  wrote:

> Question 1: How to place this page in menu of home page using admin
> interface?
>
In the admin interface for the page, look for the fields "Show in menus".


>  Question 2: How to solve this error 'NoneType' object has no attribute
> 'split' generates if I browse http://127.0.0.1:8000/admin/conf/setting/?
>
We will need a lot more context. My guess is that you have something
misconfigured. Your best bet might be to see if you can replicate the
problem with a fresh install, then copy your application into the fresh
install.

> question3 : How to access POST DATA from forms created in mezzanine
> interface?
>
I believe you will have to create a custom view along the lines of
https://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest.methodto
check for what HTTP method is being used.

hth.

ken

-- 
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] How to set menus and to get postedata in Mezzanine Django

2014-03-31 Thread Tameen Malik


I have created a *model.py* file in which I define my classes like:

from django.db import modelsfrom mezzanine.pages.models import Page
class Author(Page):
dob = models.DateField("Date of birth")
class Book(models.Model):
author = models.ForeignKey("Author")
cover = models.ImageField(upload_to="authors")

Then my HTML page and place it into templates folder define URL in *urls.py*
 file.

I run command python manage.py collecttemplates to get all templates

Now I browse 127.0.0.1/8000/page1/ to get my page view.

Question 1: How to place this page in menu of home page using admin 
interface?

Question 2: How to solve this error 'NoneType' object has no attribute 
'split' generates if I browse http://127.0.0.1:8000/admin/conf/setting/?

question3 : How to access POST DATA from forms created in mezzanine 
interface?

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