Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
django-taggit
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
73f45810
authored
Dec 29, 2009
by
Alex Gaynor
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit 'origin/master'
parents
e3f630ce
fd048036
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
README.txt
+3
-3
taggit/managers.py
+2
-0
No files found.
README.txt
View file @
73f45810
django-taggit
django-taggit
=============
=============
Is a simpler approach to tagging with Django. Just add a TagManager to your
Is a simpler approach to tagging with Django. Just add a Tag
gable
Manager to your
model and go:
model and go:
from django.db import models
from django.db import models
from taggit.managers import TagManager
from taggit.managers import Tag
gable
Manager
class Food(models.Model):
class Food(models.Model):
# ... fields here
# ... fields here
tags = TagManager()
tags = Tag
gable
Manager()
Then you can use the API like so:
Then you can use the API like so:
...
...
taggit/managers.py
View file @
73f45810
...
@@ -26,6 +26,8 @@ class TaggableManager(object):
...
@@ -26,6 +26,8 @@ class TaggableManager(object):
self
.
creates_table
=
False
self
.
creates_table
=
False
self
.
db_column
=
None
self
.
db_column
=
None
self
.
choices
=
None
self
.
choices
=
None
self
.
creation_counter
=
models
.
Field
.
creation_counter
models
.
Field
.
creation_counter
+=
1
def
__get__
(
self
,
instance
,
type
):
def
__get__
(
self
,
instance
,
type
):
manager
=
_TaggableManager
()
manager
=
_TaggableManager
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment