Creating a base project: django-admin startproject projectname New app within existing project: python3 manage.py startapp appname You’ll want to add the appname to the end of the list of INSTALLED_APPS in projectname/settings.py Django uses Model View Controller pattern – URL Pattern maps to Views, which return HTML and can make use of Models and Templates.Continue reading “Django cheat sheet”
Author Archives: Brittany Owens
Working with Docker
Reference here First – what is docker? The gist is that it’s somewhat of a replacement for clunky linux virtual machines that you might use just for programming / software development. There are two main parts – Containers and Images. A Container is like a tiny, minimalistic virtual machine. It creates a small space toContinue reading “Working with Docker”
Testing in Flutter
Unit tests: You can use the flutter_test library. Cheat sheet below group((String) description, () {}) – function allows you to create a group of tests. The tests go inside the curly braces, of course. test((String) description, () {}) – inside the group body, used to run a synchronous test testWidget((String) description, () async {}) –Continue reading “Testing in Flutter”
Bloc Pattern Todo List
General process of implementing the bloc pattern: Model for Todo Items (the data we’ll be using) States representing the loading process for the To-do list; are they loading, loaded, or unable to be loaded? Events representing the operations done on the To-do list; these are for each of the operations we are going to beContinue reading “Bloc Pattern Todo List”
CRUD with PostgreSQL in Flutter
Using this tutorial. Had to install dart to get the pub command. Tutorial on customizing zsh (in case I want to do that later). Added the directory where pub installs all of its executables to PATH (in ~/.zshrc ) You can then refresh the terminal to use the newly changed config file without closing andContinue reading “CRUD with PostgreSQL in Flutter”
Flutter Resources
Awesome Flutter – Huge Resource list Tutorials: Roadmap to Becoming a Flutter Developer Dart Operators Packages: Awesome Flutter Packages – curated list Reflectly-style login page Communities: FlutterDev Subreddit
Boring Show Episode 2 Notes
Basic Testing Tutorial here. Flutter test library documentation here. Tester.pump() runs one frame of the app and then stops. Tester.pumpAndSettle() runs until the queued events are all done. You can do find.byIcon() or find.byType() (and likely a lot of other useful things too). For converting JSON, quick and easy way is to use dart:convert (built-in).Continue reading “Boring Show Episode 2 Notes”
Saving Data to the Cloud with Firebase
I am following this tutorial. Here’s another tutorial on uploading images, video and audio. Not exactly what I need but might be useful later. Had a bit of trouble finding the bundle identifier for iOS. Found it in ios/Runner.xcodeproj/project.pbxproj . The generated file goes in the ios/Runner folder. The pod file, on the other hand, isContinue reading “Saving Data to the Cloud with Firebase”
Making a To-do List App
Followed this tutorial. Index is given in the itemBuilder, as itemBuilder is automatically called as many times as it takes to fill its available space (and therefore iterates through the indices of the list). Then passed from there to _buildTodoItem, and built into that item’s _promptRemoveTodoItem call. Flutter Core Principles for reference. The tutorial aboveContinue reading “Making a To-do List App”
My First Flutter App
Followed Part 1 and Part 2 of the Flutter tutorial. Hot reload happens automatically when saving the app files (but there’s also a button in the IDE to do it). If you make big changes, do a full restart instead of a hot restart. Scaffold: make a layout without needing to align things manually. UseContinue reading “My First Flutter App”