Implementing A Directory

27 views
Skip to first unread message

Fendy Pierre

unread,
Oct 18, 2019, 10:30:52 PM10/18/19
to Mezzanine Users
Hello, 

I'm fairly new to Mezzanine. I'm creating a website for a non profit organization. Mezzanine offers most of the requirements except a directory.   What is the best way of implementing a directory of businesses? Their model are laid out as follows: 

class BusinessCategory(models.Model):
 name
= models.CharField(max_length=50)

 
def __str__(self):
 
return self.name


class Business(Page):
 name
= models.CharField(max_length=50)
 about
= models.CharField(max_length=300, blank=True)
 location
= models.CharField(max_length=100, blank=True)
 category
= models.ForeignKey("BusinessCategory")
 cover
= models.ImageField(upload_to="businesses", blank=True)
 website
= models.URLField(blank=True)
 phone_number
= models.CharField(max_length=10, blank=True)
 hours
= models.CharField(max_length=50, blank=True)
 days
= models.CharField(max_length=50, blank=True)
 email
= models.EmailField(blank=True)

 
def __str__(self):
 
return self.name




Any advice as to the ideal way of implementing this? 

Joseph Mohan

unread,
Oct 19, 2019, 8:54:53 AM10/19/19
to mezzani...@googlegroups.com
Might be better to use the built in settings from mezzanine.conf: http://mezzanine.jupo.org/docs/configuration.html

Then you could store and use that information anywhere you like on the site easily.

Joe

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/mezzanine-users/00877893-255f-45fc-9e4b-c39a7dd1c91b%40googlegroups.com.

Fendy Pierre

unread,
Oct 20, 2019, 12:36:41 AM10/20/19
to mezzani...@googlegroups.com
Okay, thank you for the response!

I read the documentation but I don't really see how those settings address the implementation of the directory. 

Reply all
Reply to author
Forward
0 new messages