Mezzanine 1.0 and Cartridge 1.0 Road Map

已查看 417 次
跳至第一个未读帖子

Stephen McDonald

未读,
2012年1月28日 10:35:372012/1/28
收件人 mezzani...@googlegroups.com
Hey guys,

I've pushed up to GitHub and Bitbucket (not to pypi) the latest branches of Mezzanine, Cartridge, and the forks of Grappelli and FileBrowser. If no new development occurs over the coming weeks, these will be released as Mezzanine 1.0 and Cartridge 1.0. I've pushed up a very large amount of changes that I've been working on over the last couple of months. I'll go over these first then talk about some outstanding things that could possibly go into the 1.0 releases.

Here are links to the all the commits pushed just now for each project:


All of this works falls under 3 main categories:

- Default front-end templates now use Twitter Bootstrap
- Gallery app added to Mezzanine
- Dropped support for Django 1.1 and 1.2

== Bootstrap ==

Not much detail to go into here. It was mostly a straight port of the templates with very little structural change. One thing that did come out of it was a new templatetag for rending form fields. Given a form object, it is: {% fields_for form %} which includes the template templates/includes/form_fields.html containing HTML for each form field. All forms use this now instead of form.as_ul etc, so you can totally customize how each form field is rendered.

== Gallery App ==

I've added the app mezzanine.galleries which is mostly just a polished version of the example in the docs. It includes support for uploading a zip file to import a gallery, and a Facebook-like jQuery overlay/slideshow on the front-end. I've used FileBrowser's FileField for this, and out of that, for the first time I've dug into the filebrowser_safe code and made a bunch of changes:

- Ripped out the "image versions" feature which didn't handle unicode well, and Mezzanine never exposed, and replaced all thumbnailing with Mezzanine's thumbnailing.
- Added a redirect after upload back to the directory browse screen - this was always a UX flaw as there's no link back to select a file after uploading it.
- Renamed all the urls and titles to "Media Library" in line with the menu item it's given in Mezzanine.
- Added automatic creation of the uploads directory when it doesn't exist.

I also changed the new feature_image field in the blog to use a FileBrowser field. The only other file upload is product images in Cartridge but that didn't work easily so I've left it for now.

== Django 1.1 and 1.2 ==

Dropping support for these has been the biggest change. It's allowed for a lot of code to be thrown out. Here's what it actually equates to:

- Thrown out most of the code for handling device templates (mobiles, tablets etc) - it's not implemented mostly with a single middleware mezzanine.core.middleware.TemplateForDeviceMiddleware which can depend on Django 1.3's TemplateResponse object, which gives you access to modifying the template list to choose from prior to rendering. 
- Replaced all uses of ifequal and ifnotequal templatetags with 1.2's if operators (== and !=).
- Threw out all the 1.1/1.2 handling in mezzanine.conf.utils, which would do things like automatically change certain settings (names of middleware classes, etc) that changed across Django versions.

The final and most significant change with dropping 1.1/1.2 however is that Mezzanine, Cartridge, grappelli_safe and filebrowser_safe now fully support Django's staticfiles app and use it by default. This has led to even more cleanup:

- The concept of themes is now redundant, since mostly all this did was automate copying and serving media files for themes, so all the management commands and settings for those are gone. Just add an installed app with templates and a static directory and you've got yourself a theme.
- All the different aliases required for deploying are no longer necessary, so all the handling of Mezzanine's internal media files (referred to as content_media) and the management command for helping out with the alises are all gone. 
- Tons of inline CSS and JS, mostly in admin templates, has been moved out into separate CSS and JS files.
- Hacks for hosting grappelli assets when running locally (ip:port would be used for the full url) are gone.
- django.contrib.messages is now first class, and cookie messaging is the default

== Miscellanous ==

- Added some TinyMCE features to the default setup - fullscreen button, find/replace, context menu, tab focus, inline popups (no more popup windows).
- Mezzanine and Cartridge docs now include model diagrams thanks to abstract model support landing in the graphviz layer of django-extensions.
- Featured image field on blog posts (thanks Josh Batchelor).
- pillow (http://pypi.python.org/pypi/Pillow) is now a dependency. It's simply a pip installable version of PIL, so the checks for it being installed have been relaxed, such as thumbnail templatetag, which will now complain loudly if it can't create a thumbnail.
- PageAdmin now behaves more like Django's ModelAdmin, in that if you subclass it for your custom Page model subclass, and don't define fieldsets for your the admin class, all the extra fields added onto your custom Page model are automatically added to the admin class's fieldsets, along with the standard page fields. This removes a lot of the cases where you have to do the deepcopy(fieldsets) dance to add your custom fields to the admin.
- thumbnail templatetag now stores thumbnails in subdirectory relative to the original image, configurable via the THUMBNAILS_DIR_NAME settings which defaults to ".thumbnails".
- page_menu fixes (thanks Josh Cartmell).
- mezzanine.forms now has Number and URL type fields for admin users to choose when building forms
- Some fixes in mezzanine.forms for exporting form entries to MS Excel
- Blog posts have a bool setting BLOG_URLS_USE_DATE defaulting to False, which when True will use the format /blog/yyyy/mm/dd/slug for blog posts (thanks again Josh Batchelor).
- When running syncdb or createdb locally, the default site is given the host 127.0.0.1:8000 instead of example.com, so admin redirects work out of the box.

I think that's everything! There weren't really any changes to Cartridge, apart from keeping it all in line with the above, so it's fully Bootstrap'd and staticfile'd as well. Check out the new demo with Bootstrap and galleries: http://mezzanine.jupo.org/gallery/

== 1.0 Releases ==

As for Mezzanine 1.0 and Cartridge 1.0, as I mentioned if nothing else happens, the current state they're in will become the 1.0 releases. If anyone has any feedback on any of the above I'd be more than happy to consider changing things prior to the official releases. Here are some things that I think would be awesome to include, that I'm not gonna get a chance to work on myself, and aren't going to block releasing 1.0:

- Translatable content. There was some good work and discussion in this thread: https://github.com/stephenmcd/mezzanine/issues/106 which also led to working out how to get django-modeltranslation working with Mezzanine. I don't think the work done was too far off, but the developer who did the work isn't available to continue it right now.

- Bootstrap 2.0. I don't think there would be much involved here from what I've seen. The Bootstrap port uses 1.4 and 2.0 is due out any day now.

- Project homepage design. This is the most important one for my mind, and the hardest one to do since anyone reading this is most likely not a designer. With that said, if you know of a professional designer who could spare a few hours to do a clean and elegant design for the project homepage, it would be worth more than you can imagine. I have wireframes for it already, so it just needs to be prettified. If you have anyone who'd like to help out, hit me up for the wireframe. If nothing turns up, I'm gonna try and whip something up myself, but it would be ideal if it was done by a pro!

Please try out these latest changes and help me make sure 1.0 is well tested. All feedback welcome. If you have anything you can think of that should be included in 1.0, now's the time to speak up!

Cheers,
Steve


--
Stephen McDonald
http://jupo.org

Lee Matos

未读,
2012年1月28日 11:38:142012/1/28
收件人 mezzani...@googlegroups.com
I'm super stoked about this and want to say thank you to all the contributors that made this happen!  One question and one heads up:

Q:  What purpose do grappelli_safe and filebrowser_safe serve at this point? Should we be able to deprecate them in favor of the "official" versions?

Heads up: The current version of Mezz on github is still  0.12.4 so trying to install from cartridge from github to test out "1.0"  failed. It's a simple fix to just change the Mezz version number locally. ;)

Lee

Josh B

未读,
2012年1月28日 18:50:102012/1/28
收件人 mezzani...@googlegroups.com
Stephen,

If you want to send over the wireframes I have some designers who I can get to do it.

Josh

Stephen McDonald

未读,
2012年1月28日 18:57:392012/1/28
收件人 mezzani...@googlegroups.com
I've temporarily removed the requirements from the setup files, so you can get an environment up and running with the following pip requirements:


As for the *_safe packages, there's one less reason to be using them, namely the old Django compatibility argument. Here's my current list of reasons for still using them:

- As described, I've made a handful of changes to filebrowser_safe to integrate it more tightly with Mezzanine
- I think the latest Grappelli makes a few UX flaws - bundling up the admin list filters requiring extra clicks (we actually removed Grappelli from a project at work because of this), and admin actions submit button in the bottom right corner, far removed from the actions themself, just to name a couple.
- This one's subjective, but I actually think the latest Grappelli regresses visually. The barbershop background, glowing buttons etc - the original Grappelli was/is super clean which was what I originally loved about it. It's just a skin for me, I'm not fussed with tthe features it adds and have removed many of them (bookmarks etc).
- I did sit down during this last sprint and had a go at using the latest to see what would be involved. Unfortunately the amount of admin customizations that Mezzanine makes was incompatible with the latest Grappelli, styles were blown out everywhere. Not saying it can't be done if there's consensus to do so, just that there's a good amount of work involved in making this happen.
- Lastly, we'd be moving to a situation where we'd now have to keep in sync with the latest Grappelli/Filebrowser and any breaking changes those guys decide to makle. Given the amount of manpower we have at the moment, this would be undesirable.

Stephen McDonald

未读,
2012年1月28日 19:07:532012/1/28
收件人 mezzani...@googlegroups.com
Thanks so much Josh!


I guess the only guidelines I have in mind for the design are: light and minimal/clean

Let me know how you get on either way.

Gary Reynolds

未读,
2012年1月28日 19:36:212012/1/28
收件人 mezzani...@googlegroups.com
Excellent work Steve, I think that the move towards staticfiles is probably the biggest positive of all.

On Sunday, 29 January 2012 at 2:35 AM, Stephen McDonald wrote:
== 1.0 Releases ==

As for Mezzanine 1.0 and Cartridge 1.0, as I mentioned if nothing else happens, the current state they're in will become the 1.0 releases. If anyone has any feedback on any of the above I'd be more than happy to consider changing things prior to the official releases.
While Cartridge didn't seem to get as much attention, I'd like to suggest that it could greatly benefit from making use of the upcoming formwizard inclusion in the upcoming Django 1.4 (which is also available as django-formwizard for 1.3) in the checkout stage of the project.

While working on store.coopers.com.au I wanted to make some changes to the checkout flow, and this was difficult because the logic is not easily extensible and makes a number of assumptions. The cartridge.shop.views.checkout_steps and cartridge.shop.views.complete could well be replaced with a FormWizard that could be optionally configured by a developer if they have a desire to adjust it.

If I can find some spare time to look at this I will, but wanted to suggest it to the community as food for thought.

Cheers,
Gary

Stephen McDonald

未读,
2012年1月28日 19:41:052012/1/28
收件人 mezzani...@googlegroups.com
Thanks Gary. I haven't looked at the new formwizard stuff but it sounds like a great idea - you're right the current implementation is quite hairy.

Josh

未读,
2012年1月28日 22:05:132012/1/28
收件人 Mezzanine Users
Congratulations Steve on Mezz and Cartridge v1.0.
Loving the Bootstrap implementation.

Josh D.

On Jan 29, 11:41 am, Stephen McDonald <st...@jupo.org> wrote:
> Thanks Gary. I haven't looked at the new formwizard stuff but it sounds
> like a great idea - you're right the current implementation is quite hairy.
>
> On Sun, Jan 29, 2012 at 11:36 AM, Gary Reynolds <
>
>
>
>
>
>
>
>
>
> gary.reyno...@touchtechnology.com.au> wrote:
> > Excellent work Steve, I think that the move towards staticfiles is
> > probably the biggest positive of all.
>
> > On Sunday, 29 January 2012 at 2:35 AM, Stephen McDonald wrote:
>
> > == 1.0 Releases ==
>
> > As for Mezzanine 1.0 and Cartridge 1.0, as I mentioned if nothing else
> > happens, the current state they're in will become the 1.0 releases. If
> > anyone has any feedback on any of the above I'd be more than happy to
> > consider changing things prior to the official releases.
>
> > While Cartridge didn't seem to get as much attention, I'd like to suggest
> > that it could greatly benefit from making use of the upcoming formwizard
> > inclusion in the upcoming Django 1.4 (which is also available as
> > django-formwizard <http://django-formwizard.readthedocs.org/> for 1.3) in
> > the checkout stage of the project.
>
> > While working on store.coopers.com.au I wanted to make some changes to
> > the checkout flow, and this was difficult because the logic is not easily
> > extensible and makes a number of assumptions. The
> > cartridge.shop.views.checkout_steps and cartridge.shop.views.completecould well be replaced with a

Josh Cartmell

未读,
2012年1月29日 16:12:012012/1/29
收件人 mezzani...@googlegroups.com

Congrats on 1.0.  Mezzanine and Cartridge have come a long way largely due to you Steve!  The community around them is also great!
I like the new bootstrap look and the gallery integration is really nice!  
I look forward to continuing use of Mezzanine and Cartridge in the years to come.

Lakshman Prasad

未读,
2012年2月2日 08:00:532012/2/2
收件人 mezzani...@googlegroups.com
Hello,

I want to start a new project on Mezzanine. A few questions:

* If I want to start with the current under development branch, that will be promoted to 1.0, I should start at the master; isn't it?
* I am interested in the fluid layout of the twitter bootstrap2. Has the default theme been migrated to bootstrap2? If not, I'd like to do the same and contribute back.
* Is Mzn tested with django 1.4 alpha? Can I use it on that?

Lakshman

Josh B

未读,
2012年2月3日 14:29:322012/2/3
收件人 mezzani...@googlegroups.com
Stephen,

Do you have sites you really like or any reference site you want for the Mezzanine site? Also do you have a logo?

John Campbell

未读,
2012年2月3日 15:40:142012/2/3
收件人 mezzani...@googlegroups.com
If you find a theme at themeforest or similar, I'll gladly buy and
donate it. They are fairly easy to integrate.

Its the least I can do.

Take care,
jpc

--
John Campbell
Sent from Mobile Phone

Stephen McDonald

未读,
2012年2月3日 21:31:472012/2/3
收件人 mezzani...@googlegroups.com
No logo yet - could be as simple as the Mezzanine name in a nice font that fits in with the project homepage design, however that turns out.

I think designs like http://www.joyent.com/ and https://github.com/features/projects are really nice examples of clean and light designs with info on them well spaced out.

Anyone have any other sites that fit this bill?


On Sat, Feb 4, 2012 at 6:29 AM, Josh B <josh.ba...@wearetopsecret.com> wrote:
Stephen,

Do you have sites you really like or any reference site you want for the Mezzanine site? Also do you have a logo?



Stephen McDonald

未读,
2012年2月3日 21:33:082012/2/3
收件人 mezzani...@googlegroups.com
Thanks John - will take you up on that if we need to. Hopefully we can have something unique put together specifically from the community.

Stephen McDonald

未读,
2012年2月3日 21:37:162012/2/3
收件人 mezzani...@googlegroups.com
Just to clarify on the licensing of the homepage design - it'll remain the property of whoever designs it, obviously with permission granted to myself on behalf of Mezzanine to use it exclusively for the project's homepage.

It's not open source or available for anyone to use, unless the you specifically wanted to make it so. It would be my preference to keep it not free for use, but that's entirely up to the designer.

Stephen McDonald

未读,
2012年2月3日 22:04:062012/2/3
收件人 mezzani...@googlegroups.com
Hey, answers inline:

On Fri, Feb 3, 2012 at 12:00 AM, Lakshman Prasad <laks...@lakshmanprasad.com> wrote:
Hello,

I want to start a new project on Mezzanine. A few questions:

* If I want to start with the current under development branch, that will be promoted to 1.0, I should start at the master; isn't it?

That's right - current master is what will become1.0
 
* I am interested in the fluid layout of the twitter bootstrap2. Has the default theme been migrated to bootstrap2? If not, I'd like to do the same and contribute back.

It hasn't been upgraded to 2.0 yet, and needs to happen, so if you'd like to do this that would be an awesome help. A few of notes:

- As far as I know it should simply be a matter of updating bootstrap and changing some css names in the templates.
- Here is the commit of the original port to bootstrap, which should serve as a good guide to what needs to be touched: https://github.com/stephenmcd/mezzanine/commit/a498fc4c0cb0bf37d2e75162d5f275cd45d57906 - the upgrade to 2.0 will be much less work than what went into that commit, but it shows all the touch points.
- Here's Mezzanine's own stylesheet, that defines Mezzanine specific things, but also references many bootstrap names, so will be of relevance: https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/core/static/css/mezzanine.css
- Please limit the branch commits directly to the upgrade only. If you come up with any changes that aren't explicitly required by the upgrade, by all means make them, but on a separate branch.

There's also the Cartridge Project (an ecommerce package for Mezzanine) which is developed very closely in conjunction with Mezzanine. It will need to be upgraded also, but should be much less work than the upgrade for Mezzanine itself. There's no obligation to do this as well, but if you're up for it it'd be a great help. And here are Cartridge's css and initial bootstrap commit in conjunction with the above:


Ignore anything to do with mezzanine.css in the Cartridge commit, as it has been removed from Cartridge with the move to staticfiles.

 
* Is Mzn tested with django 1.4 alpha? Can I use it on that?

I tested against 1.4 several months ago, and at that time the only incompatibility was with restructuring of syndication feeds in Django which I added handling for here: https://github.com/stephenmcd/mezzanine/commit/3df5987239b7160787bcc9e05de8584e45026dff#mezzanine/blog/feeds.py

I'm sure more has changed since then, so please try 1.4 as compatibility with it should definitely be achieved before we release 1.0

Stephen McDonald

未读,
2012年2月3日 22:06:292012/2/3
收件人 mezzani...@googlegroups.com
One thing I didn't mention with bootstrap. I've bundled the bootstrap.less file as I've made a couple of changes to it for Mezzanine. Specifically I increased the grid size to be larger than 960px. I believe this won't be necessary with 2.0's responsive layout, but it's something to keep in mind,

Stephen McDonald

未读,
2012年2月3日 22:07:432012/2/3
收件人 mezzani...@googlegroups.com
Really like http://labs.citrusbyte.com/ too.

Josh B

未读,
2012年2月4日 19:38:152012/2/4
收件人 mezzani...@googlegroups.com
Perfect, I am hoping the designer will have some time this week to come up with a design. I will let you know.

Stephen McDonald

未读,
2012年2月5日 17:56:172012/2/5
收件人 mezzani...@googlegroups.com
Here's another really nice one: http://django-userena.org/


On Sun, Feb 5, 2012 at 11:38 AM, Josh B <josh.ba...@wearetopsecret.com> wrote:
Perfect, I am hoping the designer will have some time this week to come up with a design. I will let you know.



step

未读,
2012年2月7日 11:05:232012/2/7
收件人 Mezzanine Users
I swear I thought I remember seeing some bad-ass mezzanine logo
floating around in the starter assets forever ago...

On Feb 3, 9:31 pm, Stephen McDonald <st...@jupo.org> wrote:
> No logo yet - could be as simple as the Mezzanine name in a nice font that
> fits in with the project homepage design, however that turns out.
>
> I think designs likehttp://www.joyent.com/andhttps://github.com/features/projectsare really nice examples of clean and
> light designs with info on them well spaced out.
>
> Anyone have any other sites that fit this bill?
>
回复全部
回复作者
转发
0 个新帖子