Oh cool, I didn't know about this video. Thanks. And I've done the basic 
Django tutorial. Though I'm gonna go thru it again to try and better 
understand Mezzanine site-making.

On Wednesday, October 11, 2017 at 9:15:13 PM UTC-4, Eduardo Rivas wrote:
>
> Also (and I know I've posted this a ton lately, but I think it's relevant) 
> here's a talk describing the general steps I follow when building apps for 
> Mezzanine: https://www.youtube.com/watch?v=yVAmMXES2EU
>
> It touches on how to uses Mezzanine's models, admin, and template 
> utilities.
>
> On 2017-10-11 7:08 PM, Eduardo Rivas wrote:
>
> Hi Tom.
>
> You need to register your model in the admin. You can use 
> mezzanine.blog.admin as an example: 
> https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/blog/admin.py
> .
>
> This admin configuration is a bit complex, so I recommend you become 
> familiar with Django's admin in general before diving into it. Have you 
> completed the official Django tutorial? It should introduce you to all 
> these concepts: https://docs.djangoproject.com/en/1.11/intro/tutorial01/
>
> On 2017-10-11 7:02 PM, Tom Tanner wrote:
>
>
> Hey all, 
>
> When I go to the Admin section of my site, I see the "Blog posts" under 
> "Content" on the left. I want to make a new "Content" section called 
> "Projects." It would be similar to a page of blog posts. But I'm not sure 
> how to start doing this.
>
> Here's what my app's `models.py` looks like.
>
> from __future__ import unicode_literals
>
>
> from django.db import models
> from django.core.urlresolvers import reverse
> from django.utils.translation import ugettext_lazy as _
>
>
> from mezzanine.conf import settings
> from mezzanine.core.fields import FileField
> from mezzanine.core.models import Displayable, Ownable, RichText, Slugged
> from mezzanine.generic.fields import CommentsField, RatingField
> from mezzanine.utils.models import AdminThumbMixin, upload_to
>
>
> # Create your models here.
>
>
> class ProjectsPage(Displayable):
>  '''
>  A page representing the format of the page that 
>  has links to standalone, project projects
>  '''
>
>
>  categories = models.ManyToManyField("ProjectCategory",
>  verbose_name=_("Categories"),
>  blank=True, related_name="projectposts")
>  allow_comments = models.BooleanField(verbose_name=_("Allow comments"),
>  default=True)
>  comments = CommentsField(verbose_name=_("Comments"))
>  featured_image = FileField(verbose_name=_("Featured Image"),
>  upload_to=upload_to("project.ProjectPost.featured_image", "project"),
>  format="Image", max_length=255, null=True, blank=True)
>  related_posts = models.ManyToManyField("self",
>  verbose_name=_("Related posts"), blank=True)
>  admin_thumb_field = "featured_image"
>
>
>  class Meta:
>    verbose_name=_("Project link")
>    verbose_name_plural=_("Project links")
>    ordering=("-publish_date",)
>
>
>
>
> class ProjectCategory(Slugged):
>  '''
>  A category for grouping project links into a series
>  '''
>
>
>  class Meta:
>    verbose_name=_("Project Category")
>    verbose_name_plural=_("Project Categories")
>    ordering=("title",)
>   
> I basically copied a section of `mezzanine/blog/models.py`. 
>
> But "Projects" won't show up in my Admin menu. What am I doing wrong?
> -- 
> 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 [email protected] <javascript:>.
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to