Demo entry 6323274


Submitted by anonymous on Nov 14, 2016 at 07:42
Language: Python 3. Code size: 497 Bytes.

from django.db import models

class Person(models.Model):
    age = models.IntegerFieldField()
    first_name = models.CharField(max_length=25)
    last_name = models.CharField(max_length=25)
    def get_full_name(self):
        full_name = "%s %s"%(full_name, last_name)
        return full_name
ethan = Person(age=10, first_name='Ethan', last_name='Rogers')
francis = Person(age=41, first_name='Francis', last_name='Smith')

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).