Re: [mezzanine-users] Run manage.py commands for mezzanine plugins (drum in this case)

2016-10-31 Thread Jannik Weyrich
Thanks Ryne. That's what I was thinking eventually. The template project's
paths and imports just were not right.

I ended up adding a dev_manage.py and dev_settings.py with slighty
different paths and imports, which worked just fine.

2016-11-01 10:22 GMT+11:00 Ryne Everett :

> Shouldn't you be calling the `manage.py` in your own project rather than
> the template project? I'm not sure the template project itself is
> actually a valid django project until it is used to generate a concrete
> project. Regardless, you probably need to invoke `manage.py` from base
> project directory (same directory `manage.py` is in).
>

-- 
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] Run manage.py commands for mezzanine plugins (drum in this case)

2016-10-31 Thread Ryne Everett
Shouldn't you be calling the `manage.py` in your own project rather than
the template project? I'm not sure the template project itself is
actually a valid django project until it is used to generate a concrete
project. Regardless, you probably need to invoke `manage.py` from base
project directory (same directory `manage.py` is in).

-- 
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: NOT NULL constraint failed: myapp_myprofile.date_of_birth

2016-10-31 Thread akos1234
Thank you. That works.

Regards

On Thursday, 27 October 2016 22:59:50 UTC+1, akos1234 wrote:
>
> Hello everyone,
>
> I followed instructions here to setup the public user profile on mezzanine 
> cartridge. However, I seem to get this error so I can not move on-
>
> http://mezzanine.jupo.org/docs/user-accounts.html
>
> Below is the errors:
>
> IntegrityError at /shop/checkout/NOT NULL constraint failed: 
> myapp_myprofile.date_of_birth
>
> Request Method: GET
> Request URL: http://myhost:7000/shop/checkout/
> Django Version: 1.10.2
> Exception Type: IntegrityError
> Exception Value: NOT NULL constraint failed: myapp_myprofile.date_of_birth
>
>
> another :
>
> ntegrityError at /accounts/update/NOT NULL constraint failed: 
> myapp_myprofile.date_of_birth
>
> Request Method: GET
> Request URL: http://myhost:7000/accounts/update/
> Django Version: 1.10.2
> Exception Type: IntegrityError
> Exception Value: NOT NULL constraint failed: myapp_myprofile.date_of_birth
>
>
>
>
> So anything I am clicking on a button relating to accounts and user.
>
> in my models under myapp
>
>
> class MyProfile(models.Model):
> user = models.OneToOneField("auth.User")
> date_of_birth = models.DateField()
> bio = models.TextField()
>
>
>
> I have followed the instructions so I really do not understand my I am 
> having this problem. If I needed  to signup or login the form pops. Errors 
> occurs when I try to submit form for anything other button with user 
> profile relation.
>
>
> Cartridge==0.12.0
> Django==1.10.2
> Mezzanine==4.2.2
>
> I have checked the migrations
>
> migrations.CreateModel(
> name='MyProfile',
> fields=[
> ('id', models.AutoField(auto_created=True, primary_key=
> True, serialize=False, verbose_name='ID')),
> ('date_of_birth', models.DateField()),
> ('bio', models.TextField()),
> ('user', models.OneToOneField(on_delete=django.db.models.
> deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
> ],
> ),
>
>
> seems like everything seem fine so why Im I getting this error?  It's not 
> a bug is it?
>
>
> Would very much appreciate your reply.
>
> Thanking 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 deploy using Fabric to RHEL server?

2016-10-31 Thread Eduardo Rivas
Hi CJ. I think you're on the right track with your modified fabfile and 
supporting blog post. I'm still of the idea that something like this 
should exist as a third-party package, and not as part of Mezzanine 
itself. My understanding is that we're trying to provide an easy-to-use 
starting point for a common setup (cheap, popular, Debian based VPS), 
not an alternative for all server environments.


Furthermore, bringing this into Mezzanine means that we have to keep it 
compatible with new releases, and people deploying to RHEL (or using the 
distro-detection mechanism) will file bugs against Mezzanine when 
something breaks on that front.


--
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] Fabric deployment with ALLOWED_HOSTS wildcard issue

2016-10-31 Thread Eduardo Rivas

You're welcome :)

--
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] Fabric deployment with ALLOWED_HOSTS wildcard issue

2016-10-31 Thread Geoffrey Eisenbarth
Yeah, that fixes the issue. I think I'm more likely to use fully qualified
entries in ALLOWED_HOSTS in most cases so that the illegal hosts check is
left intact, but it's good to know.

Thanks for your help!

On Mon, Oct 31, 2016 at 12:03 PM, Eduardo Rivas 
wrote:

> Yeah, the server name is working, the problem is that nginx is returning a
> 444 (a proprietary error code that means "drop this request altogether"
> https://httpstatuses.com/444). Whether or not a 444 is returned depends
> on a simple match against an ALLOWED_HOSTS regex, and that will not work
> with the dot notation https://github.com/stephenmcd/
> mezzanine/blob/master/mezzanine/project_template/deploy/
> nginx.conf.template#L23-L26
>
> Maybe just comment-out that block and see how it goes? That should disable
> the checks for illegal hosts on nginx and let everything reach Django.
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Mezzanine Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/to
> pic/mezzanine-users/ElpLcvVVg8w/unsubscribe.
> To unsubscribe from this group and all its topics, 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] Fabric deployment with ALLOWED_HOSTS wildcard issue

2016-10-31 Thread Eduardo Rivas
Yeah, the server name is working, the problem is that nginx is returning 
a 444 (a proprietary error code that means "drop this request 
altogether" https://httpstatuses.com/444). Whether or not a 444 is 
returned depends on a simple match against an ALLOWED_HOSTS regex, and 
that will not work with the dot notation 
https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/project_template/deploy/nginx.conf.template#L23-L26


Maybe just comment-out that block and see how it goes? That should 
disable the checks for illegal hosts on nginx and let everything reach 
Django.


--
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] Fabric deployment with ALLOWED_HOSTS wildcard issue

2016-10-31 Thread Geoffrey Eisenbarth
Eduardo, 

I'll try to look more into it when I get a chance; I agree it seems to be 
an nginx issue, but it seems confusing as their 
(https://nginx.org/en/docs/http/server_names.html#wildcard_names) say they 
support the dot wildcard:

A special wildcard name in the form “.example.org” can be used to match 
> both the exact name “example.org” and the wildcard name “*.example.org”.
>




On Monday, October 31, 2016 at 11:44:35 AM UTC-5, Eduardo Rivas wrote:
>
> Hi Geoffrey. 
>
> I think your diagnoses is correct: Django supports the wildcard domain 
> syntax, but nginx doesn't. My recommendation would be to be explicit in 
> your ALLOWED_HOSTS (specifying a fully qualified domain name on each 
> entry). It my be worth adding a note stating that in the Deployment 
> section of the docs. 
>
>

-- 
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] Fabric deployment with ALLOWED_HOSTS wildcard issue

2016-10-31 Thread Eduardo Rivas

Hi Geoffrey.

I think your diagnoses is correct: Django supports the wildcard domain 
syntax, but nginx doesn't. My recommendation would be to be explicit in 
your ALLOWED_HOSTS (specifying a fully qualified domain name on each 
entry). It my be worth adding a note stating that in the Deployment 
section of the docs.


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