In order to get comment-dwim working you need to specify comment-start and comment-end at the least. You can do this in your mode declaration body.
(setq comment-start "#")
(setq comment-end "")
Documentation on the variables:
comment-start:
"String to insert to start a new comment, or nil if no comment syntax.")
comment-end:
"String to insert to end a new comment. Should be an empty string if comments are terminated by end-of-line."
These variables are defined in newcomment.el
the same builtin package that defines comment-dwim and the like.
To read more: M-x find-library enter newcomment enter
Also, if you didn't pick up enough about syntax tables form the tutorial, yours should specify ?\#
for "<" and ?\n
for ">", this tells emacs that # starts a comment, and a newline ends a comment.