Services Blog Français

Getting generic views to support “fake” models

| by jpic | python django crudlfap

Sometimes, we need to make views around objects which are not stored in the database. They may be calculated on the fly in python, or come from some data source that’s not the database, or which aggregates several objects in the database.

This is supported out of the box with CRUDLFA+, the modern web framework for Django. All you need to implement is:

  • a Model class with what you want in it, just set Meta.managed=False,
  • implement save() and delete() like you want in it, if you want create, update and delete views to work,
  • implement get_queryset() and get_object() like you want in the Router.

This example model from crudlfap_example uses a class attribute in the manager to store the object list in memory. That’s probably not what you want to do in your own project, but that works for the PoC because it demonstrates how to override save() and delete().

Read More

YourLabs Business Service is born

| by jpic | python django yourlabs crudlfap

It’s my pleasure to announce the official birth of our new company, YourLabs Business Service. This company will work in conjunction with the YourLabs foundation and of course sponsor the Django apps ecosystem.

We are hiring freelancers to:

  • maintain apps in the Django ecosystem that we use in CRUDLFA+, our modern web framework for Django,
  • sysadmins and other hackers to co-manage our infrastructure: respond to monitoring alerts and this kind of things,
  • contribute to our customer projects,

This is a 99% remote position, or 100% if you want to miss all the parties and conferences we’ll setup or join, but it’s not a full time job, yet, rather a paying side project for things you probably already do.

Read More

What does the CRUDLFA+ acronym stands for ?

| by jpic | python django crudlfap

Well, it definitely stands for something ! And since this is becoming a FAQ, here’s my answer:

It stands for: Create Read Update Delete Form Autocomplete and more !

We started by making a CRUD because the customer was complaining his come was not DRY and that we should have a CRUD in Django - the customer comes from the modern PHP framework world.

We soon figured we needed a crudL, for the list. We wanted to add custom actions with custom forms and it became crudlF because we added the FormViewMixin. Then we wanted to add automatic autocomplete views so it became crudlfA, with the AutocompleteView (to be Open Sourced soonish). Then we wanted to just refactor custom views: turned out into we use ModelViewMixin, the mixin for a model view, ie. list, create … and ObjectViewMixin, mixin for a model instance view ie. detail update delete forms …

Read More

Rethinking Django’s URL Router

| by jpic | django python crudlfap

This all started when a web developer learning Django was struggling to maintain a quantity of HTML and came to me: “I have a question for you, Django, can you generate a menu for me please ?”.

Oh my, is this person going to be the next wasting their time building something that’s too complicated and worthless just like I have back when I used to try this kind of stunt ?

Read More

DAL 3.2.6 Release

| by jpic | django-autocomplete-light django python

django-autocomplete-light 3.2.6 was released on github and pypi, with:

#838: Use namespaced jQuery in `get_forwards` by @ryan-copperleaf & @gagarski
#836: Queryset sequence view to display actual model name by @jsoa

3.2.5 and 3.2.6 were briefly hosted on PyPi and are the same.

Enjoy <3

Previous Page 17 of 33 Next Page

They trust us

Contact

logo