Transitioning to IOS Development

I believe it is important to listen to yourself and sense if something rubs you wrong. It’s not that I hate backend, I just don’t see myself growing. My preference is to live and work independently, and at this point, with my education and personal predisposition I am inclined to try Mobile development as a career path. I deem my experience in Django and Web development in general (including UI/UX) will help me thrive further.

By no means I am quitting this blog. I am not quitting Django either. If anything, I want to leave myself an opportunity to work as a Full-stack developer in both Web and Mobile development.

Why IOS and now Android? At least for now, I have 0 Android devices and a lot of IOS ones 🙂

I will do blog posts about the transition, and not just from back-end to mobile front-end, but from Python to Swift.

I am adding two more sections – Swift and Career.

How to access Model’s pk/id when you create an instance in Django

If you need to modify instance fields depending on the instance’s pk or id, hop on.

When you create an instance, before it is saved, you can’t have pk or id as it is not yet created.

    def save(self, *args, **kwargs):
        # self.pk == None
        # self.id == None
        super().save(*args, **kwargs)
        # self.pk != None
        # self.id != None        

If you have a property that somehow depends on the value of self.pk or self.id and you want to have it saved on creating, you have two options.

Read More »