[mezzanine-users] Re: Multiple Blogs

2015-03-02 Thread Eduardo Rivas
Hello Dennis. I actually needed to do this for a project a few years ago. 
As far a I know, Mezzanine doesn't support multiple blogs out of the box. 
What I did was create a Blog model, which simply had a slug and title, 
and then add it as FK to the standard BlogPost and BlogCategory models. 
After that, it's just a matter of updating urls and views to account for a 
blog_slug parameter to get the correct Blog instance. If you want to get 
fancy, you can create base templates for each blog. That way, you get 
unique blog posts, categories and templates for each blog. You'll also need 
to modify the queries made by the Admin to only return the subset of 
BlogPost's that match a Blog instance in particular.

Important note: this of course implies you're forking Mezzanine's blog 
app, so you will have to maintain it by yourself and install it in place of 
the default one.

-- 
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 make some user fields on registration form optional

2015-03-02 Thread River Satya
Hi all!

I have a client who wants to make the first and last name fields on the 
registration form optional. I've dug into the Mezzanine (3.1.9) codebase, 
and it appears that all fields on the Django User model object are made 
mandatory in accounts.forms.ProfileForm (accounts/forms: line 100/101):

if field in user_fields:
self.fields[field].required = True

This is contrary to my client's requirement, and commenting out these two 
lines seems to make things work as required. Is there a non-hacky way to 
achieve this end?

Thanks for the help!

River

-- 
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 to make some user fields on registration form optional

2015-03-02 Thread wongo888
You might just want to roll your own

https://docs.djangoproject.com/en/1.6/topics/auth/customizing/#substituting-a-custom-user-model

K


On Monday, March 2, 2015 at 8:54:49 PM UTC-8, River Satya wrote:

 Hi all!

 I have a client who wants to make the first and last name fields on the 
 registration form optional. I've dug into the Mezzanine (3.1.9) codebase, 
 and it appears that all fields on the Django User model object are made 
 mandatory in accounts.forms.ProfileForm (accounts/forms: line 100/101):

 if field in user_fields:
 self.fields[field].required = True

 This is contrary to my client's requirement, and commenting out these two 
 lines seems to make things work as required. Is there a non-hacky way to 
 achieve this end?

 Thanks for the help!

 River


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