Reputation: 23
for the first part of my fun/learning project at work I need to figure out a simple way to let a user input their name, and choose a date and start/end time they would like to hold a conference.
ive tried to install django-schedule but cant for the life of me get it to work, none of the calanders or anything show up for me. I used the swingtime demo but it doesnt seem to be what I want exactly, and the django website documentation is horrible for new users in my opinion.
Django is a little more complicated then im used to, so if anyone could point me to a package I dont know about or help me out with a few lines of code I would greatly appreciate it.
Upvotes: 1
Views: 1489
Reputation: 34593
from django.db import models
class Conference(models.Model):
first_name = models.CharField(max_length=30)
last_name = models.CharField(max_length=30)
date = models.DateField()
start_time = models.TimeField()
end_time = models.TimeField()
Of course, this assumes that a conference starts and ends on the same day and a few other things. This is an extremely simple example, and without seeing any use cases, there's no way to tell if this is even close to what you need, but will hopefully get you going in the right direction.
Upvotes: 2
Reputation: 28856
I don't know anything about django-schedule
, but you can just input names, dates, start/end times using a simple Django model with some CharField
, DateField
, and TimeField
members (or DateTimeField
s, to support multi-day events). This is very similar to what's done in the Django tutorial.
If you don't like the tutorial, there's also a somewhat-outdated Django Book that might be more to your liking.
Upvotes: 0