Idea of improvement of admin interface (Posts - Add post)

4 views
Skip to first unread message

RobertGawron

unread,
Nov 20, 2009, 6:19:54 PM11/20/09
to byteflow-hackers
Hi byteflow users,

What: when I need to add tags to my post I have to remember what tags
I have on my blog, maybe it's not a big problem but when I adding them
I can make misspell or forget to add some of them.

Idea: all current (added) tags are visible as check boxes, so user can
select as many as he want, wen he want to add some new category (not
existing yet) he looks below of check boxes and fill text field
designed to that purpose. It may looks complicated, so as an
attachment I'm sending you how it could look like in web browser -
just check, it's pretty simple (-> http://rgawron.megiteam.pl/static/ui.png
).

Advantages: form to adding new posts would be easier in use and less
vulnerable to misspells. Ofc those are only my opinions, not facts and
I'm wonder what do you think about that? It's my first time, so if I
forgot to talk about sth or make sth wrong please be forgiving. Thx.

Yuri Baburov

unread,
Nov 21, 2009, 8:59:44 AM11/21/09
to byteflow...@googlegroups.com
Hi Robert,

I've seen better implementations (i.e. when you have 20 tags, your
suggested one won't look good anymore), but the idea to add
possibility to select from existing tags is good. Could you try to
write the code?
And I can also suggest you very easy but working implementation:
Insert a combobox with choices + js in the help_text of that model
field, or when making an admin form from model.
Sorry, don't know anything about your django skill...

--
Best regards, Yuri V. Baburov, ICQ# 99934676, Skype: yuri.baburov,
MSN: bu...@live.com

RobertGawron

unread,
Nov 22, 2009, 9:12:26 AM11/22/09
to byteflow-hackers
Hi Yuri,

What would be better implementation in your opinion?
OK, I will make the code and submit path.

Yuri Baburov

unread,
Nov 22, 2009, 1:37:00 PM11/22/09
to byteflow...@googlegroups.com
Robert,

I think http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/
(facebook style) is very good;
Screenshot from http://code.google.com/p/django-tagging-autocomplete/ is ok.

I searched for http://www.google.com/search?hl=en&q=django+tagging+autocomplete
in attempt to minimize the amount of future work.

Alexander Solovyov

unread,
Nov 23, 2009, 9:23:52 AM11/23/09
to byteflow...@googlegroups.com
On Sun, Nov 22, 2009 at 4:12 PM, RobertGawron <mojwp...@gmail.com> wrote:
>
> Hi Yuri,
>
> What would be better implementation in your opinion?
> OK, I will make the code and submit path.

I think that better implementation would be something like Delicious input field
for tags: when you start entering characters, it displays drop-down with tags,
whose name starts with those characters.

--
Alexander

Yuri Baburov

unread,
Nov 23, 2009, 11:05:40 AM11/23/09
to byteflow...@googlegroups.com
Hi Alexander,

AFAIK, http://code.google.com/p/django-tagging-autocomplete/ does exactly this.
Please look at screenshots from the links in my previous message.

--

RobertGawron

unread,
Nov 23, 2009, 1:08:25 PM11/23/09
to byteflow-hackers
Hi all,
I also think http://code.google.com/p/django-tagging-autocomplete/
would be very good solution. I can submit path with this.

On Nov 23, 5:05 pm, Yuri Baburov <burc...@gmail.com> wrote:
> Hi Alexander,
>
> AFAIK,http://code.google.com/p/django-tagging-autocomplete/does exactly this.
> Please look at screenshots from the links in my previous message.
>
> On Mon, Nov 23, 2009 at 8:23 PM, Alexander Solovyov
>
>
>
> <pira...@piranha.org.ua> wrote:

Alexander Solovyov

unread,
Nov 23, 2009, 1:12:47 PM11/23/09
to byteflow...@googlegroups.com
On Mon, Nov 23, 2009 at 8:08 PM, RobertGawron <mojwp...@gmail.com> wrote:
>
> Hi all,
> I also think http://code.google.com/p/django-tagging-autocomplete/
> would be very good solution. I can submit path with this.

This seems like a perfect match. I'm waiting for your patch! :)

--
Alexander

RobertGawron

unread,
Nov 23, 2009, 3:43:03 PM11/23/09
to byteflow-hackers
Hi all,
below is path, I've been created.

Here http://code.google.com/p/django-tagging-autocomplete/wiki/ReadMe
is howto about installation django-tagging-autocomplete (require
django-tagging and jquery-autocomplete first).

Behavior of this plug-in is a bit different from current, because tags
are separated by coma + space (now you use only space). AFAIK this is
how this plug-in works by default, on their page there isn't any info
how to change this. If this change important, what do you suggest?

I also noticed (with IMHO is a little bug in django-tagging-
autocomplete) that when I choose a tag with white spaces and comas I
have to add double apostrophes by myself, because they aren't added
automatically.

I will be thankful for any ideas from you about this path.

rgawron@foo:/opt/profka/byteflow$ hg diff .
diff -r 913440399088 apps/blog/models.py
--- a/apps/blog/models.py Mon Nov 16 12:47:42 2009 +0200
+++ b/apps/blog/models.py Mon Nov 23 21:33:54 2009 +0100
@@ -19,7 +19,8 @@ from pingback import Pingback, create_pi
from pingback import Pingback, create_ping_func
from pingback import ping_external_links, ping_directories
import xmlrpc
-
+from django.db import
models
+from tagging_autocomplete.models import TagAutocompleteField

models.signals.post_save.connect(Site, lambda **kw:
Site.objects.clear_cache())
models.signals.post_delete.connect(Site, lambda **kw:
Site.objects.clear_cache())
@@ -40,7 +41,7 @@ class Post(models.Model):
upd_date = models.DateTimeField(_(u'Date'), auto_now=True,
editable=False)
is_draft = models.BooleanField(verbose_name=_(u'Draft'),
default=False)
enable_comments = models.BooleanField(default=True)
- tags = TagField(help_text=u'Delimiters are commas or spaces if
there is no commas. Phrases may also be quoted with "double quotes",
which may contain commas as part of the tag names they define.')
+ tags = TagAutocompleteField()

comments = generic.GenericRelation(CommentNode)
pingbacks = generic.GenericRelation(Pingback)
diff -r 913440399088 settings.py
--- a/settings.py Mon Nov 16 12:47:42 2009 +0200
+++ b/settings.py Mon Nov 23 21:33:54 2009 +0100
@@ -46,7 +46,7 @@ USE_I18N = True

# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
-MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media')
+MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'static') # not important,
just skip this change
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static')

# URL that handles the media served from MEDIA_ROOT.
@@ -145,6 +145,7 @@ INSTALLED_APPS = (
'openidconsumer',
'openidserver',
'revcanonical',
+ 'tagging_autocomplete',
)

APPEND_SLASH = False
diff -r 913440399088 urls.py
--- a/urls.py Mon Nov 16 12:47:42 2009 +0200
+++ b/urls.py Mon Nov 23 21:33:54 2009 +0100
@@ -43,6 +43,7 @@ urlpatterns += patterns(
url(r'', include('revcanonical.urls')),
url(r'^admin/postimage/', include('postimage.urls')),
url(r'^admin/(.*)', admin.site.root, name='admin'),
+ url(r'^tagging_autocomplete/', include
('tagging_autocomplete.urls')),
url(r'^accounts/', include('accounts.urls')),
url(r'^openid/', include('openidconsumer.urls')),
url(r'^openidserver/', include('openidserver.urls')),

Alexander Solovyov

unread,
Nov 25, 2009, 3:19:13 PM11/25/09
to byteflow...@googlegroups.com
On Mon, Nov 23, 2009 at 10:43 PM, RobertGawron <mojwp...@gmail.com> wrote:
>
> Hi all,
> below is path, I've been created.

So I've pushed changes to repository and autocompleter works. But it
seems that it needs
some styling... I have no time to look at it right now, but will try
to do that in next few days.
Or if someone will come up with patches, I'll be happy. ;-)

--
Alexander

RobertGawron

unread,
Dec 8, 2009, 3:39:23 PM12/8/09
to byteflow-hackers
Hi all,
there's no need to add new styles, just copy manually
jquery.autocomplete.css (from jquery folder) to static/js/ folder.

On Nov 25, 9:19 pm, Alexander Solovyov <pira...@piranha.org.ua> wrote:

Alexander Solovyov

unread,
Dec 9, 2009, 7:50:22 AM12/9/09
to byteflow...@googlegroups.com
On 2009-12-08, RobertGawron wrote:

> Hi all,
> there's no need to add new styles, just copy manually
> jquery.autocomplete.css (from jquery folder) to static/js/ folder.

Yeah, thanks, I've already done that.

--
Alexander

Reply all
Reply to author
Forward
0 new messages