Re: django_bootstrap_calendar and admin backend

2016-11-01 Thread janne . j . hyvonen
I am  trying to make reservation calendar for rent cabin web pages, but I 
am having
problems with adding events to the calendar using admin. I have added 
admin.py file
to myapp/django_bootstrap_calendar/admin.py with content:

from django.contrib import admin
from django_bootstrap_calendar.models import CalendarEvent

class CalendarEventAdmin(admin.ModelAdmin):
list_display = ["title", "url", "css_class", "start", "end"]
list_filler = ["title"]

admin.site.register(CalendarEvent, CalendarEventAdmin)

I have also made migrations.

Still the model is missing from the admin panel and I am out of tricks what 
to try next. 
Does anybody have any hints what I could try next? 



torstai 21. heinäkuuta 2016 2.06.26 UTC+3 ludovic coues kirjoitti:
>
> it shouldn't be too hard to port it to python3. The module is mainly 
> javascript, not python. 
>
> Once the app can return json, it should work fine. 
>
>
>
> 2016-07-20 20:40 GMT+02:00 Cronos Cto >: 
> > That explains alot of the issues I am having. Since it is a 
> compatibility 
> > issue, I am guessing there is no way to make it work right? 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Django users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to django-users...@googlegroups.com . 
> > To post to this group, send email to django...@googlegroups.com 
> . 
> > Visit this group at https://groups.google.com/group/django-users. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/django-users/9fcc888d-d258-4fc9-8fe9-52b1673e761c%40googlegroups.com.
>  
>
> > 
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>
> -- 
>
> Cordialement, Coues Ludovic 
> +336 148 743 42 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ec3e275b-0066-4c03-be45-84ea077f74fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django_bootstrap_calendar and admin backend

2016-07-20 Thread ludovic coues
it shouldn't be too hard to port it to python3. The module is mainly
javascript, not python.

Once the app can return json, it should work fine.



2016-07-20 20:40 GMT+02:00 Cronos Cto :
> That explains alot of the issues I am having. Since it is a compatibility
> issue, I am guessing there is no way to make it work right?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/9fcc888d-d258-4fc9-8fe9-52b1673e761c%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 

Cordialement, Coues Ludovic
+336 148 743 42

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEuG%2BTZqjV04wj%3DV25TyBLLuZCNnMXnrUU67PRSBeF%3DFrbeGUQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: django_bootstrap_calendar and admin backend

2016-07-20 Thread Cronos Cto
That explains alot of the issues I am having. Since it is a compatibility 
issue, I am guessing there is no way to make it work right?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9fcc888d-d258-4fc9-8fe9-52b1673e761c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django_bootstrap_calendar and admin backend

2016-07-20 Thread ludovic coues
You might have noticed, the calendar view is a generic template view.
It only display an html page.
All the work is done with js. If everything work fine, it fetch the
list of even for the period with ajax and add the event in the
calendar.

/calendar/json should return the list of event. As you can see, you
get an error. The problem is that the library is python2 only. The
type unicode have been removed in python3 as every str are now
unicode.

I managed to make the library work only with python2.

2016-07-19 21:23 GMT+02:00 Cronos Cto :
> This happened. Sorry for taking so long, had exams to take care of.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/32bb5e5c-6a72-446b-a8b5-25c3f93badf7%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 

Cordialement, Coues Ludovic
+336 148 743 42

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEuG%2BTawTc5kLA%2Bx1DmgXUTeM%2BzKZ%2BTBe2O0Pz%3D6874%3D582EkA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: django_bootstrap_calendar and admin backend

2016-07-19 Thread Cronos Cto
This happened. Sorry for taking so long, had exams to take care of.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/32bb5e5c-6a72-446b-a8b5-25c3f93badf7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django_bootstrap_calendar and admin backend

2016-07-14 Thread ludovic coues
I haven't managed to reproduce your error. In fact, I managed to make
it working.

What output do you get when you hit
http://localhost:8000/calendar/json/?from=146532400&to=149000240
? Adjust the hostname and port to your dev server.

2016-07-14 11:54 GMT+02:00 Cronos Cto :
>
>
>
> Yes https://github.com/sandlbn/django-bootstrap-calendar/ this is the one I
> am using.
> This are the parts I changed.
>
>
>
>
> \mysite\mysite\settings.py
>
> INSTALLED_APPS = [
> 'django_bootstrap_calendar',
> 'blog',
> 'staff',
> 'django.contrib.admin',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
> ]
> -
> \mysite\mysite\urls.py
>
> from django.conf.urls import url, include
> from django.contrib import admin
>
> urlpatterns = [
> url(r'^admin/', admin.site.urls),
> url(r'^', include('staff.urls')),
> url(r'^blog/', include('blog.urls')),
> url(r'^calendar/',include('django_bootstrap_calendar.urls')),
> ]
> -
>
> \mysite\django_bootstrap_calendar\admin.py
>
> from django.contrib import admin
> from django_bootstrap_calendar.models import CalendarEvent
>
> class CalendarEventAdmin(admin.ModelAdmin):
> list_display = ["title", "url", "css_class", "start", "end"]
> list_filler = ["title"]
>
> admin.site.register(CalendarEvent,CalendarEventAdmin)
>
> -
> \mysite\staff\templates\staff\header.html
>
> 
> 
>
> 
> 
>
> 
> Centro de Dia de Messines
> 
> {% load staticfiles %}
>  type = "text/css"/>
> 
> 
> html,
> body {
>  height:100%
> }
> 
> 
>
> 
> 
> 
>  
>  
>  
>  style='max-height:100px;' alt="face">
>  
>  
>  
>  
>  
>  Uma Familia maior
>  
>  
> 
>
> 
>  
>  
>
>  
>   
> 
> 
>  
> Ínicio
> Calendário
> Blog
> Contatos
>  
>  
>   
>  
>
> 
> 
>   {% block content %}
>   {% endblock %}
> 
>  
> 
> 
> 
> 
> Contact |  target="blank">LinkedIn | Twitter |  href="#" target="blank">Google+
> 
> 
> 
>
> 
>
>
>
>
> This about all the stuff I changed, I realize that some code that I still
> need to change is not changed like Load templatetags, In your template file,
> base.html file css section and base.html file javascript section. The
> problem is I do not understand very well where to do this part of the
> instalation.
>
> If needed I can send you the files so you can replicate easier.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/9b930883-674c-4b53-9344-d225a4869a22%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 

Cordialement, Coues Ludovic
+336 148 743 42

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEuG%2BTZQz--Rq-FiqRekOxXiMBTbLGMjhy%3DzAahKcq60775v0A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: django_bootstrap_calendar and admin backend

2016-07-14 Thread Cronos Cto



Yes https://github.com/sandlbn/django-bootstrap-calendar/ 

 this 
is the one I am using.
This are the parts I changed.




\mysite\mysite\settings.py

INSTALLED_APPS = [
'django_bootstrap_calendar',
'blog',
'staff',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
-
\mysite\mysite\urls.py

from django.conf.urls import url, include
from django.contrib import admin

urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^', include('staff.urls')),
url(r'^blog/', include('blog.urls')),
url(r'^calendar/',include('django_bootstrap_calendar.urls')),
]
-

\mysite\django_bootstrap_calendar\admin.py

from django.contrib import admin
from django_bootstrap_calendar.models import CalendarEvent

class CalendarEventAdmin(admin.ModelAdmin):
list_display = ["title", "url", "css_class", "start", "end"]
list_filler = ["title"]

admin.site.register(CalendarEvent,CalendarEventAdmin)

-
\mysite\staff\templates\staff\header.html

**
**

**
**

**
* Centro de Dia de Messines*
* *
* {% load staticfiles %}*
* *
* *
* *
* html,*
* body {*
*  height:100%*
* }*
* *
**

**
* *
* *
*  *
*  *
*  *
* *
*  *
*  *
*  *
*  *
*  *
*  Uma Familia maior*
*  *
*  *
* *

* *
*  *
*  *

*  *
*   *
* *
* *
*  *
* Ínicio*
* Calendário*
* Blog*
* Contatos*
*  *
*  *
*   *
*  *
 
* *
* *
*   {% block content %}*
*   {% endblock %} *
* *
*  *
*  *
* *
* *
* *
* Contact | LinkedIn | Twitter | Google+*
* *
*  *
**

**




This about all the stuff I changed, I realize that some code that I still 
need to change is not changed like Load templatetags, In your template 
file, base.html file css section and base.html file javascript section. The 
problem is I do not understand very well where to do this part of the 
instalation.

If needed I can send you the files so you can replicate easier.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9b930883-674c-4b53-9344-d225a4869a22%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django_bootstrap_calendar and admin backend

2016-07-14 Thread ludovic coues
If you are using
https://github.com/sandlbn/django-bootstrap-calendar/, I assume you
have changed some things. For exemple, the module don't come with an
admin.py file.
All your change would be nice so we can replicate your problem :)

2016-07-13 22:33 GMT+02:00 Cronos Cto :
> Hello Ludovic, what part of the code would you like me to post ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/6dfb8f1c-70be-433f-b2fc-e79a3c1507f1%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 

Cordialement, Coues Ludovic
+336 148 743 42

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEuG%2BTY5WJyG2kYrvZDdCP8AbEv9b67QrSJGmYNLG1TnWg2Q%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: django_bootstrap_calendar and admin backend

2016-07-13 Thread Cronos Cto
Hello Ludovic, what part of the code would you like me to post ? 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6dfb8f1c-70be-433f-b2fc-e79a3c1507f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django_bootstrap_calendar and admin backend

2016-07-13 Thread ludovic coues
Code would be more useful to understand what is happening.

Or you can use the django test client [1] to see what the view is
returning as context. The list of event might be empty.

[1] 
https://docs.djangoproject.com/en/1.9/intro/tutorial05/#the-django-test-client

2016-07-12 16:49 GMT+02:00 Cronos Cto :
> Ok so I was able to fix one of my problems, consisted in framework not
> recognizing the database, had to delete it and migrate everything again.
> Right now I can add events in my backend, but when I check my website the
> day where I have set the  event lights up, but does not show title, hour or
> anything...
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/09215dec-54a1-48ea-8b47-bb71a40ce453%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 

Cordialement, Coues Ludovic
+336 148 743 42

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEuG%2BTabas14xsff%2BkKoWrrXi5G92vL7UkkKPw8-VxyTBSY6Cg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: django_bootstrap_calendar and admin backend

2016-07-12 Thread Cronos Cto
Ok so I was able to fix one of my problems, consisted in framework not 
recognizing the database, had to delete it and migrate everything again. 
Right now I can add events in my backend, but when I check my website the 
day where I have set the  event lights up, but does not show title, hour or 
anything... 


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/09215dec-54a1-48ea-8b47-bb71a40ce453%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django_bootstrap_calendar and admin backend

2016-07-12 Thread Cronos Cto
Ok so I was able to fix one of my problems, consisted in framework not 
recognizing the database, had to delete it and migrate everything again. 
Right now I can add events in my backend, but when I check my website the 
day where I have set the  event lights up, but does not show title, hour or 
anything... 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7ced5f5a-ab52-4028-a234-5bed6635426c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.