added create_video/profile to api.py for populating database

@ormsbee @wedaly 
Please move it to models.py -- django expects it there.

On Wednesday, August 20, 2014, Christopher Lee <notifications@github.com>
wrote:

> In edxval/serializers.py:
>
> > +Serialization is usually sent through the VideoSerializer which uses the
> > +EncodedVideoSerializer which uses the profile_name as it's profile field.
> > +
> > +When calling .errors for objects, there is a order in which the errors are
> > +returned. This may cause a partial return of errors
> > +Example:
> > +class Profile(models.Model)
> > +    profile_name = models.CharField(
> > +        max_length=50,
> > +        unique=True,
> > +        validators=[
> > +            RegexValidator(
> > +                regex=r'^[a-zA-Z0-9\-]*$',
> > +                message='profile_name has invalid characters',
> > +                code='invalid profile_name'
> > +            ),
>
> The model is an example used to show the types of fields we have. I put
> this in serializer.py because the errors are returned when .errors are
> called on a serializer object. I thought this behaviour was more related to
> the way serializers worked.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/edx/edx-val/pull/13/files#r16488967>.
>