Re: Can anyone please explain the below code???

2017-10-06 Thread Bruno Ribeiro da Silva
Wrong list, this is for development related only.

I suggest you read django's documentation
https://docs.djangoproject.com/en/1.11/

2017-10-06 8:05 GMT-03:00 :

> from django.db import models
>
> class Question(models.Model):
> question_text = models.CharField(max_length=200)
> pub_date = models.DateTimeField('date published')
>
> class Choice(models.Model):
> question = models.ForeignKey(Question, on_delete=models.CASCADE)
> choice_text = models.CharField(max_length=200)
> votes = models.IntegerField(default=0)
>
> My question
> 1.What is models.Models?
> 2.What are the attributes of models?
> 3.What are the attributes of Models?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-developers/ac101a4b-4fb9-4d7c-abee-
> effbd61062d3%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Bruno Ribeiro da Silva
Python Dev and Homebrewer!

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAE-2%3DJy%2B-6oJY8PP58EqQODKW01mU5krtdnrj3Eur6UfcvYRZA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Can anyone please explain the below code???

2017-10-06 Thread utpalbrahma1995


from django.db import models

class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')

class Choice(models.Model):
question = models.ForeignKey(Question, on_delete=models.CASCADE)
choice_text = models.CharField(max_length=200)
votes = models.IntegerField(default=0)

My question
1.What is models.Models?
2.What are the attributes of models?
3.What are the attributes of Models?

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/ac101a4b-4fb9-4d7c-abee-effbd61062d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.