#Django 2.0 alpha 1 released


Jason Robinson

Ofertas laborales con #Python - PyAr - Python #Argentina


#software #django #python #argentina #trabajo

Diego Ariel Capeletti

#Django #REST framework is so stupidly nice to work with it's shameful.

Jason Robinson

Uh, why do I feel bad about putting #Django #REST framework APIView based view code in viewsets.py. It's a habit since most of the API I write is a ViewSet. And it seems stupid sprinkling API views in many logical places. api.py would make sense, but the common way seems to be viewsets.py..

So, now I have an app which doesn't have a single API ViewSet but I have a bunch of ApiView based views in viewsets.py, which feels odd. But it's in line with the other API code in other project apps and thus makes perfect sense..

Jason Robinson

15 minute debugging. Should have probably put IsAuthenticated permission in permission_classes not authentication_classes. Test for login required might pass then. HAHAHA. Sorry. Tired.

But yeah, another testimony why it makes sense to write #tests for even the obvious stuff..

#django #rest

Jason Robinson

#Socialhome v0.4.0 released

The focus of work lately has been implementing missing features for proper daily usage. One of these is allowing users to share content created by other people. This is now partially possible. Remote shares are now processed and users are able to create shares, but shares are not yet themselves taken into account when creating a stream. Will write another post related to the status with shares and how they will function.

Check out the release here: https://github.com/jaywink/socialhome/releases/tag/v0.4.0

Try it!

Registrations are open at https://socialhome.network . Please be aware some features are still missing, but otherwise the software is very stable. Let us know what you think if you decide to try it!


Are you a #Django, #Python or #VueJS coder? Want to build a social network? Check out the contribution guide and get in touch!


Update notes

This release contains long running migrations. Please allow up to 10 minutes for the migrations to run, depending on your database size.


  • Allow user to change profile picture. (#151)

    Profile menu now has an extra option "Change picture". This allows uploading a new picture and optionally setting focus point for cropping a picture that is not square shape.

  • Federate local profiles to remote followers on save. (#168)

  • Process remote profiles entities on receive.

    Remote profiles were so far only created on first encounter. Now we also process incoming Profile entities from the federation layer.

  • When following a remote profile, federate profile to them at the same time.

  • It is now possible to expose statistics from a Socialhome node. This includes counts for users (total, 30 day, 6 month), local content and local replies. These will be exposed via the NodeInfo documents that for example the-federation.info node list consumes.

    By default statistics is off. Admins can switch the counts on by setting environment variable SOCIALHOME_STATISTICS=True and restarting Socialhome.

  • Add user API token view. Allows retrieving an API token for usage in clients and tools. Allows also regenerating the token if it has been lost or exposed.

  • Added bookmarklet to easily share external pages. The bookmarklet can be bookmarked from the 'Create' page. (#138)

    Sharing with the bookmarklet will copy the page url, title and optionally selected text into the create content text area. The bookmarklet is compatible with Diaspora, so for example the Firefox sharing service will work.

  • Support receiving 'Share' entities. Show amount of shares on content. (#206)

  • Show replies to shares on the original shared content. (#206)

  • Add share endpoint to Content API. This enables creating and removing shares via the API. (#206)

  • Allow sharing content. Clicking the share counter icon exposes a 'Share' button which when clicked will create a share. (#206)

  • Allow unsharing content. Clicking the share counter icon exposes an 'Unshare' button (assuming the user has shared the content) which when clicked will remove the share. (#206)

  • Federate local shares to remote nodes. (#206)

  • There is now a 'My content' stream link in the navbar 'Streams' dropdown. This goes to your own profile all content stream.

  • Add user preference for the new stream refactoring. If enabled, all streams that have a new version in progress will be rendered with the new frontend code based on Vue.js. (#202)

    Warning! The new frontent code doesn't have all the features of the current on yet.

  • Content API has three new read only fields available:

    • local, boolean whether the content is local or remote.
    • reply_count, count of replies (including replies on shares)
    • shares_count, count of shares
  • Make email notifications nicer by using HTML templates in addition to the plain text version. (#206)

    In addition to reply and follow notifications, send also when own content is shared.


  • Breaking change. Content API results now return visibility as a string ('public', 'limited', 'site' or 'self'), not an integer.


  • There was no notification sent out when a local user followed a local user. This has now been fixed.


  • Breaking change. Removed Content, Profile and Users API LIST routes. For now these are seen as not required for building a client and allow unnecessarily easy data mining.

  • Removed content modal. Clicking timestamp in grid now directly loads the content detail view. (#162)

    Loading the content in a modal was an early experiment and didn't end out very usable.

  • Removed reply button from replies. Technically, threaded replies are possible but the UI implementation is not done. Replying to a reply will be back once UI and federation layer will handle threaded replies properly.

#thefederation #federation

socialhome - A federated social home.

Socialhome HQ


#Django #PyCharm #IDE #fundraising

Jason Robinson


#python #PyCharm #django

Jason Robinson

My first PR to a #Django namespaced project got merged, yay! Small validation improvements to asgiref, the Django Channels ASGI reference implementation.

Hoping someday to sneak a PR into Django itself :P

Jason Robinson


#turku #helsinki #django #python #työpaikat

Jason Robinson

#Django "group by" query. I search for this every. single. time. Couldn't we just have a Model.objects.group_by("field") helper? 🙏 For me?


How to query as GROUP BY in django?
I query a model, Members.objects.all() and it returns say Eric, Salesman, X-Shop Freddie, Manager, X2-Shop Teddy, Salesman, X2-Shop Sean, Manager, X2-Shop What i want is, to know the best Djan...

Jason Robinson

Hyvä arkiympäristö –hanke tuo kuntalaiset mukaan kaupunkiympäristön kehittämiseen – Anders Innovations

Anders Innovationsilla on ilo ja kunnia olla mukana suunnittelemassa ja kehittämässä hankkeita, jossa idea on ensiluokkainen. Toteutimme Hyvä arkiympäristö -hankkeelle pilotointivaiheen jälkeisen tuotantosovelluksen, jonka pääteknologioiksi valittiin ReactJS ja Django.


#django #react #turku

Hyvä arkiympäristö –hanke tuo kuntalaiset mukaan kaupunkiympäristön kehittämiseen
Turun kaupungin Hyvä arkiympäristö –hanke antaa kuntalaisille vaikutusmahdollisuuksia oman lähiseutunsa kehittämisessä.

Jason Robinson

Support a Great Partnership: #PyCharm and #Django Team up Again


Jason Robinson

Profile picture update lands!

Even though we like seeing more and more #Django ponies in the stream, we recognize users might want a slightly more personal picture for their profile. So, finally, you can set your own profile picture! Changing the picture also updates it to your remote followers through the #federation layer.

Access the profile picture upload page through the drop-down in your profile. First upload an image, after which it is possible to set a center point for the automatic crop that happens. All profile images are square shape, but your uploaded image doesn't have to be.

This addition is available in the development branch and on https://socialhome.network which runs on the development branch.

#socialhome #changelog #devdiary

Socialhome HQ - Socialhome

Socialhome HQ

Chat with us on #Matrix

We've now a #socialhome:matrix.org room on Matrix too, in addition to our IRC and Gitter rooms. All these rooms are bridged, so you only need to join one to talk to participants in all three.

#Django developer?

Want to help build a cool social network site that federates with #Diaspora, #Friendica, #Hubzilla, and in the future #Mastodon too? Come talk and join in, help is required!

Here are some buzzwords from our technical stack: #Django, #Channels, #Bootstrap 4, #jQuery, #Masonry, #RQ, #PostgreSQL, #uWSGI, #Circus, #Mocha, #federation, #Haystack, #Whoosh. And coming up, #VueJS.


Socialhome HQ

'user': <SimpleLazyObject: <User: jaywink>>}

Thanks, #Django.

Jason Robinson

OK #Django #REST #Swagger docs generator is pretty damn sweet. Just install and type some docstrings, everything else is automatic ✌

Docs still WIP, but that was literally 5 minutes of work.

In related notes, #Socialhome #API got content CRUD operations and image upload merged. Now I want to install an #Android SDK and start making a photo upload app 😁

Jason Robinson

#Django bugfix release: 1.11.4



Jason Robinson

Hmm really difficult to find a reusable #Django app to log user audit events, that isn't tied into the model system. I would like something that works for both selected models and custom events. Just a simple "who what where".

Anyone? Or just roll my own?

Jason Robinson


Host, run, and code Python in the cloud!

Get started for free. Our basic plan gives you access to machines with a full Python environment already installed. You can develop and host your website or any other code directly from your browser without having to install software or manage your own server.

[ #python #hosting #programming #django #server ]



Some basic #search on #Socialhome finally starting to come together. Only on my personal node atm though. Explains why many people got a follow from me just now as I'm eagerly searching and following people from my #diaspora contacts :) Remote direct match lookup is still to come though, so can't reach all pods who don't push over the relay system (btw, you should!). Currently the search is for profiles only. Tags will be added soon, after that full text for content.

On the technical side, after prototyping some solutions, went with django-haystack for the search framework and whoosh for the engine. Whoosh is a pure #Python backend with a file index. While this might not offer the performance we will need for large index full text search (from all content!), using Haystack on top means we can just switch transparently to #Elasticsearch at any time without touching pretty much any code - or even support using one or the other. Some people running nodes might not want to install ES.

Landing soon in master, you can try it at my own site if you are interested. It's basic but works.

#django #devdiary

Jason Robinson

The State of #Developer Ecosystem #2017 - #Infographic

Interesting #survey from #JetBrains. Some takeaways I found interesting:

  • #Python was the 5th popular language, though if you count out HTML/CSS and SQL, then 3rd (JavaScript, Java, Python). But, more people indicated a wish to adopt Python than any other language 👍
  • Only 55% indicated they write unit #tests 😱 19% of #opensource contributors indicated they don't do unit #testing 😱😱
  • 42% indicated they contribute to #opensource regularly or from time to time
  • #Linux got a massive 40% share in operating systems, though 21% use #Windows and Linux simultaneously. This is a logical result, since web development pretty much requires using Linux at least virtually. And Linux is a much more popular choice among developers than it is for normal regular Joe users (where the market share is more like 2%).
  • Just over 50% indicated they sleep over 6 hours a night. 6% sleep less than 3 hours..
  • Only 11% indicated they don't have a hobby project
  • Python 3 is used by 53% of Pythonistas. Good riddance Python 2, we're moving on!
  • 67% of Pythonistas prefer #Django for their framework
  • 88% of developers are under 40 years of age. Which makes me a dinosaur of the industry 😁
  • ES6 is adopted by 82% of #JavaScript developers
  • #React is adopted by 49% of JavaScript developers

It's a survey among many, always interesting to see results and compare between.


The State of Developer Ecosystem 2017 - Infographic | JetBrains
Over 5,200 developers share their insights on modern technologies, programming languages, frameworks, and tools of choice for software development.

Jason Robinson

Towards #Channels 2.0



Jason Robinson

Over 10,000 women have attended a #Django Girls workshop!


Over 10,000 women have attended a Django Girls workshop!
If you’re really quiet and listen super hard, you might be able to hear the Django Girls team celebrating the latest milestone… This month the Django Girls Foundation helped support over 10,000 people...

Jason Robinson


I really wish I had started using this #Django package earlier. I've known about it for a long time but hadn't really checked how easy it makes testing views in Django. Pure awesomeness.

On a related note, I've finally decided while #pytest is great, I do prefer Django test classes. Why? Less magic. Py.test fixtures are like straight from the #RoR world. Django test classes, while slightly more verbose, have a lot of benefits. Better assertions (based on type) and awesome setUpTestData to keep tests fast, as some examples. Slowly converting all #Socialhome tests to Django tests 👍

I still use Py.test as a test runner though, it has nice flexible cli options for that.


Jason Robinson

Profile content stream + minor redesign

Added now a new "All content" stream for each profile. This can be found in the user profile. It is always rendered by default if the profile is remote or is a local profile with no pinned content.

Also related to this a minor redesign of the profile page. The "stamped" area with profile information is now centered with two columns on xl-large screens, two columns on left for large screens and full-width on medium or smaller. It now has a user actions drop-down for modifying settings or profile content, and for other user profiles there are the home/follow/unfollow buttons as in stream content.

The navbar also received a rewrite as bumping a #Bootstrap 4 alpha version broke things again.


Would love to receive feedback on the usefulness of the profile stream, or streams in #Socialhome in general. If you have tried Socialhome, did you find the grid layout useful or confusing?

It is likely the design will live quite a bit in the future. The current one was really a "let's try this" idea which still needs to be proven. Underneath the code is starting to suffer from "spaghetti code" problems with lots of #jQuery events firing to pull the strings. I'm seriously considering rewriting the stream with either #React or maybe #Vue. Before that happens, it would be nice to have a clearer idea of the future stream #UX.

If you want to give feedback or discuss these things, feel free to leave some comments here or get in touch via chats or GitHub issues. Private messages don't yet work in the #federation layer so please don't send those yet.

Project info

As a reminder for new readers. Socialhome is a #Django powered project aiming to create a platform that allows users to create a simple social profile with dynamic content. All content is federated using the #Diaspora protocol. Streams are in a central role, and we plan to have many types of streams, including custom per user streams.

You can find the code here and some documentation. The official site is https://socialhome.network which is a Socialhome instance itself and open for registration. Feel free to play around and feedback is always welcome!

#devdiary #changelog

Socialhome HQ - Socialhome

Socialhome HQ

#Django bugfix release: 1.11.3


Jason Robinson