def print_all_models(modeladmin, request, queryset):
    print_models()
    print_all_models().short_description = "print_all_models!"
Esempio n. 2
0
from print_models import print_models, show_completed_models

unprinted_designs = ['iphone case', 'robot pendant', 'dodecahedron']
completed_models = []

print_models(unprinted_designs, completed_models)
show_completed_models(completed_models)
Esempio n. 3
0
#Printing Models

import print_models as p

models=['a','b','c','d','e','f','g']
p.print_models(models)
Esempio n. 4
0
#Printing Models

import print_models

models = ['a', 'b', 'c', 'd', 'e', 'f', 'g']
print_models.print_models(models)
Esempio n. 5
0
#Put the functions for the example print_models.py in a
#separate file called printing_functions.py. Write an import statement at the top
#of print_models.py, and modify the file to use the imported functions.

#CAUTION: also see for 'print_models.py' file inside of github,it may not work
# if you didn't get that file in the same path as for this program.

#ways to use import function are as follows:

#import print_models
#import print_models as pm
#from print_models import print_models
#from print_models import print_models as pm
#from print_models import *
#use any of them as your preference and which suit your style.

import print_models as pm

cake = ['polygon', 'square', 'rectangle']
vanilla = []
pm.print_models(cake, vanilla)
#cake and vanilla are callsign for the "unprinted_designs" and "completed_models" respectively.
pm.show_completed_models(vanilla)
Esempio n. 6
0
import print_models

todo = ["cat", "dog", "fish"]
done = []

print_models.print_models(todo, done)
print_models.show_models(done)
Esempio n. 7
0
# coding=gbk
# ������ϰ6 �������洢��ģ����

# part_1 ʹ��impor���ת��
import print_models

n = ['a','b','c']
m = []

print_models.print_models(n,m)