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.

Reply via email to