bartekgorny / django-schedule Goto Github PK
View Code? Open in Web Editor NEWThis project forked from thauber/django-schedule
NOT MAINTAINED - see other forks
Home Page: http://wiki.github.com/bartekgorny/django-schedule
This project forked from thauber/django-schedule
NOT MAINTAINED - see other forks
Home Page: http://wiki.github.com/bartekgorny/django-schedule
Received this error on the day view until I added the following line:
{% extends "schedule/base.html" %}
to:
project_sample/schedule/templates/schedule/_dialogs.html
This is related to issue 29 in thauber's fork, but I thought I'd post here as that one seems dead, and the code in question is most likely shared between forks.
This app seems to be duplicating queries. I thought it was my usage that was the problem, but even the project_sample code generates 66 queries to display a weekly view of a calendar -- on a week with no events. Using debug_toolbar, I can see queries like
SELECT "schedule_occurrence"."id", "schedule_occurrence"."event_id", "schedule_occurrence"."title", "schedule_occurrence"."description", "schedule_occurrence"."start", "schedule_occurrence"."end", "schedule_occurrence"."cancelled", "schedule_occurrence"."original_start", "schedule_occurrence"."original_end" FROM "schedule_occurrence" WHERE "schedule_occurrence"."event_id" = 1
being run for event_id 1 to 7, and being run 8 times each.
In answer to the questions for the thauber bug: I'm not using caching, and I'm not using select_related. I'm just running the example project given. The same thing happens for my own project, and I'm just using the template tags as provided.
Is this the expected behaviour?
I encountered this problem after an update. It looks like the code at:
https://github.com/bartekgorny/django-schedule/blob/master/schedule/views.py#L206
was changed from:
elif not [x for x in (year, month, day, hour, minute, second) if x is None]:
to:
elif(all((year, month, day, hour, minute, second))):
Though it looks nicer, it fails if any of the parameters are zero, such as minutes, and serves up a 404.
The occurrences_after() methods relay on Event.end_recurring_period field to be present/not null/None and error. But Event can have it's duration ended by some other parameter.
Fix is quite simple: on line 162 of schedule/models/events.py add a check for end_recurring_period.
Pardon me if I'm missing something, but I've been trying to get an events occurrences, preferably for a given day.
When I use event.get_occurrence(date), it always returns nothing. But when I use event.get_occurrences(before_date, after_date), suddenly the occurrences on the previously attempted date show up.
Why won't this work with just one datetime object?
Hi!
I would like to package this for Debian, thus I wonder if there is any
central repo that I can use as upstream source?
Checking the huge network graph and merging what I like is not a
viable solution for package maintanence.
Thanks,
Per
If you change start/end of an event which has some persisted occurrences, the original occurrences reappear thus causing duplication (reported by gautamadude).
Testing the project_sample site, and when trying to use feeds, Django raises Type error
Django Version: 1.3
Exception Type: TypeError
Exception Value:
init() takes exactly 3 arguments (1 given)
Traceback:
File "Some-path/env/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response
response = callback(request, _callback_args, *_callback_kwargs)
instance = f()
Any time I create an event that begins at midnight it shows up as an occurrence for the previous day.
The error appears to be in the _get_day_range and next_day methods of the Day class in periods.py
def _get_day_range(self, date):
if isinstance(date, datetime.datetime):
date = date.date()
start = datetime.datetime.combine(date, datetime.time.min)
#end = start + datetime.timedelta(days=1)
end = datetime.datetime.combine(date, datetime.time.max)
return start, end
def next_day(self):
return Day(self.events, self.start + datetime.timedelta(days=1))
When running the devserver, it throws this exception after a lot of deprecatedwarnings...
here's the traceback
Environment:
Request Method: GET
Request URL: http://localhost:8000/
Django Version: 1.3
Python Version: 2.6.6
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.admindocs',
'schedule']
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware')
Traceback:
File "/home/lacrymology/.virtualenvs/tomasneme/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response
request.path_info)
for pattern in self.url_patterns:
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
self._urlconf_module = import_module(self.urlconf_name)
**import**(name)
(r'^admin/(.*)', admin.site.root),
Exception Type: AttributeError at /
Exception Value: 'AdminSite' object has no attribute 'root'
How to set the GET_EVENTS_FUNC setting in settings to allow for the view of events from multiple calendars. I wish to have a drop down list with calendars and checkboxes to select which calendars events to view in single calendar view
I m not sure if i had it configured properly or not but
This commit: 1470059 breaks TestOccurrencePool.
https://github.com/bartekgorny/django-schedule/blob/master/schedule/forms.py#L47
There is a line in clean_params that looks like:
param = (str(param[0]), [int(p) for p in param[1].split(',')])
This line prevents things like
byweekday:SU,MO,TU,WE,TH,FR,SA
My quick fix (which is somewhat to permissive) was to change the int(p)
to just p
. I'm guessing the better fix would be to look for places where the RRULE_WEEKDAYS are valid and check the names there?
Would it make more sense to try to pass this down to the dateutil code, and see if it likes it instead of doing this kind of work outside the dateutil code? If we just tried to construct an rrule object, could we pick up on the exception from dateutil to know if we had a valid format?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.