how to handle an event on Django event Calendar - django

Is there a way to have a django Clandar Event, i have a Event model, and i want to display the event information on the calendar in order to know if the organiser is free or busy on the date event.
Many Thanks.
I didn't find the Django Calendar.
Where can i find some good example please ?
Many thanks

Search the site and you might just find what you're looking for.

Related

Set a time for when object to be posted in Django admin?

I want to implement a feature where you can select a date for when a post can go public in the Django admin. Is there a way we can set this in Django? What's the best practice to do this?
You're thinking along the wrong lines. Instead of having a status flag which is flipped at a certain time, which would involve cron jobs, you only need a single publish_at field - then your front end can show all the posts with publish_at before now.

Redmine - how to add an activity in the DDL

Wow.I cant believe how raw redmine setup is.
Anyway..I wanted to update a ticket in a project and there is a activity drop down list. I cant save unless I specify an activity. There is none. How do I populate a list of activities from the UI?
Thanks
Time tracking activities: The content of the drop-down are in the global setting, relevant redmine guide link.
By the way, if you don't enter anything for spent time and the related comment in the Log time section, you don't have to select an activity.

How to display events from all calendars in django schedule?

I'm new to Django and I'm trying to use django-schedule to my first project. I couldn't figure out how to change the following code to display all events in all calendars:
get_events(request, calendar):
return calendar.event_set.all()
The code above simply displays all events of one particular calendar.
Thanks in advance!
Use:
from schedule.models import Event
Event.objects.all()

post event to facebook with place page id

via the graph api, I create events for facebook pages I have the create_event and manage_pages privileges for.
I post to https://graph.facebook.com/pageId/events with the usual name, location, start_time, street, city parameters. Works perfectly.
However, I haven't found a way to submit a certain place_id for the event (e.g. FB-ID of the venue). This is possible using the web client. When creating an event, you can select a place/venue, the resulting event page shows that place on the map and links to the place page. Events created via the api only show the location name as text.
I tried place_page_id and several others as parameters, but nothing worked.
Has anybody done that successfully?
Thanks
Yes, you can. A poorly documented property of Event is location_id. Works fine.
The way I handle it is to search for type=place and if I find the place in the vast Facebook data store I use the id of that place in the location_id field. If I don't find the right place I use the information I have for street and city. (If you have location_id you really don't need street and city).
No with the current API it is not possible. Here's the only parameters for creating an event available. They are the same for user events as well as page events.
name (string)
start_time (timestamp)
end_time (timestamp)
description (string)
location (string)
privacy_type (string)

How can I track a user events in Django?

I'm building a small social site, and I want to implement an activity stream in a users profile to display event's like commenting, joining a group, posting something, and so on. Basically, I'm trying to make something similar to a reddit profile that shows a range of user activity.
I'm not sure how I'd do this in Django though. I thought of maybe making an "Activity" model that's OneToOne with their account, and update it through MiddleWare.
Anyone here have a suggestion? Away I could actually implement this in a nice way?
You pretty much need to use an explicit Activity model, then create instances of those records in the view functions that perform the action.
I think you'll find that any other more automatic way of tracking activity would be too inflexible: it would record events at the wrong level of detail, and prevent you from describing events in a way that the user wants to see them.
In my opinion, you should do exactly what you're saying, that is create the model Activity, which has a foreignKey to User which you will populate triggering the things you'll find 'interesting'.
This practice, even if redundant, will speed up your page generation, and you can add a custom field which will hold the text you want to display, and also you can keep track of what generate the Activity.