This document provides a summary of Django commands and template syntax:
- Django commands are used for project setup, app setup, installing apps in the database, and outputting SQL. Template syntax includes tags enclosed in {% %} for blocks and includes, and variables enclosed in {{ }} for variable insertion.
- The document lists Django admin commands for project setup, app setup, initializing and installing apps in the database, and outputting SQL statements. It also provides examples of URL dispatcher configuration files.
- Template syntax supports two types - tags for blocks/includes, and variables for insertion. Filters are listed that can be applied to variables, such as add, center, cut, and truncatewords.
Overview of the main ways to store data in Drupal 8 depending on data and needs. A detailed description of each way and examples of how to work with storages.
https://drupalcampkyiv.org/node/44
탑크리에듀교육센터(www.topcredu.co.kr)제공
스프링프레임워크 & 마이바티스(Spring Framework, MyBatis)
18번째 자료입니다. 참고하시어 많은 도움되셨길 바랍니다.
교육 및 수강문의/기타문의사항은 홈페이지(www.topcredu.co.kr)를 통하여 하실 수 있습니다.^^
탑크리에듀교육센터(http://www.topcredu.co.kr)에서 제공하는
스프링프레임워크 & 마이바티스(Spring Framework, MyBatis)교육강좌입니다. Spring DI(Dependency Injection),세터 주입(Setter Injection) – XML 기반, 어노테이션기반 등에 대하여 설명한 교육자료이니 참고 바랍니다^^.
Slides for a talk at the Seattle Java User Group about building a workflow management application for a biomedical lab on top of the OSGi module system and the Eclipse Rich Client Platform.
Overview of the main ways to store data in Drupal 8 depending on data and needs. A detailed description of each way and examples of how to work with storages.
https://drupalcampkyiv.org/node/44
탑크리에듀교육센터(www.topcredu.co.kr)제공
스프링프레임워크 & 마이바티스(Spring Framework, MyBatis)
18번째 자료입니다. 참고하시어 많은 도움되셨길 바랍니다.
교육 및 수강문의/기타문의사항은 홈페이지(www.topcredu.co.kr)를 통하여 하실 수 있습니다.^^
탑크리에듀교육센터(http://www.topcredu.co.kr)에서 제공하는
스프링프레임워크 & 마이바티스(Spring Framework, MyBatis)교육강좌입니다. Spring DI(Dependency Injection),세터 주입(Setter Injection) – XML 기반, 어노테이션기반 등에 대하여 설명한 교육자료이니 참고 바랍니다^^.
Slides for a talk at the Seattle Java User Group about building a workflow management application for a biomedical lab on top of the OSGi module system and the Eclipse Rich Client Platform.
Let’s have a chat about how User Experience (UX), the User Interface (UI) and even Content is important to everything that we interact with. We will talk about examples and ideas from the Analog world to the Digital world, how users interact with them, and how we can implement them into your projects.
Just to be clear, all of these things suck. Please DO NOT use these techniques! It was a joke, and if you attempt any of these things you are making a big mistake.
Presentation for azPHP on setting up a new project using Zend_Tool. Also goes over creating basic modules, controllers, actions, models and layouts.
All code in the presentation has not necessarily been tested. Will update presentation when done.
Effective Python Package Management [PyCon Canada 2017]Devon Bernard
This talk showcases various example scenarios around the ins/outs of managing Python packages. Scenarios range from intra-package problems of how to build a package, inter-package problems of how to connect packages, to general usage/environment/setup problems that developers have a hard time debugging. For each of these scenarios, I'll highlight the pros/cons, best practices, and how to overcome the issues developers commonly face.
Some examples: - installing packages from public, local file system, git (ssh + https), and how this affects deployment procedures - handling systems with multiple Python versions or package managers - how app structures and imports can affect testability - relative vs absolute imports - virtual environments - setup scripts - package versioning (why, when, how) - how new code changes could not be taking effect (old .pyc files, or updated import not catching) - handling sub-packages/dependencies that utilize parent configuration files - working with PYTHONPATH - executing python as modules or scripts
Talk presented on Nov 18, 2017 at PyCon Canada 2017.
Let’s have a chat about how User Experience (UX), the User Interface (UI) and even Content is important to everything that we interact with. We will talk about examples and ideas from the Analog world to the Digital world, how users interact with them, and how we can implement them into your projects.
Just to be clear, all of these things suck. Please DO NOT use these techniques! It was a joke, and if you attempt any of these things you are making a big mistake.
Presentation for azPHP on setting up a new project using Zend_Tool. Also goes over creating basic modules, controllers, actions, models and layouts.
All code in the presentation has not necessarily been tested. Will update presentation when done.
Effective Python Package Management [PyCon Canada 2017]Devon Bernard
This talk showcases various example scenarios around the ins/outs of managing Python packages. Scenarios range from intra-package problems of how to build a package, inter-package problems of how to connect packages, to general usage/environment/setup problems that developers have a hard time debugging. For each of these scenarios, I'll highlight the pros/cons, best practices, and how to overcome the issues developers commonly face.
Some examples: - installing packages from public, local file system, git (ssh + https), and how this affects deployment procedures - handling systems with multiple Python versions or package managers - how app structures and imports can affect testability - relative vs absolute imports - virtual environments - setup scripts - package versioning (why, when, how) - how new code changes could not be taking effect (old .pyc files, or updated import not catching) - handling sub-packages/dependencies that utilize parent configuration files - working with PYTHONPATH - executing python as modules or scripts
Talk presented on Nov 18, 2017 at PyCon Canada 2017.
How to Implement Micro Frontend Architecture using Angular FrameworkRapidValue
Micro-frontends are small applications mostly divided by subdomain or functionality working together to deliver a larger application. Sometimes your frontend app might be a small part of another big application or your app consists a lot of sections and features which are developed by different teams or your app is being released into production feature by feature with developed by separate teams. If you are in one of these situations then you need to think about Micro Frontends. For more information visit: https://www.rapidvaluesolutions.com/
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
The Metaverse and AI: how can decision-makers harness the Metaverse for their...Jen Stirrup
The Metaverse is popularized in science fiction, and now it is becoming closer to being a part of our daily lives through the use of social media and shopping companies. How can businesses survive in a world where Artificial Intelligence is becoming the present as well as the future of technology, and how does the Metaverse fit into business strategy when futurist ideas are developing into reality at accelerated rates? How do we do this when our data isn't up to scratch? How can we move towards success with our data so we are set up for the Metaverse when it arrives?
How can you help your company evolve, adapt, and succeed using Artificial Intelligence and the Metaverse to stay ahead of the competition? What are the potential issues, complications, and benefits that these technologies could bring to us and our organizations? In this session, Jen Stirrup will explain how to start thinking about these technologies as an organisation.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Enhancing Performance with Globus and the Science DMZGlobus
ESnet has led the way in helping national facilities—and many other institutions in the research community—configure Science DMZs and troubleshoot network issues to maximize data transfer performance. In this talk we will present a summary of approaches and tips for getting the most out of your network infrastructure using Globus Connect Server.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™UiPathCommunity
In questo evento online gratuito, organizzato dalla Community Italiana di UiPath, potrai esplorare le nuove funzionalità di Autopilot, il tool che integra l'Intelligenza Artificiale nei processi di sviluppo e utilizzo delle Automazioni.
📕 Vedremo insieme alcuni esempi dell'utilizzo di Autopilot in diversi tool della Suite UiPath:
Autopilot per Studio Web
Autopilot per Studio
Autopilot per Apps
Clipboard AI
GenAI applicata alla Document Understanding
👨🏫👨💻 Speakers:
Stefano Negro, UiPath MVPx3, RPA Tech Lead @ BSP Consultant
Flavio Martinelli, UiPath MVP 2023, Technical Account Manager @UiPath
Andrei Tasca, RPA Solutions Team Lead @NTT Data
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofsAlex Pruden
This paper presents Reef, a system for generating publicly verifiable succinct non-interactive zero-knowledge proofs that a committed document matches or does not match a regular expression. We describe applications such as proving the strength of passwords, the provenance of email despite redactions, the validity of oblivious DNS queries, and the existence of mutations in DNA. Reef supports the Perl Compatible Regular Expression syntax, including wildcards, alternation, ranges, capture groups, Kleene star, negations, and lookarounds. Reef introduces a new type of automata, Skipping Alternating Finite Automata (SAFA), that skips irrelevant parts of a document when producing proofs without undermining soundness, and instantiates SAFA with a lookup argument. Our experimental evaluation confirms that Reef can generate proofs for documents with 32M characters; the proofs are small and cheap to verify (under a second).
Paper: https://eprint.iacr.org/2023/1886
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
django_reference_sheet
1. Django Reference Sheet
Django Admin SQL Commands
Project Setup
All the following commands output sql specific to the
Create A Project's Directory Structure
appname specified in the command and should be
django-admin.py startproject projectname
run from with the projectname directory.
(this command needs to be issued in the directory you w ant the project to be in)
django-admin.py sqlinitialdata appname
Customize the DB and other setting in the
Outputs the initial-data inserts required for Django's
projectname/settings/main.py file
admin framework.
Initialize the DB
django-admin.py sql appname
django-admin.py init
Outputs the table creation statements
(this command should be issued in your projectname directory)
Set your DJANGO_SETTING_MODULE environment variable django-admin.py sqlall appname
Unix: Outputs both the sqlinitialdata and sql data
export DJANGO_SETTINGS_MODULE=projectname.settings.main
Windows: django-admin.py sqlindexes appname
set DJANGO_SETTINGS_MODULE=myproject.settings.main Outputs the the create index statements
(you'll probably w ant to set these permanently in your ~/.bashrc file in Unix or your my
computer properties in Window s)
django-admin.py sqlclear appname
Outputs the the drop table statements and the
More Details: http://www.djangoproject.com/documentation/tutorial1/
delete statements for deleting the “initialdata”.
App Setup
Create an App's Directory Structure django-admin.py startapp appname
django-admin.py startapp appname (this should be issued in your projectname/apps directory)
(this command should be issued in your projectname/apps directory)
More Details:
Setup App's models in the projectname/apps/appname/models/appname.py http://www.djangoproject.com/documentation/
file tutorial1/#activating-models
Template Syntax
Add the App to the INSTALLED_APPS in projectname/settings/main.py
There are two types of syntax:
{% something %} - For tags which include blocks
Install the App in the DB
and functional items like loops, if statements, and
django-admin.py install appname
includes.
(this command should be issued in your projectname directory)
{{ variable }} - For variable insertion where
More Details:
“variable” is replaced with it's value.
http://www.djangoproject.com/documentation/tutorial1/#creating-models
URL Dispatcher Sample Config Files
Sample projectname/settings/urls/main.py file
from django.conf.urls.defaults import *
urlpatterns = patterns('',
(r'^weblog/', include('django_website.apps.blog.urls.blog')),
(r'^documentation/', include('django_website.apps.docs.urls.docs')),
(r'^comments/', include('django.contrib.comments.urls.comments')),
(r'', include('django.conf.urls.flatfiles')),
)
Sample projectname/apps/blog/urls/main.py file
from django.conf.urls.defaults import *
info_dict = {
'app_label': 'blog',
'module_name': 'entries',
}
urlpatterns = patterns('django.views.generic.date_based.',
(r'^(?P<year>d{4})/(?P<month>[a-z]{3})/(?P<day>w{1,2})/$', 'archive_day', info_dict),
(r'^(?P<year>d{4})/(?P<month>[a-z]{3})/$', 'archive_month', info_dict),
(r'^(?P<year>d{4})/$', 'archive_year', info_dict),
(r'^/?$', 'archive_index', info_dict),
)
Italicized Text – Placeholder names for your object(s) • Courier Text – Commands you type in
2. Template Filters
add - Adds the arg to the value random - Returns a random item from the list
addslashes - Adds slashes, for passing strings to JavaScript. removetags - Removes a space separated list of [X]HTML
Capfirst - Capitalizes the first character of the value tags from the output
center - Centers the value in a field of a given width rjust - Right-aligns the value in a field of a given width,
cut - Removes all values of arg from the given string Argument: field size
date - Formats a dateto the given format using “now” format slice - Returns a slice of the list.
default - If value is unavailable, use given default slugify - Converts to lowercase, removes non-alpha chars
dictsort - Takes a list of dicts, returns that list sorted by the and converts spaces to hyphens
property given in the argument. stringformat - Formats the variable according to the
dictsortreversed - Takes a list of dicts, returns that list sorted in argument, a string formatting specifier. This specifier uses
reverse order by the property given in the argument. Python string formating syntax, with the exception that the
divisibleby - Returns true if the value is divisible by the argument leading quot;%quot; is dropped.
escape - Escapes a string's HTML striptags - Strips all [X]HTML tags
filesizeformat - Format the value like a 'human-readable' file. time - Formats a time according to the given format (same
First - Returns the first item in a list as the now tag).
fix_ampersands - Replaces ampersands with & entities timesince - Formats a date as the time since that date
floatformat - Displays a floating point number as 34.2 (with one (i.e. quot;4 days, 6 hoursquot;)
decimal places) - but only if there is a decimal point. title - Converts a string into titlecase
get_digit - Given a whole number, returns the requested digit of it, truncatewords - Truncates a string after a certain number
where 1 is the right-most digit, 2 is the second-right-most digit, etc. of words. Argument: Number of words to truncate after.
Returns the original value for invalid input, unordered_list - Recursively takes a self-nested list and
join - Joins a list with a string, like Python's str.join(list) returns an HTML unordered list -- WITHOUT opening and
length - Returns the length of the value - useful for lists closing <ul> tags.
length_is - Returns a boolean of whether the value's length is the upper - Converts a string into all uppercase
argument urlencode - Escapes a value for use in a URL
linebreaks - Converts newlines into <p> and <br />s urlize - Converts URLs in plain text into clickable links
linebreaksbr - Converts newlines into <br />s urlizetrunc - Converts URLs into clickable links, truncating
linenumbers - Displays text with line numbers URLs to the given character limit. Argument: Length to
ljust - Left-aligns the value in a field of a given width, Argument: truncate URLs to.
field size wordcount - Returns the number of words
lower - Converts a string into all lowercase wordwrap - Wraps words at specified line length.
make_list - Returns the value turned into a list. Argument: number of words to wrap the text at.
phone2numeric - Takes a phone number and converts it in to its yesno - Given a string mapping values for true, false and
numerical equivalent (optionally) None, returns one of those strings according to
pluralize - Returns 's' if the value is not 1. the value. Sample argument quot;yeah,no,maybequot; returns yeah
pprint - A wrapper around pprint.pprint -- for debugging. for true, no for false, and maybe for none.
Template Tag Reference
block – Defines an area that the content can be inserted into. if – Evaluates for true or false
{% block content %}Default Content{% endblock %} {% if athlete %}{{ athlete }}{% endif %}
comment - {% comment %}{% endcomment %} (if statements can have “not” and “or”, but are not allow ed to have “and”)
cycle – Rotates through items ifchanged – Outputs it's content if different from last loop.
<tr class=quot;{% cycle red,blue as colors %}quot;>..</tr> {% ifchanged %}{{ name }}{% endifchanged %}
<tr class=quot;{% cycle colors %}quot;>...</tr> (code w ould be w ithin for loop)
ifnotequal – Checks for equality
debug – Outputs a bunch of debug info {% debug %}
{% ifnotequal v1 v2 %}hi{% endifnotequal %}
extends – Inherits from another template
load – loads a custom tag set {% load comments %}
{% extends quot;basequot; %}
now – Outputs current date {% now quot;jS F Y H:iquot; %}
(leave off the .html for the template name)
filter – Applies the specified filter(s) to the content in between (formatting matches php's date function for the most part)
{% filter lower %}Lowercase this{% endfilter %} regroup –Regroup a list of like objects by an attribute
firstOf – Outputs the first true variable, or nothing if all are false. {% regroup people by gender as grouped %}
{% firstof var1 var2 var3 %} ssi – Includes a file
for – Loop through list item {% ssi /home/html/side.html parsed %}
{% for athlete in athlete_list %} (if the option passed “parsed it w ill be treated as a template)
templatetag – Used to escape template tags
{{ athlete.name }}
{% templatetag openblock %}
{% endfor %}
(arguments open/closeblock and open/closevariable)
forloop.counter = current loop iteration starting at 1
widthratio – Calculates the ratio of a given value to a
forloop.counter0 = current loop iteration starting at 0
forloop.first = True if first time through loop maximum value, and then applies that ratio to a constant.
forloop.last = True if this is the list time through the loop {% widthratio this_value max_value 100 %}
forloop.parentloop = Parentloop counter (???)
Italicized Text – Placeholder names for your object(s) • Courier Text – Commands you type in
3. Sample Template
{% extends quot;basequot; %}
{% block title %}{{ title|title }}{% endblock %}
{% block intro %}
Default Intro Copy that can be replaced by templates extending this one
{% endblock %}
{% block content %}
{% for entry in blog_entries %}
{% ifchanged %}<h1>{{ entry.pub_date|date”F, y” }}</h1>{% endifchanged %}
<h2>{{ entry.title }}</h2> <p>
{{ entry.body|escape|urlizetrunc:quot;40quot;|linebreaks}}</p>
{% endfor %}
{% endblock %}
Additional Template Resources:
http://www.djangoproject.com/documentation/templates/
http://www.djangoproject.com/documentation/tutorial3/
General Django Resources:
Django Website - http://www.djangoproject.com/
Django User Group/Mailing List - http://groups-beta.google.com/group/django-users
Django Developers Group/Mailing List - http://groups-beta.google.com/group/django-developers
Django IRC - irc://irc.freenode.net/django
IRC Logs - http://loglibrary.com/show_page/latest/179
Most of the Content in this reference sheet was gathered from the http://www.djangoproject.com/ website.
Document Version: .1.1
The current document will always be available at: http://www.dobbes.com/
License:
Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License
http://creativecommons.org/licenses/by-nc-sa/2.5/
Italicized Text – Placeholder names for your object(s) • Courier Text – Commands you type in