Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
6 Significant Custom App Development Risks and How to Mitigate Them
Creating a custom app can lead to huge payoffs for your business. Given the potential benefits, enterprises and startups alike are eager to develop custom applications that help them achieve their business objectives. The post 6 Significant Custom App Development Risks and How to Mitigate Them appeared first on Distillery. -
Combining Inherited Django Forms in the Same FormView
This week, I discovered the power of Django’s generic editing views and was eager to try them out. I had two forms; one inheriting from the other. I could have them each in their own view, but for a better user experience, I wanted it all to happen on one page by allowing the user … Continue reading Combining Inherited Django Forms in the Same FormView The post Combining Inherited Django Forms in the Same FormView appeared first on concise coder. -
Django Tips #4: User permissions
Best practices for configuring user permissions in a Django project. -
U-Nest App Puts College Savings Within Parents’ Reach
These days, saving for college can seem like a daunting prospect. College costs are distinctly on the rise. Between 1987 and 2017, the average tuition for a public four-year institution increased by a whopping 213 percent, and the average tuition for a private four-year institution increased by 129 percent. That’s why it’s unsurprising that many families’ fears about their ability to pay for college are also on the rise. The post U-Nest App Puts College Savings Within Parents’ Reach appeared first on Distillery. -
Filtering and Pagination with Django
If you want to build a list page that allows filtering and pagination, you have to get a few separate things to work together. Django provides some tools for pagination, but the documentation doesn't tell us how to make that work with anything else. Similarly, django_filter makes it relatively easy to add filters to a view, but doesn't tell you how to add pagination (or other things) without breaking the filtering. The heart of the problem is that both features use query parameters, and we need to find a way to let each feature control its own query parameters without breaking the other one. Filters Let's start with a review of filtering, with an example of how you might subclass ListView to add filtering. To make it filter the way you want, you need to create a subclass of FilterSet and set filterset_class to that class. (See that link for how to write a filterset.) class FilteredListView(ListView): filterset_class = None def get_queryset(self): # Get the queryset however you usually would. For example: queryset = super().get_queryset() # Then use the query parameters and the queryset to # instantiate a filterset and save it as an attribute # on the view instance … -
Filtering and Pagination with Django
If you want to build a list page that allows filtering and pagination, you have to get a few separate things to work together. Django provides some tools for pagination, but the documentation doesn't tell us how to make that work with anything else. Similarly, django_filter makes it relatively easy to add filters to a view, but doesn't tell you how to add pagination (or other things) without breaking the filtering. -
Distillery Designers to Attend Adobe MAX Conference
To keep their creative juices flowing, creative professionals need the occasional infusion of inspiration. That’s exactly why Adobe created their annual MAX conference: to give creative professionals the opportunity to come together to learn, network, and get inspired. Distillery Senior UI Designer Luciana Flora and Junior UI Designer Mariana Herrera are excited to attend the 2018 conference, which takes place at the Los Angeles Convention Center from October 15th through the 17th. The post Distillery Designers to Attend Adobe MAX Conference appeared first on Distillery. -
Adding type hints to the Django ORM
It occurred to me that Django's ORM could do with a bit of a revamp to make use of recent developments in the Python language. The main area where I think Django's models are missing out is the lack of type hinting (hardly surprising since Django pre-dates type hints). Adding type hints allows Mypy to detect bugs before you even run your code. It may only save you minutes each time, but multiply that by the number of code + run iterations you do each day, and it can save hours of development time. Multiply that by the lifetime of your project, and it could save weeks or months. A clear win. Typing Django Models I'd love to be able to use type hints with the Django ORM, but it seems that the magic required to create Django models is just too dynamic and would defy any attempts to use typing. Fortunately that may not necessarily be the case. Type hints can be inspected at runtime, and we could use this information when building the model, while still allowing Mypy to analyze our code. Take the following trivial Django model: class Foo(models.Model): count = models.IntegerField(default=0) The same information could be … -
Python Web Frameworks
-
In-house or Outsourced: Which Software Development Path is Right for You?
The question of in-house vs. outsourced software development is something only you yourself can answer. With so many variables, personal preferences, and pros and cons in play, the only right answer is the one that’s right for you. The post In-house or Outsourced: Which Software Development Path is Right for You? appeared first on Distillery. -
Best Online Django Video Tutorials (2018)
An up-to-date list of online Django video tutorials. -
Evennia in Hacktoberfest 2018
Like last year, Evennia, the Python MUD creation system, takes part in Hacktoberfest, a yearly event run by Digitalocean in collaboration with GitHub.The premise is simple: Sign up at their website and then contribute with 5 GitHub pull requests during the month of October. If you do, you'll win a unique T-shirt!You can help out any OSS project to win, if you want to help out Evennia, I have marked a bunch of suitable issues with the Hacktoberfest label for you to sink your teeth in. Code on! -
Top 5 Business Benefits For DevOps Implementation
The DevOps movement has been gaining steam in recent years. More and more businesses are considering implementing changes that prioritize development and operations collaboration to utilize agile business strategies. In fact, DevOps is quickly becoming one of the must have tools for startups. But before undergoing huge changes to implement DevOps strategies, business owners want to be sure that it is worth the risk and effort. There are countless advantages to implementing new DevOps tactics at your organization. Find out the business benefits for DevOps in the post below. They are sure to help you realize the opportunities implementing a new system will afford your company. The post Top 5 Business Benefits For DevOps Implementation appeared first on Distillery. -
Elm & Django #2
Elm is a great tool to build simple widgets like a search bar. The use case is simple, as the user types, we want to dynamically show a filtered list of results. -
Elm & Django #2
Elm is a great tool to build simple widgets like a search bar. The use case is simple, as the user types, we want to dynamically show a filtered list of results. -
Updating a Django queryset with annotation and subquery
How-To guide to update a Django queryset with annotation and subquery -
Evennia 0.8 released
After about a year of work and almost 540 commits from close to 20 contributors, Evennia 0.8 is out! Evennia is a Python game server for creating text-based multiplayer games (MUDs, Mushes, etc) using Django and Twisted.Some of the upcoming improvements have been covered by previous dev blogs, such as the completely reworked server infrastructure: as well as the new Online Creation System that allows for editing in-game prototypes using a powerful menu system: Other improvements are in the web client, which supports split-panes out of the box. The user can split the output area in any number of panes, resize as desired and then assign different types of content to each pane. You can also have panes that absorb "all the rest" or "all" of the content. There are still some bits which are a bit shaky and there is still much to do with the web client (for example, not that many outgoing messages yet defaults to being tagged in a way that the webclient recognizes). But it's a step forward!There are many other improvements for developers, such as easier tools for running debuggers and a lot of new utilities and helper functions. The menu-creation tool (EvMenu) has seen … -
<p>Just read and learned about <a target="_blank" rel="nofollow" href="https://torchbox.com/blog/rich-text-fields-and-faster-horses/">Wagtail’s StreamField</a> – interesting. Good to see t
Just read and learned about Wagtail’s StreamField – interesting. Good to see that more Django-based CMS systems are leaving the oversized rich text editor behind, as FeinCMS/feincms3 does since 2009. -
Using Django with SQL Server LocalDB
How to use Django with SQL Server LocalDB LocalDB is a version of Microsoft SQL Server Express Edition designed for developers. LocalDB is: easy to install requires no management is compatible with other editions of SQL Server LocalDB is also lightweight. The setup routine is just 45MB. LocalDB instances will start automatically upon the first connection request and stop automatically shortly after the last connection is closed. Databases hosted on LocalDB are limited to 10 GB in size. Follow these steps to install LocalDB, create a database, and connect Django. Note: This post has been tested with Microsoft SQL Server 2017, Django 1.11.x and 2.x. The pyodbc and django-pyodbc-azure packages will be used to connect Django to SQL Server. The version of django-pyodbc-azure must match your version of Django. Installing LocalDB Download SQL Server 2017 Express from https://www.microsoft.com/en-us/sql-server/sql-server-downloads. Run the setup routine and click Download Media. Choose LocalDB, specify a download location, and click Download. Click Close button to close the setup routine. Run the SqlLocalDB.msi setup routine. Click Next button. Accept the license agreement and click Next button. Click Install button. Click Finish button. Download most recent Cumulative Update for SQL Server 2017 (CU11 as of this post) from … -
Django or Drupal for Content Management: Which Fits your Needs?
If you’re building or updating a website, you’re probably wondering about which content management system (CMS) to use. A CMS helps users — particularly non-technical users — to add pages and blog posts, embed videos and images, and incorporate other content into their site. -
Django or Drupal for Content Management: Which Fits your Needs?
If you’re building or updating a website, you’re probably wondering about which content management system (CMS) to use. A CMS helps users — particularly non-technical users — to add pages and blog posts, embed videos and images, and incorporate other content into their site. CMS options You could go with something quick and do-it-yourself, like WordPress (read more about WordPress) or a drag-and-drop builder like Squarespace. If you need greater functionality, like user account management or asset tracking, or if you’re concerned about security and extensibility, you’ll need a more robust CMS. That means using a framework to build a complex website that can manage large volumes of data and content. Wait, what’s a framework? Put simply, a framework is a library of reusable code that is easily edited by a web developer to produce custom products more quickly than coding everything from scratch. Django and Drupal are both frameworks with dedicated functionality for content management, but there is a key difference between them: Drupal combines aspects of a web application framework with aspects of a CMS Django separates the framework and the CMS The separation that Django provides makes it easier for content managers to use the CMS because … -
python django (django template language)
Django Template Language Tags forThe for loop over each item in an array for example to display a list of athletes provided in athlete_list:<ul>{%for athlete in athlete_list%}<li>{{athlete.name}}</li>{%endfor%} </ul>if ,elif,and elseEvaluates a variable and if that variable is true the contents of the block are displayed {% if athlete_list %} Number of athletes: {{ athlete_list|length }}{% elif athlete_in_locker_room_list %} Athletes should be out of the locker room soon!{% else %} No athletes.{% endif %}in the above if athlete_list is not empty the number of athletes will be displayed by the {{athlete_list|length}} variable . Otherwise if athlete_in_locker_room_list is not empty the message "Athletes should be out..." will be displayed if both lists are empty "No athletes " will be displayedyou can also use filters and various operators in the if tag:{% if athlete_list|length > 1 %} Team: {% for athlete in athlete_list %} ... {% endfor %}{% else %} Athlete: {{ athlete_list.0.name }}{% endif %}most templates will return string so mathematical comparisons using filters will generally not work as you expect Length is an exception Commentsthe comment out part of a line in a template use the comment syntax{# #} for example this template would render as 'hello':{#greeting#}helloa comment can contain any … -
Utrecht (NL) python meetup september 2018
Data processing using parser combinators - Werner de Groot He collaborated with data scientists from Wageningen University. The scientists did lots of cool programming stuff. But they did not use version control, so they introduced git :-) They also had lots and lots of data, so they introduced Apache Spark. Their data sets were in ascii files, which are huge. So the ascii files need to be parsed. He showed an example of a file with DNA data. Ouch, it turns out to be pretty complex because there are quite some exceptions. Fields (in this example) are separated by semicolons. But some of the values also contain semicolons (quoted, though). So the generic python code they used to parse their DNA data was littered with "if" statements. Unmaintainable. You probably heard that hard problems need to be split up into smaller problems. Yes, that's true. But the smaller parts also need to be combined again. So: smaller parsers + a combining them again. A parser takes an input and returns the part that matched and the part that remained. He showed parsy as a library for "parser combinators". Many languages have such libraries. He demonstrated how to combine those input/match/remainder … -
Believe the Buzz: 3 Use Cases that Show Why Good UX Is Good for Business
In recent years, user-centered design (UCD) has become widespread well beyond the design field. Companies and organizations ranging from NASA to IKEA and everything in between have benefited from adopting UCD. The post Believe the Buzz: 3 Use Cases that Show Why Good UX Is Good for Business appeared first on Distillery. -
Dataset Resources for Machine Learning
In our [Machine Learning](/cou...