Need help with a hostel management system project using django

2016-10-30 Thread YOGITHA A N
I am beginner in django please help me out with my project

-- 
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/35fed150-9a4e-4ba9-a81b-1a5301119f7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


how to create 2 different kind of user profiles using django python

2016-10-30 Thread YOGITHA A N
Hey,

I am new to django . Please let me know how to create 2 various kind of 
user profiles in django. I am doing a hostel management system using django 
where in I have 2 kinds of users one is a student and the other is the 
warden. 

-- 
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/22ce8644-2a9d-430c-a565-39ab94664d88%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Need help with a hostel management system project using django

2016-10-30 Thread YOGITHA A N
I need to create 3 kinds of users with 3 different permissions. One being 
that of the student , mess contractor and hostel warden.
How do I create 3 differnt kinds of login and user profiles.

On Sunday, October 30, 2016 at 7:39:56 PM UTC+5:30, bob gailer wrote:
>
> On Oct 30, 2016 9:53 AM, "YOGITHA A N" > 
> wrote:
> >
> > I am beginner in django please help me out with my project
> To help us help you be more specific. What kind of help do you need?
> >
> > -- 
> > 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...@googlegroups.com .
> > To post to this group, send email to django...@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/35fed150-9a4e-4ba9-a81b-1a5301119f7f%40googlegroups.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>

-- 
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/b3f43cf2-6692-4cdd-8ec3-130b6552893d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to delete a certain model instance in django after a given date

2016-11-05 Thread YOGITHA A N
So  here are my models:

* class Mess(models.Model):*
muser = models.OneToOneField(User)
MESS_NAME = (('GH','girls hostel top mess'),
('IH','girls hostel down mess'),
('MM','Mega mess'),
('FB','First Block mess'),
('SB','Second Block mess'),
('TB','Third Block mess'),
)
mess_name = models.CharField(max_length=25, choices = 
MESS_NAME,primary_key=True)
per_day_cost = models.IntegerField()
def __str__(self):
return self.mess_name

*class MessMenu(models.Model):*
mess_name = models.ForeignKey(Mess)
day = models.DateField()
morning = models.TextField()
afternoon = models.TextField()
snacks = models.TextField()
dinner = models.TextField()
def __str__(self):
return self.mess_name

Once i create an object in MessMenu I want django to delete that object 
after 7 days. Please let me know how to delete a certain object after a 
given period of time.

-- 
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/6dcf1a57-7a89-40e1-b6e7-fbd28e78c27d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django project structure

2016-11-05 Thread YOGITHA A N
You would just have one App loyalty program.
You will extend UserProfile from User and the other models would be 
Restaurant (name,branch location etc would be the attributes).
Your structure would depend on what are the various functionalities you 
would like to add. 

On Monday, October 24, 2016 at 1:15:21 PM UTC+5:30, Deep Shah wrote:
>
> I have a django project which is a loyalty program for restaurants. The 
> different database tables are- Users (and extending it with User Profiles), 
> Restaurant Company (the entire chain), Branches, Offers, Points (points 
> which users get on visiting a particular restaurant) etc.
>
> How do I structure my project? Which of these would be my apps, and which 
> model would come under which app?
>

-- 
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/01c1ed5a-0d29-43c8-9b2f-b13f90c8f392%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django

2016-11-05 Thread YOGITHA A N
In addition to the above links if your are more comfortable watching videos 
then you should definetly subscribe to 
https://youtu.be/qgGIqRFvFFk?list=PL6gx4Cwl9DGBlmzzFcLgDhKTTfNLfX1IK (New 
boston django videos). 
It will really help if you follow django official documentation and 
tutorial along with this.

On Wednesday, November 2, 2016 at 9:39:54 PM UTC+5:30, 
bhaskerg...@gmail.com wrote:
>
> Hello friends,
>  Myself bhasker ,i am new to django ,i want learn django 
> and create one web application,could you please help me anyone . I mean how 
> to start learn django in python and how start development of web 
> application on django Frame work.
>
>  I am eagerly waiting to learn python and django .
>
>
> Thanks,
> bhasker 
>
> 
>

-- 
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/5b3d3ef0-8ff3-46ab-862f-5e16723165ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to delete a certain model instance in django after a given date

2016-11-06 Thread YOGITHA A N
 

menudeleted = MessMenu.objects.filter( day__lt = timezone.now())
for m in menudeleted:
m.delete()
menu = MessMenu.objects.all()

use basic comparison filter 
<https://code.djangoproject.com/wiki/BasicComparisonFilters> to filter the 
dates


On Sunday, November 6, 2016 at 12:01:20 AM UTC+5:30, YOGITHA A N wrote:
>
> So  here are my models:
>
> * class Mess(models.Model):*
> muser = models.OneToOneField(User)
> MESS_NAME = (('GH','girls hostel top mess'),
> ('IH','girls hostel down mess'),
> ('MM','Mega mess'),
> ('FB','First Block mess'),
> ('SB','Second Block mess'),
> ('TB','Third Block mess'),
> )
> mess_name = models.CharField(max_length=25, choices = 
> MESS_NAME,primary_key=True)
> per_day_cost = models.IntegerField()
> def __str__(self):
> return self.mess_name
>
> *class MessMenu(models.Model):*
> mess_name = models.ForeignKey(Mess)
> day = models.DateField()
> morning = models.TextField()
> afternoon = models.TextField()
> snacks = models.TextField()
> dinner = models.TextField()
> def __str__(self):
> return self.mess_name
>
> Once i create an object in MessMenu I want django to delete that object 
> after 7 days. Please let me know how to delete a certain object after a 
> given period of time.
>
>

-- 
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/9b01d53c-1a96-4eab-91e1-dc9d6be51eeb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.