Django community: Community blog posts RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Django acceptance testing automation with robot framework
Testing is a typical phase in the Web application development flow, because a Web application is made of multiple layers of logic starting from HTTP request handling, to request data validation and processing, to template rendering. But testing phase of a Django Application development, it’s really easy. We use Unittest module built in to python standard library to write the test cases to simulate requests, insert the test data and inspect the application’s output. You can perform automated testing in your Django application using different tools. Few of them are, Writing the unit test cases using the python’s test client Writing the unit test cases using the selenium Writing the behavioral test cases using Django-behave framework Writing the generic test cases for acceptance testing using Robot framework In this blog, let's try to learn of what is Robot framework and how to write simple test cases using robot framework. Robot Framework is one of the best testing automation frameworks for acceptance testing. Which can be very useful in the acceptance test-driven development. This framework uses a keyword-driven testing approach, and it has easy-to-use tabular test data syntax, which is a very effective way to achieve user acceptance testing. This framework … -
DjangoCon 2018 Recap
Above: Hundreds of happy Djangonauts at DjangoCon 2018. (Photo by Bartek Pawlik.) That’s it, folks — another DjangoCon in the books! Caktus was thrilled to sponsor and attend this fantastic gathering of Djangonauts for the ninth year running. This year’s conference ran from October 14 - 19, in sunny San Diego. ☀️ Our talented Caktus contractor Erin Mullaney was a core member of this year’s DjangoCon organizing team, plus five more Cakti joined as participants: CTO Colin Copeland, technical manager Karen Tracey, sales engineer David Ray, CBDO Ian Huckabee, and myself, account exec Tim Scales. What a Crowd! At Caktus we love coding with Django, but what makes Django particularly special is the remarkable community behind it. From the inclusive code of conduct to the friendly smiles in the hallways, DjangoCon is a welcoming event and a great opportunity to meet and learn from amazing people. With over 300 Django experts and enthusiasts attending from all over the world, we loved catching up with old friends and making new ones. #Djangocon 2018 in San Diego has been the most inclusive, breath of fresh air conference I've ever attended, with the most beautiful and diverse group of people. Way to go … -
DjangoCon 2018 Recap
Above: Hundreds of happy Djangonauts at DjangoCon 2018. (Photo by Bartek Pawlik.) That’s it, folks — another DjangoCon in the books! Caktus was thrilled to sponsor and attend this fantastic gathering of Djangonauts for the ninth year running. This year’s conference ran from October 14 - 19, in sunny San Diego. ☀️ Our talented Caktus contractor Erin Mullaney was a core member of this year’s DjangoCon organizing team, plus five more Cakti joined as participants: CTO Colin Copeland, technical manager Karen Tracey, sales engineer David Ray, CBDO Ian Huckabee, and myself, account exec Tim Scales. What a Crowd! At Caktus we love coding with Django, but what makes Django particularly special is the remarkable community behind it. From the inclusive code of conduct to the friendly smiles in the hallways, DjangoCon is a welcoming event and a great opportunity to meet and learn from amazing people. With over 300 Django experts and enthusiasts attending from all over the world, we loved catching up with old friends and making new ones. #Djangocon 2018 in San Diego has been the most inclusive, breath of fresh air conference I've ever attended, with the most beautiful and diverse group of people. Way to go … -
How To Prevent Users From Creating Certain Page Types in Wagtail CMS
Sometimes in Wagtail, we have pages that should only have a single instance in the system. Let's say we have a blog that has an index page driven by BlogIndexPage model. We create it once and want to prevent editors from creating a second instance of BlogIndexPage. How do ... Read now -
Angular 7 Tutorial: Introducing Angular for Python Developers
Angular 7 is out and we'll use it to continue with our front-end tutorial series designed for Python developers. This tutorial is part of an ongoing series for teaching Angular to Python developers. Saying that; this tutorial can be also followed by front-end developers that don't use Python as their back-end language. Before diving into practical steps for developing a full-stack Python & Angular 7 web application. Let’s first learn about the basics of this front-end framework and how to get started using it. In the previous tutorial, we've learned how to integrate Angular with Django. This tutorial (now, updated to Angular 7) will be dedicated to teach you how to get started with v7. You can also learn how we consume a Django RESTful API from an Angular interface in this tutorial which used v6. Throughout this beginner's series, you'll learn how you can use v7 to build client side web applications for mobile and desktop with a Django back-end. Angular 7 Tutorial: Introducing Angular to Python Developers What's a JavaScript Framework and Why Using it Introducing Angular Angular Features Angular 7 New Features Angular 6 New Features Angular 5 Features Angular 4 Features jQuery vs. Angular Why Would … -
Django Tips #5: Docker
Why Docker improves Django development. -
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. 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 … -
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 … -
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. 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 …