Open in app

Sign In

Write

Sign In

Andy Byers
Andy Byers

108 Followers

Home

About

Oct 28, 2020

Django Custom Managers

Photo by Chris Ried on Unsplash We at the Open Library of Humanities and Birkbeck CTP have been working on a Repository system initially built to provide a space for Preprints. We came across an issue where once live data had been imported into the system the main dashboard began…

Python

2 min read

Django Custom Managers
Django Custom Managers
Python

2 min read


Apr 3, 2018

OLH’s Recent Downtime

The Open Library of Humanities main site, and Orbit and IJWWE journal sites are all on Janeway and are hosted on Reclaim Hosting’s great Shared Hosting service. …

Web Hosting

1 min read

Web Hosting

1 min read


Feb 27, 2018

Django Migrations and UUID Fields

Recently I wanted to add a UUID field to an existing model called Institution, this model represents the Institutions that support the Open Library Humanities and the UUID field would represent a referral code. I added the following line to models.py and ran makemigrations. referral_code = models.UUIDField(default=uuid.uuid4) Unfortunately, this works…

Django

1 min read

Django

1 min read


Nov 23, 2017

File Mime types in Django

Allowing people to upload files to your server can be fraught with peril, we don’t want people to upload malicious files or binaries. In some cases we want to limit uploads to very specific file types, PDF or DOCX for example. Python has a mimetype package that can be used…

Python

1 min read

Python

1 min read


Oct 5, 2017

On Janeway Events

Janeway (an open source publishing platform written in Python and using the Django framework) uses an event system that allows apps and plugins to register to be called when an event is fired. An example of this would be when a new submission is made. event_logic.Events.ON_ARTICLE_SUBMITTED This event is called…

Django

1 min read

Django

1 min read


Sep 6, 2017

Monkey-patching is Bad

Monkey-patching software is generally frowned upon, but there is a time and a place for everything, even monkey-patching. Take Janeway for example, we were working nicely until we had a feature request from a developer who was thinking about using it: Could we handle multi-tenant journals without using multiple domains…

Python

2 min read

Python

2 min read


Mar 12, 2017

Django FK on_delete defaults to CASCADE

What does this mean!? Well, lets make an example. class Company(models.Model): name = models.CharField(max_length=100) logo = models.ForeignKey(File, null=True, blank=True) class File(models.Model): filename = models.CharField(max_length=100) mime = models.CharField(max_length=100) Say we have an Company object and a File object. The file object is set to be the logo. company = models.Company.objects.create(name='A Company') file = models.File.objects.create(filename='file.jpg', mime='jpeg')

Django

1 min read

Django

1 min read


Feb 7, 2017

Converting GET Actions to POST

I’m currently converting chunks of code that make data changes on GET requests to use POST within the Django environment and thought it might be useful to document how I did it here. Here is a snippet of code using a GET request to change data using a query string…

Web Development

1 min read

Web Development

1 min read


Sep 22, 2016

Moving On

On the 12th of October I will be moving on from my post as Technical Architect at Ubiquity Press. I’ve had a great time working on cutting edge publishing technology and working alongside the teams at UP and our partner presses to provide a great experience During my tenure with…

Tech

1 min read

Tech

1 min read


Sep 8, 2016

Integrating Fundref via Fundref Widget

At Ubiquity Press our new Junior Developer, Stuart Jennings is working to integrate Fundref with our submission platform, allowing authors to submit their Funding info so it can be published and deposited with Crossref. We were informed of the Fundref Widget (info, github), which we used as the basis of…

Fundref

2 min read

Fundref

2 min read

Andy Byers

Andy Byers

108 Followers

Pub Tech developer for Birkbeck CTP

Following
  • John Rampton

    John Rampton

  • ]u[ Ubiquity

    ]u[ Ubiquity

  • Wil Wheaton

    Wil Wheaton

  • eLife

    eLife

  • Jacob Ide

    Jacob Ide

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech