Services Blog Français

dev workflow

| by jpic | best-practice

Any kind of dev workflow that’s not as efficient as this one is considered deprecated / obsolete by YourLabs. Have a beautiful day

Quote post

| by jpic | harmful

Keith Braithwaite

Collected by highly respected hacker Uriel (RIP) on harmful.cat-v.org

It’s a curious thing about our industry: not only do we not learn from our mistakes, we also don’t learn from our successes.

CRUDLFA+ 0.3 Series

| by jpic | python django crudlfap

CRUDLFA+ is an expirement (read: pre-alpha state) of what Django could be if:

  • generic views provided templates and javascript for a rich experience out of the box,
  • class based views leveraged OOP a bit more to add DRY goodness,
  • leveraged externals apps from the Django ecosystem.

Let’s compare it side by side. Consider this simple model:

class Email(models.Model):
    email = models.EmailField()
    caisse = models.ForeignKey('Caisse', on_delete=models.CASCADE)

    def __str__(self):
        return self.email

This admin.py:

class EmailAdmin(admin.ModelAdmin):
    list_display = ('email', 'caisse')


admin.site.register(Email, EmailAdmin)

Ported to CRUDLFA+, in the case where we only want a list view, becomes (crudlfap.py):

Read More

china labor watch: defending workers right in China

| by jpic | hactivism

image

China Labor Watch is an NGO defending workers right in China. Their infiltration within factories which manufacter parts typically for high tech products such as smartphones is necessary for journalists and public opinion to pressure brands such as Lenovo, Samsung or Apple to do something about it, ie. against children building smartphone screens. At YourLabs, we believe that tomorrow’s economy will strive to compose around both for profit and non profit work, this is why we done to China Labor Watch. Please, also consider donate to China Labor Watch. Even if you don’t, please contribute to public pressure on brands to enforce ethical practice on their providers. Best, ∞

Model in Django: not what you think they are

| by jpic | python django

It’s funny how my imagination was completely anihilated when I actually read django model field source code.

I thought a Django Model was dedicated to designing the database.

But a Model field is not a DB Field.

A Model field has a DB field, and a formfield method.

Unfortunnately, formfield is not changeable unless you override the method which means creating your own model field.

Also unfortunate, Model has no form() method like their fields have formfield() method.

Read More
Previous Page 14 of 33 Next Page

They trust us

Contact

logo