Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I'm trying to use it but I can not do it right #2

Open
monetti opened this issue Mar 30, 2011 · 0 comments
Open

I'm trying to use it but I can not do it right #2

monetti opened this issue Mar 30, 2011 · 0 comments

Comments

@monetti
Copy link

monetti commented Mar 30, 2011

Hi. My Name is Martin. I try to use the django-gencal package but not work for me.
The model for that like show in calender is as follows:

class Excurtion(models.Model):
name = models.CharField(("Nombre"),max_length="200")
description = models.TextField(
("Descripcion"))
summary = models.TextField(("Resumen"))
region = models.ForeignKey('Region')
date = models.DateField(
("Proxima Fecha"))
place = models.CharField(('Lugar'),max_length="200")
time = models.CharField(
('Horario'),max_length="200")
duration = models.CharField(("Duracion"),max_length="10")
publish_last_exc = models.BooleanField(
("Publicar en Ultimas Excursiones?"), default=False,blank=True)
intro_last_exc = models.TextField(_('Descripcion de la experiencia'),blank=True)

class Meta:
    ordering = ('date',)
    verbose_name = _('Excursion')
    verbose_name_plural = _('Listado de Excursiones')
    get_latest_by = 'date'

def __unicode__(self):
    return self.name

def get_absolute_url(self):
    return u'/excurtion_detail/%s/excurtion' % self.id

the view is as follows,

def calendar(request):
queryset = Excurtion.objects.all()

return list_detail.object_list(
    request,
    queryset,
    template_name='calendar.html',
)

and the template is as follows,

{% extends 'index.html' %}
{% load gencal %}
{% block title %} Calendario {% endblock %}
{% block body_class %}
main-content
{% endblock %}
{% block content %}

Calendario de Excursiones

    {% gencal object_list 2011 03%}

{% endblock %}

this render a calendar but not show the excurtions availables in the correspondig day.

If you could help me thank you very much

Cheers,

Martin Onetti

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant