[mezzanine-users] Re: "You are trying to add a non-nullable field 'form_ptr' to aboutpage without a default;"

2017-10-20 Thread Tom Tanner
In that case, what must I add to `models.py`? If this was pure Django, it 
seems I'd need to add a dictionary of fields, including `form_ptr`. But 
what's the correct way in Mezzanine?

On Tuesday, October 17, 2017 at 4:22:44 AM UTC-4, Rainell Dilou Gómez wrote:
>
> I think the answer to this question can be useful to you.
>
> Why does my django formset need a pointer field reference? 
> 
>
> Il giorno lunedì 16 ottobre 2017 05:05:15 UTC+2, Tom Tanner ha scritto:
>>
>> Here's what my Mezzanine theme's `models.py` looks like.
>>
>> from __future__ import unicode_literals
>>
>>
>> from django.db import models
>> from django.core.urlresolvers import reverse
>> from django.utils.translation import ugettext_lazy as _
>>
>>
>> from mezzanine.conf import settings
>> from mezzanine.core.fields import FileField, RichTextField
>> from mezzanine.core.models import Displayable, Ownable, RichText, Slugged
>> from mezzanine.generic.fields import CommentsField, RatingField
>> from mezzanine.utils.models import AdminThumbMixin, upload_to
>> from mezzanine.forms.models import Form
>>
>>
>> class AboutPage(Form):
>>  '''
>>  All-in-one about page
>>  '''
>>
>>
>>  site_description= RichTextField(_("About"), help_text=_("A short 
>> description of this website."))
>>
>>
>>  class Meta:
>>  verbose_name=_("About page")
>>  verbose_name_plural=_("About pages")
>>
>> When I run `python manage.py makemigrations`, I get this message.
>>
>> You are trying to add a non-nullable field 'form_ptr' to aboutpage 
>> without a default; we can't do that (the database needs something to 
>> populate existing rows).
>> Please select a fix:
>>  1) Provide a one-off default now (will be set on all existing rows with 
>> a null value for this column)
>>  2) Quit, and let me add a default in models.py
>> Select an option: 2
>>
>>
>> How do I change my `AboutPage` class to avoid this message? 
>>
>> My goal is to make a page that where I can put a form with descriptions 
>> and other info for my site. 
>>
>

-- 
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: "You are trying to add a non-nullable field 'form_ptr' to aboutpage without a default;"

2017-10-20 Thread Tom Tanner
In that case, what must I add to my `models.py`?

On Tuesday, October 17, 2017 at 4:22:44 AM UTC-4, Rainell Dilou Gómez wrote:
>
> I think the answer to this question can be useful to you.
>
> Why does my django formset need a pointer field reference? 
> 
>
> Il giorno lunedì 16 ottobre 2017 05:05:15 UTC+2, Tom Tanner ha scritto:
>>
>> Here's what my Mezzanine theme's `models.py` looks like.
>>
>> from __future__ import unicode_literals
>>
>>
>> from django.db import models
>> from django.core.urlresolvers import reverse
>> from django.utils.translation import ugettext_lazy as _
>>
>>
>> from mezzanine.conf import settings
>> from mezzanine.core.fields import FileField, RichTextField
>> from mezzanine.core.models import Displayable, Ownable, RichText, Slugged
>> from mezzanine.generic.fields import CommentsField, RatingField
>> from mezzanine.utils.models import AdminThumbMixin, upload_to
>> from mezzanine.forms.models import Form
>>
>>
>> class AboutPage(Form):
>>  '''
>>  All-in-one about page
>>  '''
>>
>>
>>  site_description= RichTextField(_("About"), help_text=_("A short 
>> description of this website."))
>>
>>
>>  class Meta:
>>  verbose_name=_("About page")
>>  verbose_name_plural=_("About pages")
>>
>> When I run `python manage.py makemigrations`, I get this message.
>>
>> You are trying to add a non-nullable field 'form_ptr' to aboutpage 
>> without a default; we can't do that (the database needs something to 
>> populate existing rows).
>> Please select a fix:
>>  1) Provide a one-off default now (will be set on all existing rows with 
>> a null value for this column)
>>  2) Quit, and let me add a default in models.py
>> Select an option: 2
>>
>>
>> How do I change my `AboutPage` class to avoid this message? 
>>
>> My goal is to make a page that where I can put a form with descriptions 
>> and other info for my site. 
>>
>

-- 
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: No Payment step when $0

2017-10-20 Thread Josh B
If someone comes across this in the future the solution we came up with is 
as follows:
1. If the cart is a $0 cart
2. Hide the payment fields and use javascript to populate them with fake 
data. This way the form will pass validation.
3. Add a check in the payment process step to no process the card if the 
cart is $0


On Thursday, October 19, 2017 at 10:05:46 AM UTC-6, Josh B wrote:
>
> We have been trying to hide the payment step when the cart has a $0 total. 
> Has anyone pulled this off or any suggestions?
>
>

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