django-recurrence icon indicating copy to clipboard operation
django-recurrence copied to clipboard

{{ form.media }} seems to be empty

Open bananu7 opened this issue 7 years ago • 7 comments

I'm using Django 2.1 and Python 3.6.6. I've installed the lib using pip and added it to the INSTALLED_APPS. I've also added the field to my model.

Now it fails as if I didn't add {{ form.media }} to my template. Statics are served correctly, and if I add <script src="{% static 'recurrence/js/recurrence.js' %}"></script> manually, it seems to progress (fails on pggettext).

What could be the reason for form.media not working, though? Is it just the problem with 2.1?

bananu7 avatar Sep 20 '18 12:09 bananu7

Could you take a look at these docs, and see if that solves your problem?

dominicrodger avatar Sep 23 '18 07:09 dominicrodger

Sorry for the late reply. I think I followed every single instruction there. Again, after adding those links manually, I got the form (and the entire library) to work.

I didn't do collectstatic, but I don't think this impacts the template rendering?

bananu7 avatar Sep 27 '18 09:09 bananu7

collectstatic won't affect template rendering. At a bit of a loss here - this works for me. Could you confirm if switching to Django 2.0 fixes this for you? Maybe we've missed something.

dominicrodger avatar Sep 27 '18 09:09 dominicrodger

Sure, I'll try running against 2.0 and report here.

bananu7 avatar Sep 27 '18 09:09 bananu7

The issue is with a missing view. https://github.com/django-recurrence/django-recurrence/issues/128#issuecomment-428689277

sww314 avatar Oct 11 '18 04:10 sww314

having a similar issue where I can see the add date and add rules buttons but clicking them doesnt do anything in my model form. In the django admin it works perfectly fine.

wolfhound115 avatar Jun 16 '20 23:06 wolfhound115

I had the same probleme. I followed every single instruction found in the instruction.but i didn't work Untill I put this in my template

{% csrf_token %}

{{form.media}}

{{form.as_p}}

I think {{form.media}} should be followed by {{form.as_p}}.

OdapX avatar Aug 29 '21 13:08 OdapX