#django

#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?

https://stackoverflow.com/a/629691/1489738

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.

https://www.andersinnovations.com/fi/blogi/hyva-arkiymparisto-hanke-tuo-kuntalaiset-mukaan-kaupunkiympariston-kehittamiseen/

#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

https://www.djangoproject.com/weblog/2017/aug/15/support-dsf-2017/

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

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

#python

https://www.djangoproject.com/weblog/2017/aug/01/bugfix-release/

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

PythonAnywhere

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 ]

https://www.pythonanywhere.com

Erik

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.

https://www.jetbrains.com/research/devecosystem-2017/

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

#django

http://www.aeracode.org/2017/7/11/towards-channels-20/

Jason Robinson

django-test-plus

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.

http://django-test-plus.readthedocs.io/en/latest/

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.

Feedback

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

https://www.djangoproject.com/weblog/2017/jul/01/bugfix-release/

Jason Robinson

Seitsemän viikkoa Anderslaisena – Anders Innovations

#python #django #helsinki #turku

https://www.andersinnovations.com/fi/blogi/seitseman-viikkoa-anderslaisena/

Seitsemän viikkoa Anderslaisena
Emilia on toisen vuoden tieto- ja viestintätekniikan insinööriopiskelija ja vietti seitsemän viikkoa työharjoittelussa Andersilla.

Jason Robinson

Play Cool..

https://www.youtube.com/watch?v=QATIHWbN-sM

#music #django #jazz
Quelle: https://undead-chemnitz.de/word/Archive/24892


Reverend Elvis

Analyzing #Django requirement files on GitHub

https://pyup.io/posts/analyzing-django-requirement-files-on-github/

Jason Robinson

#Django m2m_changed pk_set is empty - Stack Overflow

Anyone? 😩

https://stackoverflow.com/questions/44477919/django-m2m-changed-pk-set-is-empty

Django m2m_changed pk_set is empty
Django version 1.10.7, I have a problem where sometimes my receiving m2m_changed signal on a ManyToMany field has pk_set empty. The model m2m part (note it's a self reference): class Profile(

Jason Robinson

Meh.

  • Add some fields on a model
  • Add functionality related to those fields
  • App API routes for not just the fields but the whole model
  • Start adding more functionality using shiny new API routes
  • Realize fields are probably on the wrong model
  • Open a beer

Well, got an API for the model even though don't need it yet :P Luckily #Django REST framework is pretty damn fantastic and a breeze to do API stuff with.

Jason Robinson

#Django bugfix release: 1.11.2

https://www.djangoproject.com/weblog/2017/jun/01/bugfix-release/

Jason Robinson

Needs an Ajax endpoint for followers in #Socialhome. Adds #Django #REST framework.

Well, need an API anyway, might as well do it now :)

Jason Robinson

Всем привет, я #новичок.Мне интересны #3d-print, #christianity, #cryprocurrency, #django, #family, #homeschooling, #linux, #python и #reading. Can read English

guest007@diaspora.zone

3 Reasons to Upgrade to the Latest Version of #Django

https://www.caktusgroup.com/blog/2017/05/22/3-reasons-upgrade-latest-version-django/

3 Reasons to Upgrade to the Latest Version of Django | Caktus Group

Jason Robinson