diff --git a/djangoldp_profile/djangoldp_urls.py b/djangoldp_profile/djangoldp_urls.py index d7c9c6460ccac128381bcc9ac389e294033e6f8f..7c6906db1ecf69db28d8963bc56cbc0a9f0caaca 100644 --- a/djangoldp_profile/djangoldp_urls.py +++ b/djangoldp_profile/djangoldp_urls.py @@ -6,6 +6,6 @@ from .models import Profile urlpatterns = [ url(r'^members/', LDPViewSet.urls(model=Profile, - fields=['@id', 'jabberID', 'user', 'available', 'bio', 'city', 'country', 'phone', + fields=['@id', 'jabberID', 'user', 'available', 'bio', 'city', 'phone', 'website'], permission_classes=())), ] diff --git a/djangoldp_profile/factories.py b/djangoldp_profile/factories.py index 97fc6f940f95d9593b3de2b5f16a3ea4b61feaad..80b7cc9dc1ff44311f4e48232caab3c77740dcea 100644 --- a/djangoldp_profile/factories.py +++ b/djangoldp_profile/factories.py @@ -10,8 +10,7 @@ class ProfileFactory(factory.django.DjangoModelFactory): user = factory.SubFactory(UserFactory) available = factory.Faker('null_boolean') - bio = factory.Faker('text', max_nb_chars=250) + bio = factory.Faker('text', max_nb_chars=145) city = factory.Faker('city') - country = factory.Faker('country') phone = factory.Faker('phone_number') website = factory.Faker('url') diff --git a/djangoldp_profile/migrations/0004_auto_20190524_1349.py b/djangoldp_profile/migrations/0004_auto_20190524_1349.py new file mode 100644 index 0000000000000000000000000000000000000000..4aa7e5769816faec0c3752bee8326b8735d785c4 --- /dev/null +++ b/djangoldp_profile/migrations/0004_auto_20190524_1349.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.20 on 2019-05-24 13:49 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('djangoldp_profile', '0003_move_jabber_picture_20181220_0939'), + ] + + operations = [ + migrations.RemoveField( + model_name='profile', + name='country', + ), + migrations.AlterField( + model_name='profile', + name='bio', + field=models.CharField(blank=True, max_length=150), + ), + migrations.AlterField( + model_name='profile', + name='city', + field=models.CharField(blank=True, max_length=255), + ), + migrations.AlterField( + model_name='profile', + name='phone', + field=models.CharField(blank=True, max_length=255), + ), + ] diff --git a/djangoldp_profile/models.py b/djangoldp_profile/models.py index 57de11c8766790b93a725cb46dd22e9f85c386e3..2ea9ac1a82446b8a84681d94675e5dbedc6b2b76 100644 --- a/djangoldp_profile/models.py +++ b/djangoldp_profile/models.py @@ -8,10 +8,9 @@ from django.core.urlresolvers import reverse_lazy class Profile(models.Model): user = models.OneToOneField(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) available = models.NullBooleanField(blank=True) - bio = models.CharField(max_length=255, blank=True, null=True) - city = models.CharField(max_length=255, blank=True, null=True) - country = models.CharField(max_length=255, blank=True, null=True) - phone = models.CharField(max_length=255, blank=True, null=True) + bio = models.CharField(max_length=150, blank=True) + city = models.CharField(max_length=255, blank=True) + phone = models.CharField(max_length=255, blank=True) website = models.URLField(blank=True) def jabberID(self):