You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 17, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 17, 2026. It is now read-only.
Base on that spec, here is a rough model, assuming that certain fields (user, date fields, tags, description, guid) would follow the resources model for their constraints and data types.
importuuidfromtaggit.managersimportTaggableManagerfromdjango.confimportsettingsfromdjango.dbimportmodelsfromdjango.utilsimporttimezonefromdjango.contrib.authimportget_user_modeldefget_sentinel_user():
returnget_user_model().objects.get_or_create(username='deleted')[0]
defget_tags_display(self):
returnself.tags.values_list('name', flat=True)
classProjects(models.Model):
guid=models.UUIDField(default=uuid.uuid4, editable=False)
title=models.CharField(max_length=200)
project_creator=models.CharField(blank=True, max_length=200)
description=models.TextField(blank=True, max_length=600)
# specific URL of project home or github repourl=models.URLField(max_length=300)
# user who posted the projectuser=models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.SET(get_sentinel_user))
#TO DO: WHAT IS THIS FIELD FOR? IS THIS THE PROJECT CREATION DATE??date_published=models.DateTimeField(default=timezone.now)
# creation date of project entrycreated=models.DateTimeField(auto_now_add=True)
# modification date of project entrymodified=models.DateTimeField(default=timezone.now)
#TO DO: DEFINE FINAL DATA TYPE OF THIS FIELDopen_to_contributors=models.BooleanField()
#TO DO: DEFINE RELATIONS FOR THIS FIELDcontributing_cb_members= ?????
# Allow tags to be used across entities# E.g. so we can create composite views showing all entities sharing a common tagtags=TaggableManager(blank=True)
def__str__(self):
"""A string representation of the model."""returnself.title
@lpatmo -- should this be closed as a result of #170? Or are you keeping this open as a learning project (potentially reverting the PRs)/forking/branching etc.??
Fine to close! I thought the PR being merged would close the issue it was linked to directly 🤔 but note to self to double check (and make sure to loop back in the issue) 🎉
Activity
BethanyG commentedon Mar 4, 2020
As of PR #96, the field to reference tags should change to the following:
This field for guid should use UUID1:
and the imports at the top of the
projects/models.pyfile should be:BethanyG commentedon Aug 16, 2020
Closing as no longer relevant to current development.
watchtheblur commentedon Aug 27, 2020
Working on it now
BethanyG commentedon Sep 7, 2020
@lpatmo -- should this be closed as a result of #170? Or are you keeping this open as a learning project (potentially reverting the PRs)/forking/branching etc.??
lpatmo commentedon Sep 7, 2020
Fine to close! I thought the PR being merged would close the issue it was linked to directly 🤔 but note to self to double check (and make sure to loop back in the issue) 🎉