16th September Accountability

My status this week is: slow but steady progress.

DONE: Added ‘followers’ logic to app using self relatiional relationships in db. Implemented pagination. Getting more comforatble with flask/web-dev.
BLOCKERS: Training has gone up a notch and I’m pretty tired as a result. Because I am working through a tutorial, I feel like I haven’t written any of my own code in a while.
GOALS: finish next few lessons and get to point of ‘facelift’ so I can make the app look a bit nicer. So far I am still on track to use a lot of whay I have learned on my own website afterwards.

I am currently working on … Flask mega-tutorial

I am struggling with understanding … os config (I just don’t know enough about it)

I am finally understanding … Flask forms, routes, templates

I have work to show at … local only as not my work (tutorial)

1 Like

DONE: Put a simple search with AND requests together
BLOCKERS: The ‘testing’-thing. It makes my brain melt.
GOALS: Write a test suite for my search-view
WANT TO LEARN ABOUT THIS WEEK: Generators!!! Arghhh. Forgot about it :grimacing:

I am currently working on … a real estate listing site with Django 2.2

I am struggling with understanding … Something about views is not really clear. Have to dig deeper.

I am finally understanding … You really just can put every python code you want between the Lego blocks of Django :slight_smile:

*I have work to show at … here is my search-form and my search-list-view:

# forms.py
from django import forms

from .models import Property

class PropertyForm(forms.Form):
    plz = forms.CharField(label="PLZ", required=False, widget=forms.TextInput(attrs={'class': 'form-control'}))
    rooms = forms.CharField(
        label="Anzahl Zimmer",
        required=False,
        widget=forms.TextInput(attrs={'class': 'form-control'})
    )
    title = forms.CharField(
        label="Titel", required=False, widget=forms.TextInput(attrs={'class': 'form-control'})
    )

# views.py

from django.views.generic import ListView
from django.db.models import Q

from .models import Property

class ListPageView(ListView):
    template_name = 'property_list.html'
    model = Property

    def get_queryset(self):
        plz = self.request.GET.get('plz')
        rooms = self.request.GET.get('rooms')
        if plz and not rooms:
            object_list = Property.objects.filter(zip_code__exact=plz)
        elif rooms and not plz:
            object_list = Property.objects.filter(rooms__exact=rooms)
        elif plz and rooms:
            object_list = Property.objects.filter(
                Q(zip_code__icontains=plz) & Q(rooms__exact=rooms)
            )
        else:
            object_list = self.model.objects.none()

        return object_list
1 Like

Hey @DidierCH generators aren’t that bad. They are just like a return that instead of dumping everything at once and terminating the function, return one at a time (yield) when next() is called.

It’s like a postman: instead of delivery all your post in a large box, they put it through your letter box one at a time, every time you shout “next”.

1 Like

Hey @gpkesley what a nice explanation. Especially the part with the postman. Now it’s so easy to understand. Thanks! :+1:

1 Like

Ok, so my first freelancing gig is a reality :smiley:
I am really building a full stack tool (dashboard style)
I am using:
Django, Django Rest Framework, Postgres, Nginx for the backend
Vue, Vuex, Axios, Sass for the frontend
Lots of useful Python libraries ( I am not here to reinvent the wheel)
I will have an MVP ready in 3 weeks.
DONE:

  • brushed a contract template I planned on using for freelance gigs. Did the same with an invoice template
  • Sent them both to the customer (she’s really cool!)
  • setup the backend, make backend talk to the frontend (have a users API, more to come, setup Vuex getters), planned the frontend, added the components. I am using Django-Vue cookiecutter and it’s awesome.
    It comes with a Docker image that wraps it all up.

TO DO: the rest :smiley:
BLOCKERS: absolutely none, I’m like a Pepsi these days

2 Likes

Well done @io_io and don’t forget to test rigourously… (let me know if you want professional beta testing off the app at any stage)

1 Like

Thank you, @gpkesley! Sure, I will!

Sweet @io_io! Sounds like a lot of tech to play with for the job.

1 Like

Thank you, @zedshaw, it’s starting to get shape. I’ll finish the frontend in a couple of days (the design changed).
What I noticed is I code faster :smiley:
Have no idea when this happened…
In other news, I got 2 interviews with a Spanish startup for a frontend remote job.
The second was technical and it was pair programming. I had to guess the console.log outputs and I nailed most of it.
There will be a new technical round where I would solve a problem (Google allowed)
I have the feeling I could do both if I get accepted. I will try anyway and see how it goes.
My theory is: get a job that is not too stressful, something that can be done with a certain degree of ease and then, if there are some freelance gigs at times, don’t say no.
Hope it’s doable, will see.

2 Likes

That’s great @io_io, let me know if you get the job. Incidentally, I will be in Tbilisi from Nov 25, so if you’re near there maybe we can finally meet. But, don’t make a big trip if you aren’t just randomly close at that time.

They said I was in their top 3 candidates but they chose someone who had more experience with React instead of Vue. They asked me if I would fancy a devrel job as they had an opening for that and they thought I would be a good fit.
I told them yes ( it’s remote from Europe). Will see how that goes. I would write some tutorials, documentation, do some talks about their framework etc.
Meanwhile I have this freelance fullstack gig and it goes well, learning a LOT from it.
I looked Tbilisi on the map, it’s 33 hours by car, 6 hours by plane.
We usually go to places by car so we can take Hero with us, he depends on me.
Anyway, enjoy your trip, let’s meet some other time!
We might go to Budapest, it’s 7 hours distance from us.

Hey @io_io found that job posting on Stackoverflow. It’s a Romanian firm and full-stack, maybe have a look:

Junior Full Stack Software Engineer (React & Django) at Sector Labs

1 Like

Thank you, @DidierCH !
I would need to move to another city, which is out of the question, plus the mentality here really sucks, even in IT companies.
I know for sure I wouldn’t work for someone here.
For the moment I do my freelance stuff and see what else I find when I am ready for something else.
Have you seen Advanced Web Development with Django? it’s a course on advanced Django, you might find it on Packt. Custom CBV’s, mixins, etc. Thought you might find it useful.

Hi @io_io that’s all totally understandable. Thank you for the recommendation. Will watch that, especially since it’s not a very long course. Might be very interesting. Thanks :100:

1 Like
A free service run by Zed A. Shaw for learncodethehardway.org.