[mezzanine-users] Blog posts don't get published when using later time on deploy

2016-08-30 Thread zruu
I've successfully deployed my first application with nginx, gunicorn, 
memcached, supervisor, postgresql.

However, when users try to set the publish date to publish it later. It 
never get published on the blog. I can't get the query with them either on 
different places with the base manager. I tried first to restart the 
memcache and stop it, but that was not the issue. 

Is it gunicorn I should look into or what could be the issue here?

-- 
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] Question regarding wordpress import tool

2016-07-30 Thread zruu
When using the wordpress_import tool. I want to set a specific site ID. How 
could I do that? What I can see in the base.py it sets itself to 
get_current(): 
https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/blog/management/base.py#L156

I tried setting that to Site.objects.get(name='test.domain.com') but it 
didn't add the posts to that site object.

What can I do?

-- 
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] Need some help with assigning user site permission in a view

2016-07-21 Thread zruu
Thank you man! This helped me out A LOT! 

Cheers!

Den torsdag 21 juli 2016 kl. 23:20:24 UTC+2 skrev Ryne Everett:
>
> Ah, that makes sense. I guess you can't pass ManyToManyField's in the 
> constructor. Try:
>
> siteperms = SitePermissions.objects.create(user=user)
> siteperms.sites.add(site)
>
> On Thu, Jul 21, 2016 at 5:15 PM, zruu <usr...@gmail.com > 
> wrote:
>
>> Hi Ryne,
>>
>> Thanks for the quick reply. That was what I was looking for. I have a 
>> form on the front end that a user can create a site, and a user account at 
>> the same time. I want to automate this to minimize the administration as 
>> possible.
>>
>> However I tried that, and I got the error:
>>
>> 'sites' is an invalid keyword argument for this function
>>
>>
>>
>> Den torsdag 21 juli 2016 kl. 23:07:40 UTC+2 skrev Ryne Everett:
>>>
>>> SitePermission.objects.create(user=user, sites=(site,))
>>>
>>> I question whether this is really what you want to do, but without a 
>>> better idea what your goal is it's all I can offer.
>>>
>>> On Thu, Jul 21, 2016 at 4:56 PM, zruu <usr...@gmail.com> wrote:
>>>
>>>> Hey guys,
>>>>
>>>> I really need your help. I'm stuck at the moment. Maybe is too late. 
>>>> However. I need to in my class view add site permission instead of using 
>>>> through the admin. I have no clue how to do this.
>>>>
>>>> I looked through the Mezzanine code and all I found was this piece of 
>>>> code that looks something of value:
>>>>
>>>> sites = user.sitepermissions.sites.all() 
>>>>
>>>> *What I want to accomplish is to first to create the site object in my 
>>>> view:*
>>>>
>>>> site = Site.objects.create(name=name, domain=domain)
>>>>
>>>> Then set permission for my user to that site. How could I do 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-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.


Re: [mezzanine-users] Need some help with assigning user site permission in a view

2016-07-21 Thread zruu
Hi Ryne,

Thanks for the quick reply. That was what I was looking for. I have a form 
on the front end that a user can create a site, and a user account at the 
same time. I want to automate this to minimize the administration as 
possible.

However I tried that, and I got the error:

'sites' is an invalid keyword argument for this function



Den torsdag 21 juli 2016 kl. 23:07:40 UTC+2 skrev Ryne Everett:
>
> SitePermission.objects.create(user=user, sites=(site,))
>
> I question whether this is really what you want to do, but without a 
> better idea what your goal is it's all I can offer.
>
> On Thu, Jul 21, 2016 at 4:56 PM, zruu <usr...@gmail.com > 
> wrote:
>
>> Hey guys,
>>
>> I really need your help. I'm stuck at the moment. Maybe is too late. 
>> However. I need to in my class view add site permission instead of using 
>> through the admin. I have no clue how to do this.
>>
>> I looked through the Mezzanine code and all I found was this piece of 
>> code that looks something of value:
>>
>> sites = user.sitepermissions.sites.all() 
>>
>> *What I want to accomplish is to first to create the site object in my 
>> view:*
>>
>> site = Site.objects.create(name=name, domain=domain)
>>
>> Then set permission for my user to that site. How could I do 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-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.


[mezzanine-users] Need some help with assigning user site permission in a view

2016-07-21 Thread zruu
Hey guys,

I really need your help. I'm stuck at the moment. Maybe is too late. 
However. I need to in my class view add site permission instead of using 
through the admin. I have no clue how to do this.

I looked through the Mezzanine code and all I found was this piece of code 
that looks something of value:

sites = user.sitepermissions.sites.all() 

*What I want to accomplish is to first to create the site object in my 
view:*

site = Site.objects.create(name=name, domain=domain)

Then set permission for my user to that site. How could I do 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.


[mezzanine-users] Shouldn't comments that are deleted be hidden from other users without permission to that site?

2016-07-18 Thread zruu
I don't know how it's built, but I noticed something today. When having 
*SESSION_COOKIE_DOMAIN* on for a wildcard solution with all the sites I can 
see others comments that are deleted. I don't think it should be like that.

I would rather hide them from users that do not have permission to that 
specific site. What is Mezzanines standpoint on this matter?

-- 
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: 404 on /accounts/update/

2016-07-18 Thread zruu
I came across a solution for this:

def user_subdomain(request):
if request.META['HTTP_HOST'] == settings.NETWORK_DOMAIN:
return {
'user': None,
}
else:
username = request.META['HTTP_HOST'].split('.')[0]
sub_user = User.objects.get(username=username)
return {
'user': user,
}


Den måndag 18 juli 2016 kl. 12:55:50 UTC+2 skrev zruu:
>
> For some reason I do not know why, when I write this context processor I 
> can't go to /accounts/update/ anymore. It displays a 404.
>
> def user_subdomain(request):
> from django.shortcuts import get_object_or_404
> username = request.META['HTTP_HOST'].split('.')[0]
> user = get_object_or_404(User, username=username)
> return {
> 'user': user,
> }
>
> Everything else works just fine, and I can get to the login page etc.
>

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