Hi group,
I'm facing a very weird issue that causes a clash when I use swampdragon's
*SelfPublishModel* and django's *models.Model*.
This is the current model that I'm using.
class Activity(SelfPublishModel, models.Model):
content = models.TextField()
dateTime = models.DateTimeField()
activityOwner = models.ForeignKey(User, related_name='activitiesOwned')
privacy = models.CharField()
participants = models.ManyToManyField(User)
event = models.ForeignKey(Event)
The activity model has a many to one relationship with the event model.
This works fine, but when an activity row gets added and points to an
existing event, an error called "
*TypeError: 'NoneType' object is not callable".*
I found out that the error has something to do with this line residing at
/swampdragon/models.py
*self._serializer = self.serializer_class(instance=self)*
I've tried all I could without touching /swampdragon/models.py but to no
avail. Does anyone have a clue to point me somewhere to edit?
On Sunday, 4 January 2015 02:03:14 UTC+8, jonas hagstedt wrote:
>
> Yes I am the author of that article.
>
> Libraries does make life easier, as long as they are the right libraries
> for the job.
>
> If you are unfamiliar with Angular I would actually recommend not using it.
>
> * Angular 2.0 is supposedly not going to be backwards compatible (it
> actually looks like a totally different framework).
> * As you mentioned, you don't need to use Angular with SwampDragon.
> * It's another layer of complexity.
> * The blog post I linked to pretty much covers the basis for doing real
> time notifications, and isn't using Angular, so you could more or less just
> tweak that code and add it to your project.
>
>
> On Friday, January 2, 2015 4:12:10 PM UTC+1, Shazwi Suwandi wrote:
>>
>> Michiel: Ah, that's myopic on my part. Both sides are important.
>>
>> Jonas: I see I see. I keep thinking that libraries will make my life a
>> bit easier but maybe what I currently need now does not require the use of
>> them. And are you the author of
>> the article? (I'm assuming it's the same Jonas) Thank you so much for
>> this link!! I'll go read it up.
>>
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/1af4aabc-da9f-413f-8b95-5821d6f4a52d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.