Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7185787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:29:32+00:00 2026-05-28T18:29:32+00:00

I am creating an online tutor concept based site in django. I am stuck

  • 0

I am creating an online tutor concept based site in django. I am stuck at maintaining the teacher availability timings. e.g. mon-fri 10am-2pm (dont know if it is good approach to keep it like this or you have good idea??) I don’t understand what should be the table structure. Right now what i am thinking is that this will be an array of an array to keep the availability for each time slot in the week. 7 days of the week should be there. e.g. list[7],(list[24], Boolean). Is it good approach?? Using this data structure would not allow me in future to perform filtering based on availability timings. Please suggest me a good method to implement this. Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:29:33+00:00Added an answer on May 28, 2026 at 6:29 pm

    I would suggest having a model such as:

    class Availability(models.Model):
        WEEKDAY_CHOICES = (
            (0, 'Monday'),
            (1, 'Tuesday'),
            (2, 'Wednesday'),
            (3, 'Thursday'),
            (4, 'Friday'),
            (5, 'Saturday'),
            (6, 'Sunday'),
        )
    
        weekday = models.PositiveSmallIntegerField(choices=WEEKDAY_CHOICES)
        start_time = models.TimeField()
        end_time = moels.TimeField()
    
    class Tutor(models.Model):
        available_times = models.ManyToManyField(Availability)
    

    Then, from there you can query for available tutors right now via:

    Tutor.objects.filter(
        available_times__weekday=datetime.weekday(),
        available_times__start_time__lte=time.time(),
        available_times__end_time__gt=time.time()
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating an online based system that has public user profiles for all users..
Hi I'm creating online shop. In this shope people online must be buy files
While creating an online shop application using play-1.2.4 ,I ran into some problems with
I'm creating an online game in PHP where users can create playable characters. Each
I am creating an online blog website and for each blog post, I'd like
Im wondering how to go about creating an online IRB that runs in the
I just finished creating a large online flex app with 43 different screens. I
I'm having trouble finding information online for creating a object in javascript and pointing
I am creating a GUI frontend for the Eve Online API in Python. I
I recently tried using the Cloud9 online IDE . It starts by creating a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.