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 8273339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:27:00+00:00 2026-06-08T07:27:00+00:00

I would like to desing web application in django to make reservations for gym

  • 0

I would like to desing web application in django to make reservations for gym classes. I have some problems desiging it, because I don’t know how usually such problems are solved.

So one gym class takes place once a week, f.e. monday at 19.00 and only 20 people can attend it. Reservation should be possible one week before, so if class takes place 28 May at 19.00, reservation should be possible since 21 May 00:00.

And now some questions:
1. One class should be one object in a model (one record), right? But should it be one kind of class (so class that takes place every monday is one record) or class that occurs at specific date (so one class in one week is one record, after 3 weeks, we have 3 records of this class)?
2. How to create these records? Should I make automatic copy of today’s classes, changing date to +1 week?
How to solve these problems?

  • 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-06-08T07:27:02+00:00Added an answer on June 8, 2026 at 7:27 am

    Well, you can create, f.e. a model that will represent a current timetable (schedule) for a gym class and another model that will represent a particular record for some day.

    For example smth like that:

    class ClassType(models.Model):
        name = models.CharField(u"Class name", max_length = 120)
        schedule_day = models.IntegerField(u"Day of week")
        schedule_time = models.TimeField(u"Time")
        max_attend = models.IntegerField(u"Maximum attendants")
    
    class ClassRecord(models.Model):
        type = models.ForeignKey(ClassType, verbose_name = "Class type")
        date = models.DateTime("Scheduled date")
        attendants = models.ManyToManyField(User) #don't forget to import it
    

    So, you can specify a schedule and class types if they will change in the future. You can create a command (see manage.py commands in django documentation) that will create a ClassRecord for the next week and set this command on cron (or celery for example), so it will run once a week and create new records when needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am designing a database for a web application and would like to have
I have this idea for a small-medium web application that I would like to
I would like to make a web application with a responsive design to post
We need to design a secure web application. I would like to propose a
How would you design a hosted web application? I'm looking at applications like Basecamp,
I have never designed a database/data-model/schema from scratch, especially for a web-application. In some
I would like to disregard web applications here, because to scale them horizontally, ie
DTO I'm building a Web application I would like to scale to many users.
Even though wordpress uses PHP, I would like to build a web application within
I am using crystal report in my asp web application. I would like to

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.