[Zope] dtml-calendar in VirtualHost

Kevin Carlson khcarlso@bellsouth.net
Tue, 10 Sep 2002 09:45:59 -0400


I am having a problem using the dtml-calendar tag inside of an Apache
Virtual Host.  The links created by the NextMonth and PreviousMonth graphics
use the actual machine name of the host instead of the virtual host name
that is used by the links created for the individual days.

The links created by the dtml-calendar tag for the next/previous months
starts like this:

http://dev.hostname.net/ -- this is incorrect, but is the DNS name of the
machine.

The links for each day in the calendar tag start with :

http://swib.hostname.net -- this is correct, and is the name of the
Virtualhost is Apache's httpd.conf file.


I have looked at the source for CalendarTag (v 1.0.7) and noticed that all
urls are being created by the same function, linkDate.  Here is the source:

    def linkDate_(self, date, mode = 'day'):
        if mode not in self.modes:
            mode = 'day'

        v = self.vals_
        s = '%(url_)s&date-%(name_)s=' % v
        return s + datestr(date) + ('&mode-%(name_)s=' % v) + mode


Any ideas?