On Friday 09 June 2017 23:26:57 Arshdeep Singh wrote: > down votefavorite > <https://stackoverflow.com/questions/44457374/how-should-i-do-this-in-> > django#> > > I was thinking about making a Hostel Allocation Web application. It > has models, Student, Room, Hostel. What I want is to create a > function that allocates students after each year. For that, I thought > in the student view each student after completing his four years of > stay can click on vacate hostel after completing his degree, and for > others, I want to create something that allocates them, Now there are > certain constraints, there are Undergraduate students with degree > period 4 years and each year has access to different types of rooms, > First-year triple sharing, second and third-year double sharing and > fourth-year single rooms. Also, a Hostel has Ph.D. students as well > but their stay period is not defined. > > So, what I was thinking is that First years should be allotted by > uploading a CSV file and I have made that part, So the next part is > to allot subsequent years based on their preferences, So how could I > make something like this in Django that allows them to make it based > on their preference, I was thinking each student would be given a > unique token, and while filling for rooms one student can do for a > room, and that token needs to be entered. Is this the right way or > should I do something else. I am a newbie please suggest me a good > way to do this.
All this is outside Django's scope. This is business logic you need to work out. Many of us could do it for you and be happy to make you an offer conforming to market prices. Right now, your models are missing information (questionable gender choices aside). Work out how the rooms need to be filled and the data model will come to you. The most obvious being, that Students don't have a "year of enrollment" or "student type" to indicate the rooms they can apply for. In your specification above, the definition of preferences is incomplete. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2561955.teXNLxcPxu%40devstation. For more options, visit https://groups.google.com/d/optout.