AhmedSSoliman commited on
Commit
ff178c0
1 Parent(s): 0f7b855

Upload 10 files

Browse files
config.json ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_commit_hash": null,
3
+ "_name_or_path": "./ELECTRA-marian-training",
4
+ "architectures": [
5
+ "EncoderDecoderModel"
6
+ ],
7
+ "decoder": {
8
+ "_name_or_path": "Helsinki-NLP/opus-mt-en-nl",
9
+ "_num_labels": 3,
10
+ "activation_dropout": 0.0,
11
+ "activation_function": "swish",
12
+ "add_bias_logits": false,
13
+ "add_cross_attention": true,
14
+ "add_final_layer_norm": false,
15
+ "architectures": [
16
+ "MarianMTModel"
17
+ ],
18
+ "attention_dropout": 0.0,
19
+ "bad_words_ids": [
20
+ [
21
+ 67027
22
+ ]
23
+ ],
24
+ "bos_token_id": 0,
25
+ "chunk_size_feed_forward": 0,
26
+ "classif_dropout": 0.0,
27
+ "classifier_dropout": 0.0,
28
+ "cross_attention_hidden_size": null,
29
+ "d_model": 512,
30
+ "decoder_attention_heads": 8,
31
+ "decoder_ffn_dim": 2048,
32
+ "decoder_layerdrop": 0.0,
33
+ "decoder_layers": 6,
34
+ "decoder_start_token_id": 67027,
35
+ "decoder_vocab_size": 67028,
36
+ "diversity_penalty": 0.0,
37
+ "do_sample": false,
38
+ "dropout": 0.1,
39
+ "early_stopping": false,
40
+ "encoder_attention_heads": 8,
41
+ "encoder_ffn_dim": 2048,
42
+ "encoder_layerdrop": 0.0,
43
+ "encoder_layers": 6,
44
+ "encoder_no_repeat_ngram_size": 0,
45
+ "eos_token_id": 0,
46
+ "exponential_decay_length_penalty": null,
47
+ "finetuning_task": null,
48
+ "forced_bos_token_id": null,
49
+ "forced_eos_token_id": 0,
50
+ "id2label": {
51
+ "0": "LABEL_0",
52
+ "1": "LABEL_1",
53
+ "2": "LABEL_2"
54
+ },
55
+ "init_std": 0.02,
56
+ "is_decoder": true,
57
+ "is_encoder_decoder": false,
58
+ "label2id": {
59
+ "LABEL_0": 0,
60
+ "LABEL_1": 1,
61
+ "LABEL_2": 2
62
+ },
63
+ "length_penalty": 1.0,
64
+ "max_length": 512,
65
+ "max_position_embeddings": 512,
66
+ "min_length": 0,
67
+ "model_type": "marian",
68
+ "no_repeat_ngram_size": 0,
69
+ "normalize_before": false,
70
+ "normalize_embedding": false,
71
+ "num_beam_groups": 1,
72
+ "num_beams": 4,
73
+ "num_hidden_layers": 6,
74
+ "num_return_sequences": 1,
75
+ "output_attentions": false,
76
+ "output_hidden_states": false,
77
+ "output_scores": false,
78
+ "pad_token_id": 67027,
79
+ "prefix": null,
80
+ "problem_type": null,
81
+ "pruned_heads": {},
82
+ "remove_invalid_values": false,
83
+ "repetition_penalty": 1.0,
84
+ "return_dict": true,
85
+ "return_dict_in_generate": false,
86
+ "scale_embedding": true,
87
+ "sep_token_id": null,
88
+ "share_encoder_decoder_embeddings": true,
89
+ "static_position_embeddings": true,
90
+ "task_specific_params": null,
91
+ "temperature": 1.0,
92
+ "tf_legacy_loss": false,
93
+ "tie_encoder_decoder": false,
94
+ "tie_word_embeddings": true,
95
+ "tokenizer_class": null,
96
+ "top_k": 50,
97
+ "top_p": 1.0,
98
+ "torch_dtype": null,
99
+ "torchscript": false,
100
+ "transformers_version": "4.23.0.dev0",
101
+ "typical_p": 1.0,
102
+ "use_bfloat16": false,
103
+ "use_cache": true,
104
+ "vocab_size": 67028
105
+ },
106
+ "decoder_start_token_id": 0,
107
+ "encoder": {
108
+ "_name_or_path": "google/electra-small-discriminator",
109
+ "add_cross_attention": false,
110
+ "architectures": [
111
+ "ElectraForPreTraining"
112
+ ],
113
+ "attention_probs_dropout_prob": 0.1,
114
+ "bad_words_ids": null,
115
+ "bos_token_id": null,
116
+ "chunk_size_feed_forward": 0,
117
+ "classifier_dropout": null,
118
+ "cross_attention_hidden_size": null,
119
+ "decoder_start_token_id": null,
120
+ "diversity_penalty": 0.0,
121
+ "do_sample": false,
122
+ "early_stopping": false,
123
+ "embedding_size": 128,
124
+ "encoder_no_repeat_ngram_size": 0,
125
+ "eos_token_id": null,
126
+ "exponential_decay_length_penalty": null,
127
+ "finetuning_task": null,
128
+ "forced_bos_token_id": null,
129
+ "forced_eos_token_id": null,
130
+ "hidden_act": "gelu",
131
+ "hidden_dropout_prob": 0.1,
132
+ "hidden_size": 256,
133
+ "id2label": {
134
+ "0": "LABEL_0",
135
+ "1": "LABEL_1"
136
+ },
137
+ "initializer_range": 0.02,
138
+ "intermediate_size": 1024,
139
+ "is_decoder": false,
140
+ "is_encoder_decoder": false,
141
+ "label2id": {
142
+ "LABEL_0": 0,
143
+ "LABEL_1": 1
144
+ },
145
+ "layer_norm_eps": 1e-12,
146
+ "length_penalty": 1.0,
147
+ "max_length": 20,
148
+ "max_position_embeddings": 512,
149
+ "min_length": 0,
150
+ "model_type": "electra",
151
+ "no_repeat_ngram_size": 0,
152
+ "num_attention_heads": 4,
153
+ "num_beam_groups": 1,
154
+ "num_beams": 1,
155
+ "num_hidden_layers": 6,
156
+ "num_return_sequences": 1,
157
+ "output_attentions": false,
158
+ "output_hidden_states": false,
159
+ "output_scores": false,
160
+ "pad_token_id": 0,
161
+ "position_embedding_type": "absolute",
162
+ "prefix": null,
163
+ "problem_type": null,
164
+ "pruned_heads": {},
165
+ "remove_invalid_values": false,
166
+ "repetition_penalty": 1.0,
167
+ "return_dict": true,
168
+ "return_dict_in_generate": false,
169
+ "sep_token_id": null,
170
+ "summary_activation": "gelu",
171
+ "summary_last_dropout": 0.1,
172
+ "summary_type": "first",
173
+ "summary_use_proj": true,
174
+ "task_specific_params": null,
175
+ "temperature": 1.0,
176
+ "tf_legacy_loss": false,
177
+ "tie_encoder_decoder": false,
178
+ "tie_word_embeddings": true,
179
+ "tokenizer_class": null,
180
+ "top_k": 50,
181
+ "top_p": 1.0,
182
+ "torch_dtype": null,
183
+ "torchscript": false,
184
+ "transformers_version": "4.23.0.dev0",
185
+ "type_vocab_size": 2,
186
+ "typical_p": 1.0,
187
+ "use_bfloat16": false,
188
+ "use_cache": true,
189
+ "vocab_size": 30522
190
+ },
191
+ "is_encoder_decoder": true,
192
+ "max_length": 512,
193
+ "model_type": "encoder-decoder",
194
+ "pad_token_id": 0,
195
+ "torch_dtype": "float32",
196
+ "transformers_version": null
197
+ }
predictions.txt ADDED
@@ -0,0 +1,1805 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ if self. _ leftover : : : : : :
2
+ if instance is not none : : : : :
3
+ block = first [ : - 1 ] [ 1 : ]
4
+ else : : :
5
+ if self. verbosity > = 1 :
6
+ offsetupa ='if'in _ offset ','inm _ union _ union': 2 :
7
+ def validate ( self, value ) :
8
+ self. can _ read. release ( )
9
+ _ _ contains _ _ = has _ header
10
+ if self. feed ['ttl'] is not none :
11
+ def render ( self, context ) : ( self
12
+ import datetime
13
+ if size : : :
14
+ raise typeerror ( " non - integer input input input input. " )
15
+ def size ( self, name ) :
16
+ new _ ip = ip _ str. split (':')
17
+ from decimal import decimal, decimalexception
18
+ except attributeerror : : : : : : :
19
+ from django. core import signing
20
+ _ _ y = r'(? p < year > \ d { 4 }')'_ _
21
+ value = self. pop ( key, default )
22
+ if constant _ time _ compare ( sig, self. signature ( value ) ) :
23
+ return tempdir
24
+ raise templatesyntaxerror ( "'templatetag'statement takes one argument " )
25
+ p _ pattern = pattern. regex. pattern
26
+ if command. verbosity > 1 :
27
+ else : : :
28
+ style = commands. split ( ',')
29
+ if isinstance ( s, promise ) :
30
+ return [ ( valuejjjjjjjjjj (jjjjjjjjjjjjjjj ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (j (j (j ( ( ( ( ( ( ( ( ( ( (jjjj (j (jjjjj (j (j (jjjjjjjjj (j (j ( ( (j
31
+ if options ['outlog'] :
32
+ raise templatesyntaxerror ( "'only'' is not allowed'"'% cycle )
33
+ parser. add _ argument ('- - - no - nocated ', action ='store _ true ', dest ='store
34
+ full _ module _ name = package _ name + '.'+ module _ name
35
+ statements = sql _ all ( app _ config, self. style, connection )
36
+ handler. name = name
37
+ return new _ value
38
+ current = getattr ( current, bit )
39
+ self. use _ natural _ foreign _ keys = options. pop ('use _ natural _ primary _ keys ', false )
40
+ pass
41
+ except attributeerror : : : : : : :
42
+ def with _ metaclass ( meta, * bases ) :
43
+ name = [ commands. update ( app _ config _ name ) for name in _ name ]
44
+ def attach ( self, filename = none, content = none, mimetype = none ) :
45
+ def load _ command _ class ( app _ name, name ) :
46
+ url = quote ( url, safe = b'| \'(? + [ ] + $ ) *? + $ / (
47
+ for ioir in dirs :
48
+ _ fields _ = [ ('_ offset ','_ offset ', none ) ]
49
+ return self. render ( )
50
+ renderer = checkboxfieldrenderer
51
+ field _ name = force _ text ( field _ name, encoding, errors ='replace')
52
+ def initial _ form _ count ( self ) : ( self )
53
+ continue
54
+ def _ _ init _ _ ( self, language, deactivate = false ) :
55
+ raise templatesyntaxerror ( " invalid arguments provided to simple _ tag " )
56
+ _ format _ cache [ cache _ key ] = val
57
+ from django. utils. encoding import python _ 2 _ unicode _ compatible
58
+ widget = urlinput
59
+ def _ _ init _ _ ( self, data = none ) :
60
+ signal ='signals''
61
+ return bool ( ret )
62
+ from django. core. exceptions import improperlyconfigured
63
+ preview = {'3': str ( color _ names ),'3': color _ names }
64
+ return " < deserializedobject : % s. % s = % s > " % ( pk, self. _ meta, e
65
+ parser. add _ argument ('- - extension ','- e ', dest ='store _ true ', dest =
66
+ @ register. filter ( is _ safe = false )
67
+ if response. streaming : : : :
68
+ words = force _ split ( text ). split ( text _ split _ re )
69
+ def parse _ date _ safe ( self, * * kwargs ) :
70
+ from xml. payload import handler
71
+ use _ natural _ keys = options. get ('use _ natural _ foreign _ keys')
72
+ return regexurlresolver ( r'^ / ', [ ] )
73
+ return timedelta ( 0 )
74
+ self. loaddata ( fixture _ labels )
75
+ def _ _ setitem _ _ ( self, key, value ) : _ _
76
+ pass
77
+ except unicodedecodeerror :ror : : : :
78
+ self. instance = opts. model ( )
79
+ name varargs, * * * kwargs : : ( ( ( ( ( ( var var ( var ( var ( var ( * var * var ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( label ( label ( ( var ( var ( var ( var ( var ( var ( varset varset * varset * varset * varset * varset * varset * varset * varset * varset * varset * varset * varset * varset * varset * varset * varset * varset * varset * varset * varset * varset * varset * varset * varset *set *set * varset *set *set *set
80
+ raise commanderror ('unknown application in excludes : % s'% exclude )
81
+ self. data = data or { }
82
+ from _ _ future _ _ import unicode _ literals
83
+ if form. cleaned _ data and field. cleaned _ data [ field ] is not none :. cleaned _ data
84
+ key = self. make _ key ( key, version = version )
85
+ primary _ keys = [ ]
86
+ self. _ populate ( )
87
+ alters _ data = true
88
+ if value is not result :
89
+ if command. use _ argparse : :
90
+ return attrs. exc _ info [ 2 ]
91
+ if num > self. _ max _ entries :
92
+ strip _ entities = allow _ lazy ( strip _ entities, six. text _ type )
93
+ return self. strptime ( value, format )
94
+ parser : * * * * class class
95
+ from django. core. management. sql import sql _ delete
96
+ i. append ( self. _ deleted _ form _ indexes )
97
+ if args [ - 1 ]! = " silent " : [ - 1 ] [ - 1 ]! = "
98
+ self. _ unget _ history = [ ]
99
+ elif not isinstance ( file _ name, six. string _ types ) and isinstance ( file _ name, six. string ) :
100
+ form = managementform ( auto _ id = self. auto _ id, prefix = self. prefix, prefix = self. prefix )
101
+ if isinstance ( receiver, types. functiontype ) : :
102
+ def _ _ text _ cast ( self ) :
103
+ else : : :
104
+ del delete ( key, version = version )
105
+ from _ _ future _ _ import unicode _ literals
106
+ def urlizec ( value, limit, autoescape = none ) :
107
+ return false
108
+ if self. can _ delete :
109
+ nodelist _ tag = parser. parse ( ('else ', end _ tag ) )
110
+ from django. utils. safestring import mark _ safe
111
+ def stringformat ( value, arg ) :
112
+ guessed _ filename = params. get ('filename ', none )
113
+ return self. text
114
+ import os
115
+ return lazy _ number ( ungettext, six. text _ type, singular = singular, plural = plural, plural = plural _ number = none
116
+ open _ tags = [ ]
117
+ if name is none : : : : :
118
+ self. blocks = defaultdict ( defaultdict )
119
+ return none
120
+ clean = lambda self, x : len ( x )
121
+ apps. get _ model ('auth ','permission')
122
+ template _ with _ clear ='% ( clear ) s > = " % clear ( clear _ checkbox _ id ) s " % ( label )
123
+ def invalid _ block _ tag ( self, token, command, parse _ until = none ) :
124
+ except importerror : : : : :
125
+ @ register ( ( ( value, * * * * * * * kw * kwargs ( ( * kw * kw * kw * kw * kw * ( ( ( ( ( ( ( * ( ( * ( * ( * ( ( ( ( ( * ( * ( ( ( * ( * ( ( ( * ( * ( * ( * ( * types ( * types *
126
+ def pretty _ name ( name ) : ( name )
127
+ while len ( line ) < max _ width : :
128
+ pass
129
+ data _ value = data if data if data is not none else [ ]
130
+ _ ( _ model _ ( value _ ( value ) : ( ( ( ( * ( * db * db * db * * * *
131
+ response = none
132
+ fk _ name = _ get _ foreign _ key ( parent _ model, model, fk _ name = fk _ name )
133
+ self. unlink ( self. name )
134
+ chunk = stream. read ( max _ header _ size )
135
+ for label in app _ labels : :
136
+ fixture. close ( )
137
+ if len ( val1 )! = val2 : : : :
138
+ else : : :
139
+ return'\ n '. join ( output )
140
+ default _ validators = [ validators. validate _ ipv4 _ address ]
141
+ except lookup ( e, e ) : as e :
142
+ from functools import wraps
143
+ self. urlconf _ module = self. urlconf _ name
144
+ pass
145
+ remaining - = len ( emi )
146
+ memo = { }
147
+ indent = options. get ('indent')
148
+ def _ _ init _ _ ( self, regex ) :
149
+ help =''
150
+ last = self. data. day ( 10 )
151
+ for location in format _ locations :
152
+ raise valueerror ( " unable to convert convert % r " % value )
153
+ def recipients ( self ) : ( self
154
+ six. reraise ( unreadableposterror, unreadableposterror ( * e. args, * * kwargs
155
+ for fname in filelist :
156
+ return lang _ lang [ generic _ lang _ code ]
157
+ return metaclass ('temporary _ class ', none )
158
+ for k, v in kwargs. items ( ) :
159
+ if options ['clear'] : :
160
+ def get _ internal _ wsgi _ application ( ) :
161
+ for lineno, line in enumerate ( content. splitlines ( true ) ) :
162
+ def contains ( source, inst ) : ( source, ext )
163
+ def _ _ get _ _ ( self, * args, * * kwargs ) :
164
+ if pathext is none : is none : : :
165
+ else :
166
+ _ _ all _ _ = ('wsgiserver ','wsgireler')
167
+ except exception : : : :
168
+ error _ dict = self. setdefault ( error _ errors )
169
+ with open ( old _ file _ name, bytes ) as f :
170
+ parser. add _ argument ('- - true ', action ='store _ true ', dest ='interactive ', dest
171
+ try :
172
+ idstring = '.'+ idstring
173
+ return self. filter ( name, func, * * flags )
174
+ if len _ values < 1 :
175
+ pass
176
+ self. file. seek ( 0 )
177
+ if link is not none : is not none : :
178
+ except stopupload as e : :
179
+ super super ( opentimetimetimetime, self. index _ name, self. stream _ name, model _ method = model _ method, * *
180
+ else : : :
181
+ from django. forms import form
182
+ if text [ 0 ] in'0':
183
+ inner _ html ='< ul { } {'{'{'} > { } > '. '
184
+ def _ get _ size _ from _ files ( self ) :
185
+ from django. utils. six. moves. urllib. parse import urlparse
186
+ self. _ stream = stream
187
+ return header ( value,'utf - 8'). encode ('utf - 8 ', maxsize ='utf
188
+ self. seconds = parser. expression ( bp )
189
+ toxtext = match. group ( argtt )
190
+ else : :
191
+ else : : :
192
+ super ( jsonresponse, self ). _ _ init _ _ ( content, content = none, use _ type = none,
193
+ length = int ( arg )
194
+ logger. configure _ logger ( name, name [ name ], true )
195
+ if start > up : : : : : : :
196
+ def compile _ messages ( self, locations ) :
197
+ excluded _ apps. add ( app _ config )
198
+ return self. event _ entityr ('tag : ya. org, but )
199
+ known _ models = [ ]
200
+ run _ syncdb = false
201
+ class pylibmccache ( basememcachedcache ) :
202
+ import re
203
+ try : : : :
204
+ return''. join ( [ f. join ( l ) for l in a bytes ( l ) ] )
205
+ return lang _ code
206
+ elif '. join ( level ) = = level : :
207
+ self. _ raw _ ipv6 = false
208
+ default _ validators = [ validators ]. urlvalidator ( )
209
+ if item ['unique _ id'] is not none : : : : : : : : : : : : :
210
+ return formats. time _ format ( value, arg )
211
+ import warnings
212
+ class referenceslocalzone ( tzinfo ) :
213
+ cleaned = self. clean ( value )
214
+ from django. utils import six
215
+ color _ names = ('white ','red ','red ','jan ','jan ','2 ', '
216
+ if language _ code not in self. _ regex _ dict :
217
+ def _ make _ parser ( self ) : ( self )
218
+ from django. core. exceptions import validationerror
219
+ return instance
220
+ if context _ separator in result : : : :
221
+ iterator = object
222
+ if indent : : : : :
223
+ def z ( self ) : ( self ( )
224
+ self. current _ app = current _ app
225
+ name = args [ 1 ]
226
+ html _ class _ attr ='' =
227
+ list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list listvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvarvar list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list list
228
+ from module _ _ future _ _ import unicode _ literals
229
+ import sys
230
+ def static ( request ) : ( request ( request )
231
+ from django. utils import six
232
+ class dummycache ( basecache ) :
233
+ if getattr ( e,'dryrror ','errno')! ='errno':
234
+ from django. conf import settings
235
+ want _ unicode = true
236
+ msgs = self. copy _ plural _ forms ( msgs, locale )
237
+ getattr ( request,'language _ code ', get _ language ( ) )
238
+ return int ( timeout )
239
+ def _ _ _ in ( _ _ _ ( _ _ _ con configs, * * options * options * options * options : defaults ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (
240
+ self. _ fname = none
241
+ raise typeerror ('% s'% ( optg ) s'% ( opt )
242
+ if self. cc : : :
243
+ for k, v in ret. items ( ) :
244
+ return mark _ safe (''. join ( mark _ safe ( bits ) )
245
+ return django. add _imcoer. add _imer ( decimal. decimal, djangosasaioner. form _ decimal )
246
+ self. error _ data = rawdata [ i : i : ]. error ( )
247
+ def _ _ exit _ _ ( self, exc _ type, exc _ value, traceback ) :
248
+ field _ desc ='% s % s % ( field _ params. items ( )')
249
+ ctx = hashlib ( k2 )
250
+ if current _ chunk = ('' ) :
251
+ loop _ dict ['first'] = true
252
+ data _ data = content _ type + options ['content - type']
253
+ def pop ( self, k, * args ) :
254
+ def add _ text ( self, parser ) : _ text ( self, * * options ) :
255
+ parser. add _ argument ('label ', defaults ='interactive ', defaults = default _ true, defaults = defaults
256
+ chars ='radiodefnofqjkqjkqvqrstrstrst'* (? + + + + + +
257
+ digits = len ( digittuple )
258
+ _ _ version _ _ = " 0. 1 "
259
+ self. max _ expr = max _ expr
260
+ class deserializationerror ( exception ) :error ( )
261
+ if autoescape : : : :
262
+ def force _ bytes ( s, encoding ='utf - 8 ', strings _ only = false, errors ='strict') :
263
+ except variabledoesnotexist : :
264
+ def as _ meta ( self ) : _ ( re. compile ( r'" ^ (? 2, 2 } ) > " [ "
265
+ data = self. form. initial. get ( self. name, self. name )
266
+ signals. request _ finished. connect ( cache. close )
267
+ return none
268
+ return object. file. geterator ( )
269
+ prefix = settings. media _ url
270
+ symlink _ path = os. path. join ( tmpdir,'symlink')
271
+ def render ( self, context ) : ( self
272
+ use _ natural _ keys _ keys = options. get ('use _ natural _ primary _ keys')
273
+ def inner ( self, * args ) : ( self, * * args )
274
+ if': :'not in ip _ str and not number (': ',':')! =': '
275
+ parser. add _ argument ('args ', metavar ='app _ label ', help ='app _ label ', help
276
+ if os. path. exists ( django _ po ) :
277
+ now = datetime. now ( )
278
+ kwzinfo = kwargs. get ( kw )
279
+ raise validationerror ( self. error _ messages ['list'], code ='list')
280
+ class adfasthandler ( logging. handler ) :
281
+ t = select _ template ( template _ name, dirs )
282
+ if value in self. empty _ values and self. required :. required :
283
+ except typeerror :ror : : : :
284
+ from io import bytesio
285
+ statement = property ( lambda self : self. file. tell )
286
+ continue
287
+ parser. delete _ first _ token ( )
288
+ class class ur urformsfield'; class _ class _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
289
+ import fcntl
290
+ if can _ fail : : : : :
291
+ if template _ source _ loaders is none :
292
+ callback = pattern. _ callback
293
+ return callosity ('verbosity ', self ). _ _ init _ _ ('loadosity ', * * args, * * * * *
294
+ if value is none : is none : : : :
295
+ return int ( value ) ( ( value )
296
+ elif'='= part in part :
297
+ compare _ to = [ var. resolve ( context, true ) ]
298
+ def to _ python ( self, value ) :
299
+ elif isinstance ( value, decimal. decimal, float ) or six. integer _ types ) :
300
+ @ contextlib. contextmanager
301
+ if event. path. endswith ( '. mo') :. path. startswith ( '.')
302
+ if node. must _ be _ first and nodelist : : :
303
+ return false
304
+ self. auto _ id = auto _ id
305
+ def rss _ attributes ( self ) :
306
+ value = ungettext _ lazy ('ensure this value has'% ( limit _ value ) d ( limit _ value ) d 1 (
307
+ if six. py3 : :
308
+ for k, v in six. iteritems ( self ) :
309
+ pass
310
+ def b64 _ hmac ( salt, value, key ) :
311
+ del _ active. value
312
+ for basedir in basedirs : :
313
+ else : : :
314
+ full _ path = self. path ( name )
315
+ if not self. form. is _ bound : :
316
+ del self. dicts [ key ] [ - 1 ] [ key ] [ 1 ] [ 1 ]
317
+ self. reader _ leaves ( )
318
+ def model _ model ( model ( model : re : re. compile (? (? : (?????????? :
319
+ class widget ( six. with _ metaclass ( mediaclass ) ) : ( data _ meta
320
+ get _ language = lambda settings. language _ code
321
+ from django. utils. six. moves. urllib. parse import urlsplit, urlunlit
322
+ from email. mime. text import mimetext
323
+ self. fed = [ ]
324
+ class minlengthvalidator ( basevalidator ) :
325
+ self. lookups = none
326
+ raise typeerror ( " if flags isinstance ( flags, regex = " " ) )
327
+ return default
328
+ attrs = attrs. get ('step ', )
329
+ import sys
330
+ break
331
+ value =''
332
+ to _ delete. add ( model )
333
+ file _, _, _ = imp. find _ module ( module _ name, [ entry ] )
334
+ self. _ cache = _ caches. setdefault ( name, { } )
335
+ html4 _ singlem = ('link ','input ','link ','link ','input ','input '
336
+ if template _ dir is none : : : :
337
+ def make _ key ( self, key, version = none ) :
338
+ return self. _ _ name
339
+ if not match : : : :
340
+ def to _ python ( self, value ) : ( self, * *
341
+ def lower ( value ) : ( value ( value )
342
+ ip = ip ( )
343
+ connection = connections [ database ]
344
+ def _ format _ value ( self, value ) :
345
+ parser. _ header ( boundary ('ascii') )
346
+ initial = self. initial. get ( name, none )
347
+ from django. utils import six
348
+ if data in self. children : : :
349
+ elif isinstance ( timezone, six. string _ types ) and pytz is not none :
350
+ @ register. filter ( is _ safe ( t. filter ( ) ) )
351
+ status _ code = 500
352
+ if i > = self. initial _ form _ count ( ) > = self. initial _ form _ count ( ) :
353
+ return int ( int ( ) [ 0 ] )
354
+ if is _ ignored ( file _ path, self. ignore _ patterns ) :
355
+ if app _ config. models _ module is none or app _ config in excluded _ apps :
356
+ return code
357
+ chunks = ( initial, tuple ) ( )
358
+ else : : :
359
+ message = e
360
+ class valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid valid
361
+ rest = value
362
+ raise suspiciousfileoperation ( " tried to'% s''. " % name )
363
+ hidden _ widget = splithiddentimewidget
364
+ for node in compiled _ parent. nodelist :
365
+ if isinstance ( template _ name, ( list, tuple ) ) : :
366
+ def get _ str _ from _ wsgi ( environ, key, default ) :
367
+ return model. check ( * * kwargs for model in apps. get _ models ( * * kwargs ) )
368
+ def initial _ form _ count ( self ) :
369
+ def j ( self ) : ( self ( )
370
+ pass
371
+ if format not in _ serializers :
372
+ if len ( tzinfo ) > 2 : ( tzinfo )! 1 :
373
+ return false
374
+ if not content _ type : : :
375
+ elif'help':. get ('help ','- version ','store') :
376
+ return ip _ str
377
+ else : : :
378
+ class httpresponsenbidbidden ( httpresponse ) :
379
+ return
380
+ nodes. append ( self )
381
+ if instance : :
382
+ if ipxtet [ - 1 ]! =':':
383
+ for app _ dir in app _ dirs :
384
+ warning = 50
385
+ os. chdir ( our _ home _ dir )
386
+ config ['mail'] = self. as _ tuple ( config ['mail'] )
387
+ obj. widgets = copy. deepcopy ( self. widgets )
388
+ yield buf. read ( data, fileobj )
389
+ if not isinstance ( self. regex, six. string _ types ) :
390
+ if hasattr ( timezone,'normalize') :
391
+ from django. utils import termcolors
392
+ except ( ssl. sslerror, smtplib. smtpver ) :. smtpror
393
+ self. stdout. write ('unknown file % s in % s \ n'% filename, dirpath ). write (
394
+ default _ settings = module _ to _ dict ( global _ settings )
395
+ self. importer ( used )
396
+ def decorting _ function ( user _ function ) : ( )
397
+ pass
398
+ key = self. to _ field _ name if key :. _ field _ name else'pk '
399
+ for cache [ key ] = cache [ key ]
400
+ return false
401
+ from django. utils import six
402
+ if self. is _ reversed : : : : :
403
+ for line in text. splitlines ( true ) :
404
+ return value
405
+ return self. forms [ index ]
406
+ if isinstance ( path, six. string _ types ) :
407
+ all _ models = [ ]
408
+ truncate _ text = self. add _ truncation _ text ('', truncate )
409
+ help = " prints the sql sql statements for the given migration migration. " " ". ". ". ". "
410
+ initial = [ ]
411
+ value = arg. replace ( arg )
412
+ ipv6 = httpd _ cls ( server _ address, wsgirequesthandler, ipv6 = none )
413
+ _ urllib _ request _ moved _ attributes = [ six. _ moved _ attributes ]
414
+ def empty _ form ( self ) :
415
+ def handle ( self, * args, * * options ) :
416
+ other _ dict = args
417
+ if params ['filename'] : : : : :
418
+ try :
419
+ raise templatesyntaxerror ( "'% s'is not a valid tag library : % s " % ( tag, e ) )
420
+ _ translations. _ unicode ( language )
421
+ c = subject [ i ]
422
+ return ifattr ( nodelist _ true, * * options )
423
+ from django. core. management. base import basecommand, commanderror
424
+ _ version = " 0. 255 "
425
+ finally :
426
+ guessed _ path = os. path. join ( tempdir, guessed _ filename )
427
+ else : : :
428
+ value = '. '. join ( parts )
429
+ def _ _ init _ _ ( self ) :
430
+ class rssfsf0feed ( rssfeed ) :
431
+ new _ filenames. append ( path. join ( dirpath,'/') )
432
+ output. add _ argument ('label - list ', dest ='interactive ', dest ='interactive ', dest = none
433
+ urlconf = settings. root _ urlconf
434
+ return ['' ], [ ] ]
435
+ else : : :
436
+ continue
437
+ def dec ( func ) : ( func ( )
438
+ if old _ attr is none : : :
439
+ name, val = forbid _ multi _ line _ headers ( name, val, self. encoding )
440
+ class input ( widget ) : ( class class
441
+ handler. startelement ( " stream ", self. root _ attributes ( ) )
442
+ opts = ( s ) for s in style. get ( opt _ dict )
443
+ warnings. warn ( " django. utils. tzinfo. fixedoffset will be removed in django 1. 9. ", removed
444
+ self. fixture _ object _ count = 0
445
+ extra _ classes. add ( self. form. required _ css _ class )
446
+ from django. utils import six
447
+ def random ( self, data ) : ( )
448
+ try :
449
+ if os. path. exists ( new _ path ) :
450
+ class lexer ( object ) : ( object ) ( object
451
+ error _ messages = opts [ non _ field _ errors ]
452
+ self. _ table = table
453
+ return _ trans. to _ locale ( language )
454
+ temp _ extract = tempfile. mktpp ( prefix = prefix, suffix ='_ extract')
455
+ tt = ( ( 10006, [ : ] ) )
456
+ except exception as e : :
457
+ def _ _ iter _ _ ( self ) :
458
+ else : : :
459
+ os. chmod ( full _ path, self. file _ permissions _ mode )
460
+ for fname in glob. glob1 ( self. _ dir, dir ) :
461
+ for log in existing :
462
+ for app _ label in app _ labels :
463
+ return fastcgi _ help ( " invalid interactive of host, port, socket. " )
464
+ def as _ widget ( self, data, * * kwargs ) :
465
+ return
466
+ single _ brace _ end ='} '
467
+ def as as as as as as :
468
+ self. extend ( conditionalbox _ id, * * options )
469
+ else : : :
470
+ if self. interactive : : : :
471
+ yield safe _ join ( template _ dir, template _ name )
472
+ if delta < 0 : : :
473
+ def error ( self, message ) :
474
+ return template _ name
475
+ def update _ watch ( sender = none, * * kwargs ) :
476
+ else : : : version version version : version
477
+ val2 = self. var2. resolve ( context, true )
478
+ class nullbooleolect ( select select ) : ( )
479
+ if not isinstance ( value, ( bytes, six. text _ type ) ) :
480
+ parser. add _ argument ('- - noinput ', action ='store _ false ', dest ='store _ false
481
+ return default
482
+ try :
483
+ msguniq _ options = ['- - to - code = utf - 8']
484
+ if self. locale _ paths : : : :
485
+ version = get _ complete _ version ( version )
486
+ return mark _ mark _ only (':':': ','\ n ',':':':':': s : :
487
+ ns = " http : / / http. w3. 8 / atom / atom / atom " "
488
+ else :
489
+ app _ dir = os. path. join ( app _ config. path,'fixtures')
490
+ from gzip import gziile
491
+ self. active _ writers = 0. active ( )
492
+ raise valueerror ( " - base36 input input input. " )
493
+ def _ _ eq _ _ ( self ) :
494
+ try :
495
+ tag, self. lasttag = match. get ( match )
496
+ else : : :
497
+ secret = settings. secret _ key
498
+ project _ name, target = options. pop ('name ','* options')
499
+ logger = logging. getlogger ('django. request')
500
+ tmpdir = tempfile. mktpp ( )
501
+ def handle _ m2m ( value ) : ( value _ m2m ( value )
502
+ except importerror as e : : : : :
503
+ self. stdout. write ( " no extensionss. " ). write ( " no nogs. ". "
504
+ _ threadmodule = movedmole ( " _ thread ", " thread _ thread " )
505
+ locale = options. get ('locale')
506
+ self. cookies [ key ] = cookie _ date ('enter')
507
+ if isinstance ( f, models. filefield ) : :
508
+ os. unlink ( work _ file )
509
+ def as _ meta (? : : ( (? (? :? :
510
+ import time as _ time
511
+ raise commanderror ( " django doesn't have have have have have by have sql for \ n " " " )
512
+ if self. verbosity > 0 :
513
+ def delete ( self, key, version = none ) : ( self, key, version
514
+ if representative is none : : : : :
515
+ self. language = language
516
+ callable = callable
517
+ iteritems = _ iteritems
518
+ continue
519
+ syil = " % 02d " % dt. year. year
520
+ m = re. match ( lazy _ re, self. feed ['addrport'] )
521
+ if isinstance ( template, ( list, tuple ) ) :
522
+ def _ _ exit _ _ ( self, exc _ type, exc _ value, tb ) :
523
+ yield " from _ from _ _ import unicode _ literals "
524
+ try :
525
+ if timeout is none : : : :
526
+ def end _ serialization ( self ) :
527
+ if att _ name = ='id'and extra _ params = = {'primary _ key': true,'primary _ key
528
+ try :
529
+ parser. add _ argument ('- - clear ', action ='store _ true ', dest ='store _ true ',
530
+ class disallowelowedict ( suspiciousoperation ) :
531
+ else : : :
532
+ raise commanderror ( " you must provide at least one label one label - empty. " )
533
+ i = 0
534
+ if value and hasattr ( value,'url') :
535
+ self. validate _ key ( key )
536
+ if i > = 0 : > 0 : > = 0 : :
537
+ elif self. get ('unique') :
538
+ else : : :
539
+ assert not isinstance ( to, six. string _ types ),'to " to be a list or tuple')
540
+ wsgiserver = module. wsgiserver
541
+ def _ createdir ( self ) : ( self
542
+ if message _ context : : : :
543
+ else : : :
544
+ sites = [ ]
545
+ def set ( self, key, value, timeout = default _ timeout, version = none ) :
546
+ def setlistdefault ( self, key, default _ list = none ) :
547
+ self. widget = self. choices
548
+ trim _ re = re. compile ('\ s * \ n \ s *')
549
+ input _ type ='text '
550
+ def _ _ getinigs _ _ ( self ) :
551
+ raise
552
+ location = self. get _ full _ path ( ) +'/ / '
553
+ msgs = msgs. decode ('utf - 8')
554
+ try :
555
+ from django. utils import six
556
+ raise valueerror ('unable to configure handler'''' % r : % s'% ( name, e )
557
+ with self. mutex :
558
+ from django. middleware. csrf import get _ token
559
+ except oserror as e : : :
560
+ value = self. make _ bytes ( value )
561
+ queryset = self. model. _ default _ manager
562
+ if settings. use _ tz and value is not none and timezone. is _ naive ( value ) :
563
+ with transaction. atomic ( using = connection. alias, savepoint = connection. features. can _ rollback ( ) ) :
564
+ if serializers is none : : : :
565
+ return self. find _ template _ cache [ key ]
566
+ def flatten ( self ) : ( self ( )
567
+ def is _ valid _ ipv6 _ address ( ip _ str ) : _ address
568
+ pass
569
+ url = none
570
+ self. _ request _ middleware = none
571
+ import importlib
572
+ self. version = params. get ('version ', 1 )
573
+ if not isinstance ( index, six. integer _ types ) or ( six. integer _ types ) :
574
+ @ register. filter ( is _ safe = false )
575
+ member = [ self. _ archive. getme _ archive ( ) for member in self. _ archive ]
576
+ return obj
577
+ return list ( urlsplit ( url ) )
578
+ else : : :
579
+ raise attributeerror ( " % s could not be " % self. name )
580
+ if self. verbosity > 1 :
581
+ def validate ( self, value ) :
582
+ return self. _ cache. set ( key, value, self. get _ backend _ timeout ( timeout ) )
583
+ from django. utils. six. moves import zip
584
+ self. _ setup ( )
585
+ builtins = [ ]
586
+ except valueerror :ror : : : : : :
587
+ daemon _ logs ['out _ log'] = options ['outlog']
588
+ return
589
+ min _ num _ form _ count ='min _ num _ forms '
590
+ validate _ date _ integer _ list ( regexvalidator, self ). compile _ count _ _ _ list
591
+ def is _ checked ( self ) : ( self )
592
+ return self. management _ form. cleaned _ data [ initial _ form _ count ]
593
+ pass
594
+ for closable in self. _ closable _ objects :
595
+ def _ _ init _ _ ( self, * args, * * kwargs ) :
596
+ from django. forms. fields import field, filefield
597
+ self. file. close ( )
598
+ parts = viewname. split (':')
599
+ raise validationerror ( self. ungettext ( * args, * * kwargs )
600
+ def get _ json _ data ( self, escape _ html = false ) :
601
+ maxsize = int ( 1 < < < 31 )
602
+ yield''
603
+ result. parent = self
604
+ message ='\ r \ n '. replace ('\ n ','\ r'). replace ('\ r ', '
605
+ return 1 < < < 1
606
+ def _ populate ( self ) :
607
+ if not token. contents : : : :
608
+ from django. core import checks
609
+ if len ( parts ) > 1 and parts [ - 1 ] in self. validation _ formats :
610
+ newlines ='\ n '
611
+ def widget _ attrs ( self, widget ) :
612
+ return os. path. join ( os. path. join ( os. path. join ( os. path. join ( os. path,'%
613
+ for field, error _ list in error. items ( ) :
614
+ def _ set _ regex ( self, regex ) :
615
+ if dirname and not os. path. exists ( dirname ) : :
616
+ output _ transaction = true
617
+ return force _ text ( forceettext ( singular, plural, plural ) )
618
+ def add _ prefix ( self, field _ name ) :
619
+ return false
620
+ try :
621
+ original _ path = os. path. join ( tmpdir,'original')
622
+ in _ index = index or ( 3, 3 )
623
+ lexer = lexer _ class ( template _ string, origin )
624
+ self. _ non _ form _ errors = self. error _ class ( )
625
+ if hasattr ( test _ test, " test _ arguments ', " test _ arguments') :
626
+ def _ _ repr ( self, * offset ) :
627
+ if var. endswith ( '.') :
628
+ import json
629
+ options = [ optv + 1 : ]
630
+ fs _ encoding = sys. getfile importfile ( ) or fs. encoding
631
+ if isinstance ( message, validationerror ) : :
632
+ def _ _ init _ _ ( self, stream _ or _ string, * * options ) :
633
+ return _ import _ module ( self. mod )
634
+ continue
635
+ if isinstance ( slots, str ) : :
636
+ self. _ _ starttag _ text = none. _ _ ( )
637
+ return ( b'% s'% ( bytes ) )
638
+ raise unrecozedarchiveformat ( " file a archive not a archive. " )
639
+ self. options. update ( * {'use _ decimal')
640
+ def validate ( self, value ) :
641
+ fail _ message ='created '
642
+ states = { " punct ( " punct ", " punc " : ", " " 0 " : ". contents )
643
+ for item in values :
644
+ def utcoffset ( self, dt ) :
645
+ leave _ locale _ alone = false
646
+ from _ _ future _ _ import unicode _ literals
647
+ def _ _ str _ _ ( self ) :
648
+ start _ ends = str ( rawdata [ k : ] )
649
+ return zipfile. zipfile. read ( self, 0 [ 0 ] ). stlist ( )
650
+ def render ( self, context ) :
651
+ confirm ='please'( yes,'no ', " no " )
652
+ if " \ n ". join ( unicode _ text,'\ 01'). replace ('\ 033 ",'\ 3 '
653
+ widget. is _ localized = self. is _ localized
654
+ klass. deconstruct = deconstruct
655
+ if extend : : :
656
+ connection = connections [ options ['database'] ]
657
+ try :
658
+ warnings. warn ( " no fixture named'% s'found. " % fixture _ name )
659
+ return self. data. replace ( month = 1, day = 1 ). _ _ ( )
660
+ if self. lookups is not none : is not none : is not not none : : :
661
+ init _ path = os. path. join ( migrations _ directory, " _ _ init _ _. py " )
662
+ return value
663
+ value = timezone. normalize ( value )
664
+ @ property
665
+ subject = self. subject
666
+ return'0 '
667
+ super ( loadero, self ). _ _ init _ _ ( display _ name )
668
+ if pos > = last : : : : : :
669
+ from django. conf import settings
670
+ def normalize ( pattern ) : ( pattern ( pattern )
671
+ import operator
672
+ finally :
673
+ def tzname ( self, dt ) : ( self
674
+ if self. allow _ files : : :
675
+ if custom _ sql :
676
+ msg = safemimemultipart ( _ subtype, encoding = self. alternative _ subtype )
677
+ if field in self. cleaned _ data : :
678
+ if args and kwargs :
679
+ builtins. append ( import _ library ( module ) )
680
+ return self. compress ( [ ] )
681
+ def parse _ endtag ( self, i ) :
682
+ import types
683
+ def m ( self ) : ( self ( )
684
+ self. creation _ counter = field. creation _ counter
685
+ attrs = {'model': model
686
+ except ( importerror, attributeerror ) as e :
687
+ def _ _ getitem _ _ ( self, key ) : _ _ _
688
+ if'='= x in x :
689
+ def tell ( self ) : ( self ( self
690
+ raise attributeerror ( " this querydict instance is immutable " )
691
+ @ python _ 2 _ unicode _ compatible
692
+ if jerror (': _ (') > = 0 :
693
+ flags = 0
694
+ target _ app _ labels _ only = false
695
+ class ifchangednode ( node ) :
696
+ return image. open ( file ). prepare ( ). in the file _ name ( )
697
+ if self. selected _ fields is none or field. attname in self. selected _ fields :
698
+ name = self. split _ leading _ dir ( name ) [ 0 ]
699
+ from django. utils import six
700
+ except attributeerror : : : : : : :
701
+ return arg
702
+ return _ trans. get _ language _ from _ path ( path )
703
+ if db. settings _ dic ['atomic _ commands'] and not db. alias :. alias
704
+ class inlineforforssfield ( field ) :
705
+ if is _ aware ( o ) : :
706
+ try :
707
+ self. years = [ : 1 ]. years
708
+ for refto, refs in references. items ( ) :
709
+ from django. core. exceptions import appregistrynotready
710
+ settings. format _ module _ path = settings. format _ module _ path
711
+ if ch in'* *': :
712
+ try :
713
+ else : : :
714
+ if sent : : :
715
+ return http _ cookies. simplecookie ( value ). encode (';')
716
+ nodelist _ empty = parser. parse ( ('endfor ', ) )
717
+ except ( keyerror, attributeerror ) as exc :
718
+ class objectdoesnotexist ( exception ) :
719
+ @ register. filter ( is _ safe = false )
720
+ return iri
721
+ return environ. get ( key, default ). get ( key, default )
722
+ def _ _ init _ _ ( self, lexer ) :
723
+ return timetime. mktime ( self. data. timetuple ( ) )
724
+ try :
725
+ safe _ data = { }
726
+ import stat
727
+ def write _ items ( self, handler ) :
728
+ wrap = allow _ lazy ( wrap, six. text _ type )
729
+ from _ _ future _ _ import unicode _ literals
730
+ for path in paths : :
731
+ sys. stdout. write ( self. main _ help _ text ( ) +'\ n')
732
+ def _ _ init _ _ ( self ) :
733
+ import sys
734
+ def ngettext ( context, singular, plural, number ) : ( context, plural, number
735
+ def reload ( self ) :
736
+ from django. utils. module _ loading import import _ string
737
+ else : : :
738
+ continue
739
+ import warnings
740
+ if exp is not none and exp < time. time ( ) : :
741
+ if t is not none : is not none : : : : : :
742
+ time _ str = time _ str. decode ('utf - 8')
743
+ field _ notes. append ( " field renamed renamed because )
744
+ super ( querydict, self ). _ _ setitem _ _ ( key, value )
745
+ def write _ message ( self, message ) :
746
+ def list ( self ) : ( self ( )
747
+ return mark _ safe ('\ n '. join ( output ) )
748
+ super ( localeregeesolver, self ). _ _ init _ _ ( app _ name, * * kwargs )
749
+ var _ obj = none
750
+ response = middleware. process _ template _ response ( request, response )
751
+ loop _ dict ['counter'] = i + 1
752
+ return size
753
+ if is a elsecicicij :
754
+ if offset isinstance ( offset, offset = true ) : :
755
+ self. _ assert _ mutable ( )
756
+ return int ( values [ 0 ] ) + ch
757
+ import codecs
758
+ try :
759
+ @ register. tag
760
+ result. setformtrip ( formatter )
761
+ memo [ id ( self ) ] = result
762
+ other = other. _ _ cast ( )
763
+ if isinstance ( other, promise ) :
764
+ else : : :
765
+ self. _ cull ( )
766
+ e. args = ( " argument some : % s " % e )
767
+ os. makedirs ( directory )
768
+ raise overflowerror ('dklen large large large')
769
+ return clean _ ipv6 _ address ( value, self. unpack _ ipv4 )
770
+ from importlib import import _ module
771
+ parser. add _ argument ('- - - parse ', dest ='simple _ true ', dest ='interactive ',
772
+ if header _ end = = 1 : : : : : : :
773
+ def b ( s ) : ( s ) ( s ( s
774
+ g = generator. bytesgengenerator ( fp, from _ from _ set = false )
775
+ import unicodedata
776
+ if t. token _ type = = token _ block : : :
777
+ if len ( self. namelist ) > 1 :
778
+ else : : :
779
+ for media in extend : :
780
+ if url : :
781
+ from collections import defaultdict
782
+ now = datetime. datetime ( now, now. year, now. day )
783
+ while i < len ( subject ) and subject [ i ]! = c :
784
+ self. _ changed _ data = [ ]
785
+ yield parse _ boundary _ stream ( sub _ stream, 124 )
786
+ return value. replace ( tzinfo = timezone )
787
+ def _ _ init _ _ ( self, cyclevars, variable _ name = false, silent = false ) :
788
+ if six. py3 : : : : :
789
+ return value. strftime ( format )
790
+ daemon _ logs ['err _ log'] = options ['errl']
791
+ for migration _ name in migration _ names : :
792
+ from itertools import chain
793
+ return obj _ dict
794
+ buffer _ = line
795
+ raise valueerror ( " key'% s'not found " % key )
796
+ if self. _ request _ middleware is none :
797
+ def render ( self, name, value, attrs = none ) :
798
+ type = raw
799
+ type = file
800
+ tok ='" ', ','"')
801
+ condition = templateifser ( parser, bits ). parse ( bits [ 2 ] )
802
+ return apps. get _ model ( model _ identifier )
803
+ return loader. get _ template ( template )
804
+ def catalog ( ) : ( )
805
+ def handle _ data ( self, d ) :
806
+ def lock ( f, flags ) :
807
+ return force _ text ( template _ string )
808
+ if not os. path. exists ( potfile ) :
809
+ self. active _ writers - = 1
810
+ if hasattr ( self,'_ coerce') :
811
+ return _ trans. templatize ( src, origin )
812
+ def compile _ string ( template _ string, origin ) :
813
+ try :
814
+ raise notimplementederror ('subclasses must provide this method.')
815
+ @ wraps ( func )
816
+ return'\ x000 '. replace ('in value')
817
+ request _ middleware. append ( mw _ instance. process _ request )
818
+ if not boundary or ( cgi. valid _ boundary ( boundary ) ) :
819
+ val = list ( val )
820
+ except valueerror : : : :
821
+ import re
822
+ return allow _ lazy ('', six. text _ type )
823
+ def eval ( self, context ) :
824
+ from django. utils. six import stringio
825
+ self. _ size = size
826
+ errors = [ ]
827
+ if'error _ messages'in kwargs :
828
+ self. _ add _ local _ translations ( )
829
+ class node ( object ) : ( ) ( )
830
+ if os. path. sep in fixture _ name : :
831
+ def _ _ init _ _ ( self, tokens ) : _ _ _
832
+ if primary _ keys : : : : :
833
+ def _ _ mod _ _ ( self, rhs ) :
834
+ except socket. error as e : :
835
+ self. _ _ dict _ _ ['_ setupfunc'] = func
836
+ data = none
837
+ from django. utils. text import get _ valid _ filename
838
+ elif auto _ id : : : : :
839
+ return self. get _ json _ data ( escape _ html )
840
+ self. nodelist _ empty = nodelist ( )
841
+ except validationerror as e : :
842
+ app ='django'='django '
843
+ try :
844
+ return ['' ] = self. add _ truncation _ text ('', truncate ) for char in self. add _
845
+ etags = etag _ match. findall ( etag _ str )
846
+ if field _ type = ='autofield (') :
847
+ c = simplecookie ( )
848
+ attrs = {'model': smart _ text ( obj. _ meta ),'model': true,'model _ text
849
+ return ip _ str. split ( ) [ 1 ]
850
+ def flatten _ result ( source ) :
851
+ if request. _ post _ parse _ error :
852
+ except keyerror :ror : : : : :
853
+ for f in opts. fields :
854
+ set ( set _ ip _ ip in _ _ in _ _ in _ _ in _ _ in _ _ in _ _ in _ _ in _ ( _
855
+ def incr ( self, key, delta = 1, version = none ) :
856
+ if type ( result ) in ( convertingdict, convertinglist, convertingtuple ) :
857
+ message = ', '. join ( ', '.'). join ( message, e )
858
+ comment _ lineno _ cache = none
859
+ else : : :
860
+ result = avoid _ wrapping ( name ) + avoid _ wrapping [ : ]
861
+ values = [ ]
862
+ if hasattr ( field. rel. to. _ default _ manager,'get _ by _ natural _ key') :
863
+ self. dict = ordereddict ( x, none )
864
+ else : : :
865
+ @ register. tag ('filter')
866
+ def _ samefile ( src, dst ) :
867
+ requires _ system _ checks = false
868
+ if not six. py3 ( message,'message') : :
869
+ except keyerror :ror : : : : : :
870
+ try :
871
+ try :
872
+ m = int ( d ) - d ]
873
+ def make _ key ( self, key, version = none ) :
874
+ filemsgg ='file % s,'% origin
875
+ if hasattr ( cls, k ) :
876
+ else : : :
877
+ raise templatesyntaxerror ( " backly with argument " parser " )
878
+ for field _ name in self. fields :
879
+ self. _ upload _ handlers = upload _ handlers
880
+ if options. get ('no _ color ', false ) :
881
+ if self. instance. pk is not none : is not none : is not not not none :
882
+ try :
883
+ return klass
884
+ value = [ ]
885
+ try :
886
+ import time
887
+ raise noreversematch ( " % s is not a registeredpace " % key )
888
+ nodelist. append ( node )
889
+ error _ messages ['invalid'] = error _ messages
890
+ if options. traceback : : : :
891
+ return self. _ choices
892
+ try :
893
+ try :
894
+ try :
895
+ to _ python = self. _ get _ to _ python ( pk _ field )
896
+ self. varlist = varlist
897
+ return encoding
898
+ if now = = = true and not isinstance ( now, datetime. datetime ) :
899
+ if token. contents = ='else':
900
+ return results
901
+ pluralmatch = plural _ re. match ( t. contents )
902
+ for middleware _ method in self. _ exception _ middleware :
903
+ from xml. id. skiputils import xmlgengenerator
904
+ if fields : : : : :
905
+ for c in reversed ( self. _ _ class _ _. _ _ mro _ _ ) :
906
+ from django. utils import six
907
+ return
908
+ return'< % s % s >'% ( self. number, self. paginator )
909
+ else : : :
910
+ default _ error _ messages = {'invalid': _ ('enter a validi'), }
911
+ _ called _ command _ command = false
912
+ if opts. model : : : :
913
+ def copy ( self ) : ( self
914
+ collect = [ ]
915
+ if len ( value )! = 1 :
916
+ self. blocks _ nodes _ by = { nodelist. get _ nodes _ type ( ) for n in nodelist. get _ nodes _ type
917
+ label =''
918
+ old _ attr = name
919
+ ch, escaped = next ( pattern _ iter )
920
+ except ( attributeerror, unsuppppoperation ) :
921
+ raise validationerror ( self. error _ messages ['invalid _ date'], code ='invalid _ date')
922
+ def _ _ init _ _ ( self, request, template, context = none, content _ type = none, none ) :
923
+ if self. field. cache _ choices : : : : :
924
+ def fix _ location _ header ( request, response ) :
925
+ del attr
926
+ pk _ key = " % s - % s " % ( self. add _ prefix ( self. _ prefix ), e. _ name
927
+ from _ _ future _ _ import unicode _ literals
928
+ from _ _ future _ _ import unicode _ literals
929
+ def widget _ attrs ( self, widget ) :
930
+ value = self. to _ python ( value ). strip ( )
931
+ yield line
932
+ self. file. write ( raw _ data )
933
+ self. empty _ label = empty _ label
934
+ templateloader = import _ string ( loader )
935
+ for sql in connection. creation. sql _ for _ pending _ references ( model, style, style ) :
936
+ if response. streaming : : : :
937
+ output. insert ( force _ text ( top _ errors ) + error _ row [ 0 ] )
938
+ @ register. filter ( is _ safe = true )
939
+ raise improperlyconfigured ('loader not a load _ template " )
940
+ new _ value. append ( self. coerce ( choice ) )
941
+ for i in range ( 0, self. total _ form _ count ( ) ) :
942
+ raise noreversematch ( " reverse for'% s'with'% s ', keyword )
943
+ except commanderror : : : : :
944
+ output mark mark _ output ( output : output : " : ( " : ( * tablej : " : ( * tablej : * table :
945
+ response = self. get _ response ( request )
946
+ import django. core. checks. compatibility. django _ 1 _ 0
947
+ escaped = true
948
+ self. unclosed _ block _ tag ( [ endtag ] )
949
+ def _ _ init _ _ ( self, cmd, * * kwargs ) :
950
+ if len ( list _ = 0 ) ( 0 )
951
+ return ( value )
952
+ try :
953
+ max _ width = int ( line ) - 1
954
+ result = getattr ( t, translation _ function ) ( el _ message )
955
+ import hmac
956
+ from django. utils import six, lru _ cache
957
+ models = app _ config. get _ models ( include _ auto _ created = true )
958
+ raise templatedoesnotexist ( ', ', '. join ( ', ',') )
959
+ return false
960
+ import _ library, _ all _ _ = ('template ','context ','requestcontext ','request ','request
961
+ def conditional _ escape ( text ) : ( text ( text )
962
+ if not isinstance ( candidate, six. string _ types ) :
963
+ comment = [ ]
964
+ return emi _ post _ migrate _ signal ( all _ models, * * kwargs )
965
+ if i _ output :. replace ('% s % s'% line, table _ length ) :
966
+ if ch = = '?':
967
+ self. inverse _ match = inverse _ match
968
+ self. _ pk _ field, pkk = self. model. _ meta. pk. pk _ field
969
+ super ( error, self ). _ _ init _ _ ( error, * args, * * kwargs )
970
+ if token. token _ type = = 0 : : : : : : : : :
971
+ if'forloop'in context : :
972
+ class boundaryiter ( six. iterator ) :
973
+ self. path _ info = path _ info
974
+ def clean ( self, value ) : ( self
975
+ output _ output _ output _ output _ output _ output': _ output': _ output': _ _ ur markset,'' _ _ _ _ _ _ _ _ _ _
976
+ if html : : :
977
+ self. is _ reversed = is _ reversed
978
+ def total _ ordering ( cls ) :
979
+ return''
980
+ final _ output. append ('- - the references should be specified with')
981
+ for i in ( html ['month'] ) :
982
+ self. _ clean _ form ( )
983
+ for handler in handlers :
984
+ if imatch : :
985
+ return none
986
+ factor = 0 = 0
987
+ from django. core. management. sql import sql _ custom
988
+ l = len ( tokens )
989
+ if fk _ name : : :
990
+ except htmlparrror : : :
991
+ view _ name = callback. get ( callback )
992
+ def _ _ setattr _ _ ( self, name, value ) :
993
+ self. use _ l10n = use _ l10n
994
+ match = kwarg _ re. match ( bits [ 0 ] )
995
+ for safe in sys. path _ shells :
996
+ intrans = false
997
+ warnings. warn ( " % s'% s % s % s % s % s % s % s % s % s % s % s
998
+ def compress ( self, data _ list ) : ( self
999
+ class viewdoesnotexist ( exception ) :
1000
+ final _ output. extend ( output )
1001
+ requires _ system _ checks = false
1002
+ else : : : :
1003
+ if self. choices : : : : :
1004
+ callback, param _ dict = resolver. resolve _ error _ handler ( status _ code )
1005
+ def render ( self ) : ( self
1006
+ return data
1007
+ else : : :
1008
+ level = config. pop ('level ', none )
1009
+ res, args = flatten _ result ( item )
1010
+ obj _ pk = obj _ pk. pk
1011
+ return false
1012
+ class noreversematch ( exception ) :
1013
+ import json
1014
+ global _ default
1015
+ def configure _ handler ( self, config ) :
1016
+ if ch! ='\ \':
1017
+ else : : :
1018
+ translated = language. format ( rhs )
1019
+ if location is none : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :
1020
+ biggest _ number = max ( )
1021
+ wsgi _ opts = {'maxorde': options },'maxorde': int ( options,'max _
1022
+ raise attributeerror ( " you set set ( content to a modified ) response " )
1023
+ is _ usable = true
1024
+ raise valueerror ( " not a literal literal : % r " % ( s )
1025
+ yield'year '
1026
+ return scheme in self. url _ schemes
1027
+ if six. py2 and value > sys. maxint :. py2 :..
1028
+ if match : : : : : :
1029
+ def extend _ nodelist ( self, nodelist, node, token ) :
1030
+ return form. has _ changed ( )
1031
+ construct _ instance _ exclude = [ : ]
1032
+ if new _ conn _ created : : :
1033
+ @ register. tag ('block')
1034
+ if bf _ errors : : :
1035
+ if not self. is _ bound : : :
1036
+ if var. startswith ('_ ( ', var )') :
1037
+ _ _ m = r'(? p < p > \ w { 3 } )'_ _
1038
+ return templatetagnode ( templatetagnode ( tag ), templatenode ( tag ) )
1039
+ def strftime ( self, fmt ) :
1040
+ if isinstance ( stream _ or _ string, six. string _ types ) :
1041
+ setattr ( module _ six _ moves _ urllib _ response, attr. name, attr ). attrs
1042
+ def write ( self, outfile, encoding ) :
1043
+ continue
1044
+ def add _ filters ( self, filterer, filters ) :
1045
+ time _ str = time _ str. decode ('utf - 8')
1046
+ _ _ dir _ _ = new _ method _ proxy ( dir )
1047
+ def _ _ len _ _ ( self ) :
1048
+ bits = token. split _ contents ( ) [ 1 : ]
1049
+ return offset. days / 60
1050
+ yield''. join ( self )
1051
+ import warnings
1052
+ else : : :
1053
+ import warnings
1054
+ return ( type, outdict, stream )
1055
+ from collections import ordereddict
1056
+ def safe _ join ( base, * * paths ) :
1057
+ newlines = unicode ( " \ n " )
1058
+ exp = datetime. utcfromtimestamp ( timeout )
1059
+ lockfileex. restype = bool
1060
+ return serializers [ format ]. serializer ( )
1061
+ unm _ loopvars > 1 = true
1062
+ words [ i ] = mark _ safe ( word )
1063
+ initlock = lock ( )
1064
+ @ deconstructible
1065
+ chunk _ size = 64 * * 10 * 10
1066
+ def _ _ init _ _ ( self, conditions _ nodelists ) :
1067
+ def _ save ( self, name, content ) :
1068
+ return'% s _ % s _ % s'% id _ select
1069
+ if len ( key ) > meache _ max _ key _ length :
1070
+ if formfield : : :
1071
+ cache [ key. cache _ middleware _ alias ] = cache
1072
+ return nodelist _ true _ output ( self. nodelist _ true )
1073
+ return list ( self ). repr ( self )
1074
+ if number > self. num _ pages :
1075
+ return force _ text ('\ \ ','/'). replace ( name )
1076
+ return true
1077
+ alters _ data = true
1078
+ s = s1
1079
+ def as as as as as as as as as valid as as valid as valid as valid as cu : :
1080
+ return 0
1081
+ if cache _ timeout = = none : : : : : : :
1082
+ class templateattr ( literal ) : ( class class class ( class class
1083
+ color _ settings = termcolors. parse _ color _ setting ( django _ colors )
1084
+ translator _ comment _ mark ='translators'=''
1085
+ if self. handle _ uncaught _ exception ( request, resolver, sys. exc _ info ( ) ) :
1086
+ latest _ date = item _ date
1087
+ value, sig = signed _ value. rsplit ( self. sep, 1 )
1088
+ qs = f. value _ from _ object ( instance )
1089
+ from email import charset as charset as encodeers as encode, message _ from _ string, generator )
1090
+ if isinstance ( v, ( list, tuple ) ) : : :
1091
+ incomment = true
1092
+ return self. _ num _ pages
1093
+ return get _ supported _ language _ variant ( accept _ lang )
1094
+ if unicodedata. combining ( char ) :
1095
+ @ deconstruct ('invalid')
1096
+ use _ base _ manager = options. get ('use _ base _ manager')
1097
+ def reverse ( viewname, urlconf = none, args = none, kwargs = none, reverse = none, url
1098
+ if self. _ is _ rendered :
1099
+ while current _ len < = length : : < :
1100
+ def _ set _ response _ etag ( response ) :
1101
+ @ register. filter ( " escapejs " )
1102
+ if hasattr ( mw _ instance,'process _ response') :
1103
+ self. xml. endelement ( " object " )
1104
+ self. stdout. write ('django _ % s _ template _'% self. app _ or _ project )
1105
+ out. write ( blankout ( part,'s') )
1106
+ from django. utils import six
1107
+ parser. add _ argument ('args ', metavar ='app _ label ', nargs ='*')
1108
+ if six. py2 : : : :
1109
+ self. waiting _ readers = 0
1110
+ return node. render ( context )
1111
+ name, ext = os. path. splitex ( name )
1112
+ @ stringfilter
1113
+ pattern = " classdef a ('all'> ('< > > > > > > > > > > " > > '
1114
+ self. interesting _ for _ django = true. true
1115
+ media _ attrs = kwargs
1116
+ def read ( self, * args, * * kwargs ) :
1117
+ cull _ num = num. _ cull _ frequency ( )
1118
+ def inclusion _ url ( url ) :
1119
+ def streaming _ content ( self, value ) : ( self
1120
+ import re
1121
+ self. tags [ name ] = compile _ function
1122
+ creater = [ manifest. values ( value, form. string _ models ) ]
1123
+ return super ( getsgiserver ( get _ internal _ wsgi _ application, * * kwargs ) )
1124
+ def is _ naive ( value ) :
1125
+ return connection. sql _ create _ model ( model, no _ model, model _ model = model ) :
1126
+ post ='< could not parse >'> > '
1127
+ context = context ( * {'' : {'' : {''': {''': self. _ _ class }
1128
+ for key in self. keyorder :
1129
+ current _ len + = 1 +
1130
+ class suspiciousmultipartform ( suspiciousoperation ) :
1131
+ from django. utils. http import urlquote
1132
+ from django. core. serializers. base import deserializationerror
1133
+ from django. utils. deprecation import removedindjango19warning
1134
+ if self. _ wrapped is empty :
1135
+ return make _ origin ( display _ name, self. load _ template _ source, template _ name, template _ dirs )
1136
+ return self. file or self. file. closed
1137
+ import warnings
1138
+ self. pubid = pubid
1139
+ if len ( bits )! = 3 :
1140
+ return with ( none, none, nodelist, extra _ context )
1141
+ _ iterlists = " lists "
1142
+ from django. core. exceptions import validationerror
1143
+ def _ _ reduce _ _ ( self ) :
1144
+ if mail in settings. servers _ message :
1145
+ return false
1146
+ def _ _ init _ _ ( self, name, regex, next = none ) :
1147
+ except pickle. pick pillowrror : : :
1148
+ def get _ public _ serializer _ formats ( ) : _ public _ formats
1149
+ with open ( writer. path, " rb " ) as fh :. open ( fh ). ast :
1150
+ def do _ ifequal ( parser, token, negate ) :
1151
+ def _ assert _ mutable ( self ) :
1152
+ pass
1153
+ if isinstance ( data, bytes ) : :
1154
+ except oserror as e : : : : :
1155
+ for pythonrc in ( os. environ. get ( " pythontpp ", " pythonart " ) )
1156
+ def handle ( self, * * options : * options : * options'* options : * options'* options': * options'* options
1157
+ return false
1158
+ for dirname in dirs :
1159
+ try :
1160
+ value = super ( simplecookie, self ). _ encode ( val )
1161
+ using ='' - - random number not in ( system. willmimer. ', dest ='database ', dest =
1162
+ user _ settings = module _ to _ dict ( settings. _ wrapped )
1163
+ ttl = force _ text ( ttl )
1164
+ statement. append ( cleaned _ filen )
1165
+ if y and d and d :
1166
+ from django. utils. deprecation import removedindjango19warning
1167
+ return datetime. strftime ('% s, % d % d % ( % m % m, % ( ( % m, % (
1168
+ def u ( s ) : ( s ) ( s
1169
+ super ( assignmentnode, self ). _ _ init _ _ ( takes _ context, args, * * kwargs )
1170
+ except ( valueerror, typeerror ) :
1171
+ _ _ all _ _ = ['file']
1172
+ return retval
1173
+ self. stream. write ('% s \ n'% msg _ data )
1174
+ logger. level = logging. notset
1175
+ elif basetype = ='message'and subtype = ='rfc8':
1176
+ def value _ from _ datadict ( self, data, data, name = none ) :
1177
+ raise valueerror ( " key'% s'not found " % key )
1178
+ except suspiciousoperation as e : :
1179
+ ttl = force _ text ( ttl )
1180
+ if kwargs. index ( * * options ) :
1181
+ if self. asvar is none : : : : : :
1182
+ if isinstance ( s, six. text _ type ) or promise ( s ) :
1183
+ self. stdout. write ( " installed % d object object object ( s ) from % s " % ( fixture _ name, e )
1184
+ t. led ( left, self )
1185
+ return'< extendsnode : % s >'% self. parent _ name. token _ token. '
1186
+ for attachment in self. attachments :
1187
+ return value
1188
+ from django. core. cache. backends. base import basecache, default _ timeout
1189
+ def _ _ init _ _ ( self ) :
1190
+ value = next ( cycle _ iter ). resolve ( context )
1191
+ if not self. compile _ function _ error ( token, e ) :
1192
+ chunks = [ ]
1193
+ logging. handler. _ _ init _ _ ( self )
1194
+ conflicts = executor. loader. graph _ conflicts ( )
1195
+ _ localtime = none
1196
+ return self. number + self. paginator. per _ page
1197
+ seen _ models = seen. add ( )
1198
+ def clean ( self, value ) : ( self
1199
+ if not data and initial : : :
1200
+ else : : :
1201
+ def url ( self, name ) :
1202
+ if not hasattr ( package,'cundex') :
1203
+ raise
1204
+ match = re _ date. match ( value )
1205
+ from django. db. migrations. writer import migrationwriter
1206
+ if value is none or'' : :
1207
+ msg = " unclosed'% s '. using ( % s " % ( command, e ) )
1208
+ app _ config = apps. get _ app _ config ( app _ label )
1209
+ def _ iterkeys ( self ) :
1210
+ shutdown _ message = options. get ('shutdown _ message ', false )
1211
+ return self. source
1212
+ if f is none : : : :
1213
+ def handle ( self, * * options ) : :
1214
+ class commentnode ( node ) :
1215
+ from django. utils. encoding import force _ text
1216
+ module _ path = import _ path. path ( )
1217
+ return result
1218
+ temp _ lib. tags [ name ] = lib. tags [ name ]
1219
+ if self. to _ field : : : : :
1220
+ from django. http. response import httpresponse, streamingresponse, httpresponseirectirectirect
1221
+ handler. addquickelement ( " rights ", item ['item _ copyright'] )
1222
+ def byte2int ( sr ) : ( )
1223
+ return lazy _ number ( ngettext, str, singular = singular, plural = plural, plural = plural _ number, number = true,
1224
+ class k, self. _ _ dict _ _ ( value ) :
1225
+ stream. unget ( chunk )
1226
+ values : ( ( ( ( ( ( (, ", ", " "ar values
1227
+ _ func _ defaults = " func _ defaults "
1228
+ parser. add _ argument ( parser. add _ argument ( parser. add _ output, default _ output, default _ output, default _ version version version version version version version version version version version version version
1229
+ try :
1230
+ raise externalreferencebidden ( context, base, sysid, pubid )
1231
+ with connection. default _ checks _ modified ( ) :
1232
+ delta = expires. utcnow ( ) - expires
1233
+ super ( serializer, self ). handle _ file ( obj, field )
1234
+ pass
1235
+ else : : :
1236
+ else : : :
1237
+ error _ error _ error = error _ error ( " % s " % ( model, " % s " ) )
1238
+ kwargs ['instance'] = self. _ existing _ object ( pk )
1239
+ if len ( bits ) < 2 : : : : :
1240
+ return copy. deepcopy ( self. _ wrapped, memo )
1241
+ loaded _ objects _ in _ fixture = 0
1242
+ return result
1243
+ super ( radiochoiceinput, self ). _ _ init _ _ ( * args, * * kwargs )
1244
+ self. dicts [ key ] [ - 1 ] = value [ - 1 ]
1245
+ from django. core. cache. backends. base import basecache, default _ timeout
1246
+ if ( self. decimal _ places is not none : _ digits ( ) : ( ( ( value :
1247
+ if not value and self. required :
1248
+ base _ url. append ('/')
1249
+ if dirname and not os. path. exists ( dirname ) : :
1250
+ def regex ( self ) : ( self
1251
+ parser. add _ argument ('args ', nargs ='*')
1252
+ if plan _ node in loader. migrated _ migrations : :
1253
+ self. _ regex _ dict [ language _ code ] = regex _ created
1254
+ self. file. seek ( 0 )
1255
+ return self. _ _ name
1256
+ self. read ( ). _ body ( )
1257
+ return result
1258
+ boundarys ='boundarys'+ opts. get ('boundary')
1259
+ parser. add _ argument ( " couldcacheenderror'% s': % s " % ( backend, e )
1260
+ else : : :
1261
+ def save _ existing _ objects ( self, commit = true ) :
1262
+ from django. core. mail. utils import dns _ name
1263
+ needs _ multipart _ form = true
1264
+ pass
1265
+ def indexbytes ( buf, i ) :
1266
+ _ _ getattr ( newattr ( getattr ), _ _ getattr _ _ )
1267
+ sep = hextet [ 0 ]. split (':')
1268
+ def _ _ contains _ _ ( self, item ) :
1269
+ bits = host. split (':') [':']
1270
+ try :
1271
+ if ( ( bit, * *gs ) in _ delotify. in _ delete ( ) ) :
1272
+ class middlewarenotused ( exception ) :
1273
+ import os
1274
+ handler = self. configure _ handler ( name [ name ] )
1275
+ else : : :
1276
+ with connections [ db ]. cursor ( ) as cursor :
1277
+ return datetime. time ( * * kw )
1278
+ filelist = filelist _ cachenames + new _ filenames + new _ filenames + new _ filenames
1279
+ strip _ tags = allow _ lazy ( strip _ tags )
1280
+ self. queryset = field. queryset
1281
+ next = klass. _ _ dict _ _
1282
+ import _ module ( templatetag _ module )
1283
+ def tag ( self, name = none, compile _ function = none ) :
1284
+ if kwargs. pop ('ipv6') : :
1285
+ def writer ( self ) : ( self ( )
1286
+ class invalidtemplatelib ( ) :
1287
+ def render ( self, context ) : ( self
1288
+ self. allow _ empty _ first _ page = allow _ empty _ first _ page
1289
+ s = s. replace ('\ t ','\ \ t'). replace ('\ \ t')
1290
+ needs _ multipart _ form = false
1291
+ self. handle _ starttag ( tag, attrs )
1292
+ try :
1293
+ self. _ catalog. update ( other. _ catalog )
1294
+ for f in sorted ( opts. concrete _ fields, sorted _ to _ many ) :
1295
+ if isinstance ( message, safedata ) :
1296
+ if not self. data and not self. files :
1297
+ setattr ( filter _ func, atc )
1298
+ if nodelist. get _ nodes _ by _ type ( extendsnode ) :
1299
+ try :
1300
+ obj = super ( multiwidget, self ). _ _ deepcopy _ _ ( memo )
1301
+ else : : :
1302
+ def sql _ indexes ( app _ config, style, connection ) :
1303
+ if app _ config. models _ module is none : :
1304
+ raise notimplementederror ('subclasses of origin must provide a reload ( ) method')
1305
+ self. kwargs = kwargs
1306
+ return true
1307
+ self. paths _ to _ remove. append ( tempdir )
1308
+ if fk. unique : : : :
1309
+ elif s. cursor ( ) as cursor :
1310
+ new _ class. update ( new _ class )
1311
+ self. choices. append ( ( f, f ). join ('' ) )
1312
+ use _ null _ fallback = false
1313
+ kwargs [ name ] = parser. compile _ filter ( value )
1314
+ class splitdatetimefield ( multivaluefield ) :
1315
+ result = middleware. process _ view ( request, view _ func, args, kwargs )
1316
+ header header mark _ header mark _ header _ header ( header _ outputs : ( _ at headertrs : ( at at headertrs * * *
1317
+ class http404 ( exception ) :
1318
+ def media ( self ) : ( self ( ) ( self
1319
+ if isinstance ( data, datetime. datetime ) and not isinstance ( data, datetime. timetime ) and not supports
1320
+ from django. conf import settings
1321
+ state _ frame [ self ] = none
1322
+ error _ msg = " invalid template name in'extends': % r. " % parent _ name )
1323
+ if option _ value is none : : : :
1324
+ class localtimezone ( referenceslocalzone ) :
1325
+ @ register. filter ( is _ safe = true )
1326
+ elif field _ type = ='integerfield ( ', connection. features. can _ introspection _ autofield _ autofield ) :
1327
+ return querydict ( " " ", encoding = self. _ encoding )
1328
+ def to _ python ( self, value ) :
1329
+ if ( sixjjj ( validjjjjjjj (jjjjjjjjjjjjjjj parent parent
1330
+ if match : : : : : :
1331
+ def patch _ cache _ command ( response, * * kwargs ) :
1332
+ def _ _ init _ _ ( self, level, msg = none, * * kwargs ) :
1333
+ tag, this _ value _ expr, max _ value, max _ width = bits [ : ]
1334
+ name = options. pop ('using ', sys. pop ('using')
1335
+ if not filename :
1336
+ super ( inlineforirekeyfield, self ). _ _ init _ _ ( * args, * * kwargs )
1337
+ def _ _ init _ _ ( self, name ) : _ _ _
1338
+ from django. core. exceptions import improperlyconfigured
1339
+ def _ _ init _ _ ( self ) :
1340
+ value = [ conditional _ escape ( v ) for v in conditional ( v ) ]
1341
+ class templateenenerror ( exception ) :error ( )
1342
+ if version is none : : : : :
1343
+ self. xml. startelement ( " field ", { " name " : field. name } )
1344
+ thefile = self. file
1345
+ min = int ( m. group ('min') )
1346
+ self. stdout. write ( " merge % s " % app _ label )
1347
+ value = getattr ( opts, opts )
1348
+ for basedir in basedirs : :
1349
+ if hasattr ( file _ or _ path,'read') :
1350
+ @ classmethod
1351
+ def _ replace _ entity ( match ) :
1352
+ self. _ post, self. _ files = self. parse _ file _ upload ( self. meta, data )
1353
+ path _ info = get _ bytes _ from _ wsgi ( environ,'path _ info ','/')
1354
+ except exception : : : :
1355
+ if not self. empty _ empty : ( self. empty _ empty ( app _ label, label _ list = true ) :
1356
+ subcommand ='help '
1357
+ def handle ( self, * * options, * * options ) : ( * options, * * options
1358
+ raise valueerror ( "'% s'has no field'% s '. " % ( self. _ _ class _ _, field _
1359
+ model _ fields = model. _ meta. get _ all _ field _ names ( )
1360
+ f = os. path. join ( pd, cmd )
1361
+ error _ messages = self. fields [ field ]. get ( error _ messages )
1362
+ self. _ lock = threading. rlock ( )
1363
+ from userlist import userlist
1364
+ from django. http import http404
1365
+ return self. create _ token ( last _ bit, ( upto, ( upto ), ( upto ), ( 0 ) )
1366
+ class dummy :
1367
+ def _ _ del _ _ ( self ) :
1368
+ link [ next ] = root
1369
+ from django. apps import apps
1370
+ else : : : : : :
1371
+ while i < l : : :
1372
+ def render ( self, context ) :
1373
+ def _ cache ( self ) : ( self
1374
+ re _ words = re. compile ( r'< / (? \ n ',? + re. compile (? ), * *
1375
+ return { }
1376
+ model = app _ config. get _ model ( model _ label )
1377
+ if value is not result :
1378
+ return tt. tm _ isdst > 0
1379
+ def _ get _ choices ( self ) :
1380
+ loader = migrationloader ( connection )
1381
+ return termios. smsetattr ( fd, termios.desjanta, attr _ list )
1382
+ _ urllib _ robotparser _ moved _ attributes = [ movedattribute ( " ", " urllib ", "
1383
+ def render ( self, name, value, attrs = none ) :
1384
+ cursor. close ( )
1385
+ endbmatch = endblock _ re. match ( t. contents )
1386
+ for key, value in parse _ ssl ( query _ string or'' ) :
1387
+ def get _ resolver ( urlconf ) :
1388
+ app _ label = os. get _ app _ config ( model. _ app. app _ label )
1389
+ if locations is not empty : :
1390
+ class signatureexexture ( badsiture ) :
1391
+ def get ( self, key, default = none ) :
1392
+ def _ mark _ post _ parse _ error ( self ) :
1393
+ self. xml. endelement ( " field " )
1394
+ super ( genericipssfield, self ). _ _ init _ _ ( * args, * * kwargs )
1395
+ from django. utils import six, timezone
1396
+ return value
1397
+ return os. path. join ( os. path. join ( self. cache _ suffix, " * args ) )
1398
+ if self. verbosity > = 1 :
1399
+ stream = stringio ( stream _ or _ string )
1400
+ from django. utils import archive
1401
+ return time _ str +'-00'_ str
1402
+ if not self. allow _ multiple _ selected :
1403
+ raise templatesyntaxerror ( "'% s'received'received argument'% s'" % ( key, e ) )
1404
+ else : : :
1405
+ from django. apps import apps
1406
+ localpart = str ( localpart ( localt, encoding ) )
1407
+ class fileinput ( input ) :
1408
+ d = { }
1409
+ return data ['pk']
1410
+ for line in content. split ( ) : :
1411
+ if value : : : : :
1412
+ @ property
1413
+ value [ field. attname ] = data _ value
1414
+ s = six. text _ type ( s, encoding, errors )
1415
+ raise
1416
+ if app _ config. models _ module is none :
1417
+ for tag in open _ tags : :
1418
+ _ assertregex = " assertregex "
1419
+ class emailbackend ( baseemailbackend ) :
1420
+ self. _ regex _ validator = validators. regexvalidator ( regex = regex )
1421
+ if error _ messages and f. name in error _ messages : :
1422
+ parser. add _ argument ('args ', metavar ='app _ label ', nargs ='* ', help
1423
+ child _ loggers. append ( existing [ i ] )
1424
+ mimetype, _ = mimetypes. guess _ type ( filename )
1425
+ secret = force _ bytes ( secret )
1426
+ params, varargs, varkw, defaults = getargspec ( func )
1427
+ def javatext _ quote ( s, quote _ double _ quotes = false ) :
1428
+ i + = 1 + 1
1429
+ @ deconstructible
1430
+ continue
1431
+ def cleaned _ data ( self ) : ( self
1432
+ break
1433
+ key = self. make _ key ( key, version = version )
1434
+ value = data. get ( name )
1435
+ changeset = timestamp. strftime ('% y % m % h % m % m )
1436
+ if val is none : : : :
1437
+ def clear ( self ) : ( self ( )
1438
+ six. reraise ( exc _ type, exc _ value, sys. exc _ info ( ) )
1439
+ raise validationerror ( self. error _ messages ['required'], code ='required')
1440
+ def get _ default _ timezone ( ) :
1441
+ def get _ host ( self ) :
1442
+ return
1443
+ fmt = config. get ('format ', none )
1444
+ if finder. find _ module ( name ) : :
1445
+ ipv4 _ address = ( " % d. % d. % d " % ( hextets [ 0 ], ( hextset
1446
+ return [ bytes _ to _ text ( ( elt, self. encoding ) for elt in list _ to _ text ( ) ]
1447
+ return name, cmp _ fmt, cmp _ fmt
1448
+ from django. utils. http import urlquote
1449
+ if value. tzinfo is none and value. tzinfo. utcoffset ( value ) is none :. value
1450
+ else : : :
1451
+ code _ list. append ( field [ v ] )
1452
+ kwargs ['initial'] = self. parent _ instance. pk
1453
+ last = 0 + 0 - 1
1454
+ def _ _ init _ _ ( self, widgets, attrs = none ) :
1455
+ class wsgiserver ( simple _ server. wsgiserver, object ) :
1456
+ except exception as e : :
1457
+ state = self. state
1458
+ def _ _ get _ _ ( self, obj, tp ) :
1459
+ for tag in tags ( tags. tag _ exists ( tag ) for tag in tags ) :
1460
+ if use _ l10n or settings. use _ l10n :
1461
+ self. activated = true
1462
+ return''
1463
+ def wrapper ( * args, * * kwargs ) :
1464
+ id _ ='_ 0'+ '
1465
+ def format _ subject ( self, subject ) : ( self
1466
+ kwargs = match. groupdict ( )
1467
+ for dict _ in self. dicts :
1468
+ self. nodelist = t. nodelist
1469
+ def _ _ bool _ _ ( self ) :
1470
+ import sys
1471
+ number ['number'] = number _ value
1472
+ return result
1473
+ if hasattr ( timezone,'normalize') :
1474
+ value = force _ text ( value )
1475
+ weight = 0
1476
+ from super ( simplecookie, self ). simple _ info ( rawdata )
1477
+ class def defusedxmlexception ( valueerror ) :
1478
+ else : : :
1479
+ self. _ leftover = b''. join ( bytes, self. _ leftover )
1480
+ formfield = f. formfield ( * * kwargs )
1481
+ return
1482
+ def make _ decorator ( * m _ args, * * m _ kwargs ) :
1483
+ def _ set _ post ( self, post ) :
1484
+ def clear ( self, * args ) : :
1485
+ if safe is not none : : : : :
1486
+ filter _ expression = self. compile _ filter ( token. contents )
1487
+ attrs = super ( decimalfield, self ). widget _ attrs ( widget )
1488
+ return bytes ( value )
1489
+ if self. allow _ files :
1490
+ app _ list = resolver. app _ dict. get ( nsr )
1491
+ def activate ( timezone ) : ( timezone ( timezone )
1492
+ else : : :
1493
+ def writetring ( self, encoding ) :
1494
+ else : : :
1495
+ choices = property ( _ get _ choices, _ set _ choices )
1496
+ def has _ other _ pages ( self ) :
1497
+ sys. modules [ _ _ name _ _ + sys. modules ] = sys. modules [ _ _ name ]
1498
+ form. save _ m2m = save _ m2m
1499
+ else : : :
1500
+ _ templatetags _ module. append ( templatetag _ module )
1501
+ return format _ html _ join ('{ ','{ 0 } ='{ 0 } ','{ 1 } ',''
1502
+ return self
1503
+ self. can _ write. release ( )
1504
+ raise keyerror ( key )
1505
+ for arg in args :
1506
+ def has _ key ( self, key ) :
1507
+ return kwargs. pop ('microsecond ','0')
1508
+ if var. find ('_'+ variable _ attribute _ separator ) > 1 :
1509
+ _ _ all _ _ = ('multipartparser ','multipartparsarsere ','multipartparsars '
1510
+ dicts = ', '. join ( d ) for d in self. dictss )
1511
+ elif field. rel and isinstance ( field. rel, models. manytoonerel ) :
1512
+ if text isinstance ( text,'' ) and len ( opts [ 0 ] = ='reset') :
1513
+ from django. utils. six. moves. urllib. parse import urlin
1514
+ self. xml. startelement ( " natural ", { } )
1515
+ @ property
1516
+ raise validationerror ( self. error _ messages ['invalid _ choice'], code ='invalid _ choice ', params = {
1517
+ self. delete ( key, version = version )
1518
+ new _ matches = normalize ( parent _ pat, pat )
1519
+ yield self [ key ]
1520
+ cache [ key ] = result
1521
+ self. cookies [ key ] ['max - age'] = max _ age
1522
+ def _ _ copy _ _ ( self ) :
1523
+ from django. utils. functional import lazy
1524
+ return mark _ find ( s1 )
1525
+ for middleware _ method in self. _ request _ middleware :
1526
+ def add _ arguments ( self, * args, * * options ) :
1527
+ ulong _ ptr = c _ int64
1528
+ if not language _ code _ re. search ( lang _ code ) :
1529
+ if isinstance ( s, bytes ) : :
1530
+ for _ name, object _ list in self. m2m _ data. items ( ) :
1531
+ if isinstance ( obj, datetime. datetime ) :
1532
+ handler. addquickelement ( " pubdate ", rfc3339 _ date ( item ['pubdate'] ) )
1533
+ self. mode = file. mode
1534
+ gs = int ( c ) + reversed ( c )
1535
+ if sys. version _ info [ : 1 ] = = 3 :
1536
+ chunk = b''. join ( chunks )
1537
+ fs _ template _ dirs = sys. getdefault ( )
1538
+ def split _ leading _ dir ( self, path ) :
1539
+ with self. _ lock. reader ( ) :
1540
+ locale _ dir = self. default _ locale _ path
1541
+ output _ transaction = true
1542
+ obj = model ( * * data )
1543
+ pattern. namespacefault ( pattern, [ ] ). append ( pattern. namespace )
1544
+ for key, value in data :
1545
+ def configure _ root ( self, config, incremental = false ) :
1546
+ if item ['link'] is not none :
1547
+ tzinfo = get _ fixed _ timezone ( offset )
1548
+ class suspiciousoperation ( exception ) :
1549
+ from django. conf import settings
1550
+ try :
1551
+ if os. path. isdir ( app _ dir ) :
1552
+ def mark _ for _ escaping ( s ) : ( s
1553
+ except attributeerror : : : : : : :
1554
+ if to _ python ( field. rel. to. _ meta. get _ field ( field. rel. field _ name ) :
1555
+ def _ _ init _ _ ( self, object _ list, number, paginator ) :
1556
+ return [ value ]. time ( )
1557
+ def timeuntil ( d, d = none ) :
1558
+ super ( decimalfield, self ). validate ( value )
1559
+ field _ type ='foreignkeykey ('foreignkey ( ) )
1560
+ def avoid _ wrapping ( value ) : ( value ( value )
1561
+ from django. core. serializers. python import deserializer as pythondeserializer
1562
+ if code is not none : : : :
1563
+ raise templatesyntaxerror ( "'firstof'statement at least one argument " )
1564
+ from importlib import find _ loader as importlib _ find
1565
+ msgs, errors, status = popen _ wrapper ( args )
1566
+ id _ = self. field. widget. get ('id ', none )
1567
+ return " < block node : % s. contents : % r'% ( self. name, self. node )
1568
+ if nodelist _ empty is none : : :
1569
+ def _ _ iter _ _ ( self ) :
1570
+ from django. utils. module _ loading import import _ string
1571
+ return''. join ( self. make _ bytes ( chunk ) for chunk in value )
1572
+ if value in self. empty _ values :
1573
+ parser. add _ argument ('- - no - no - no - nocated ', action ='store _ true ', dest
1574
+ def jython _ reloader ( main _ func, args, kwargs ) :
1575
+ from django. test. signals import setting _ changed
1576
+ os. seek ( 0 )
1577
+ return false
1578
+ from django. template. base import templatedoesnotexist
1579
+ from django. http import httpresponse
1580
+ code ='limit _ value '
1581
+ text = match. group ( 1 )
1582
+ for line in'\ r \ n': ['\ n'] :
1583
+ obj = base. build _ instance ( model, data, db )
1584
+ iterkeys = _ iterkeys
1585
+ return value. pk
1586
+ quant. append ( ch )
1587
+ def write ( self, val ) :
1588
+ def handle ( self, app _ config, * * options ) : : options options options : options options options options options options options options
1589
+ return none
1590
+ num _ loopvars = len ( self. loopvars )
1591
+ deactivate _ all = lambda none
1592
+ pb = 1 < < <b
1593
+ start = 0
1594
+ def render _ option ( self, selected _ choices, option _ value, option _ label ) :
1595
+ def _ _ getitem _ _ ( self, key ) :
1596
+ language _ code = get _ language ( )
1597
+ if bit. startswith ('_ ('< bit') :. startswith ('_ ('_ (') )
1598
+ return cache _ key _ validi ( request, cachex )
1599
+ try :
1600
+ c = text [ 0 ]. text ( hex )
1601
+ if os. path. exists ( self. file _ path ) and not os. path. isdir ( os. file. isdir (
1602
+ if self. feed ['feed _ url'] is not none :
1603
+ return
1604
+ import os
1605
+ return iter ( getattr ( d, _ iter ) ( * * kwargs ) )
1606
+ def wrapper ( * args, * * kwds ) :
1607
+ message ='pgettext ( % r, % r )'% ( message _ context, tokens )
1608
+ return self. getlist ( key )
1609
+ defaults = dict ( defaults. _ get _ kwargs, * * options )
1610
+ self. urlconf = getattr ( self. urlconf _ module,'handler % s'% view _ type
1611
+ warn _ msg = " the translator - named comment'% s'( % pll ) " % ( kwargs, " "
1612
+ return force _ text ( getattr ( self, self ) ( self ) ( force _ text ( ) ) )
1613
+ d = data [ data ]
1614
+ func = getattr ( func,'_ decorated _ function ', func )
1615
+ for name, block in six. iteritems ( blocks ) :
1616
+ import django
1617
+ potfiles = self. build _ potfiles ( )
1618
+ self. stdout. write ( " check % s for fixture.. " % ( fixture _ name ) )
1619
+ import sys
1620
+ if len ( bits )! = 3 : :
1621
+ extracted = self. _ archive. extractfile ( member )
1622
+ import binascii
1623
+ else : : :
1624
+ _ get _ files = getattr ( files, files )
1625
+ return true
1626
+ with self. mutex :
1627
+ return get _ template ( template _ name, dirs )
1628
+ l = lambda self. make _ key ( x, version = version )
1629
+ def upload _ handlers ( self ) :
1630
+ except ambiguityerror :ror : : : :
1631
+ except validationerror as e : : : : :
1632
+ return {'request': request } ['request']
1633
+ except attributeerror : : : : : : :
1634
+ result = func ( * args )
1635
+ return paras. text ('< p > p > / p >')
1636
+ from django. utils. encoding import force _ text, default _ locale _ encoding
1637
+ app _ configs = [ model. get _ models for model in apps. get _ models ( * kwargs ) if app _ con
1638
+ self. ignore = options. get ('ignore')
1639
+ class nownode ( node ) :
1640
+ except standarderror as e : : : :
1641
+ if msg : : : :
1642
+ _ error _ files = [ ]
1643
+ @ register. filter ( is _ safe = true, needs _ autoescape = true )
1644
+ if isinstance ( filename, mimebase ) :
1645
+ class debubudelrs ( nodelist ) :
1646
+ priority = 1 1. 0
1647
+ raise keyerror ( key )
1648
+ elif klass ['mail'] in config :. pretpclass ( ) :
1649
+ return maybe
1650
+ def _ handle _ m2m _ field ( self, node, field ) : _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
1651
+ super ( debugparser, self ). extend _ nodelist ( nodelist, token, token )
1652
+ from django. utils. itercompat import is _ iterable
1653
+ return self. has _ key ( key )
1654
+ super ( declarativemetaclass, self ). _ _ new _ _ ( mcs, bases, * args, * * kw
1655
+ continue
1656
+ result. save _ existing ( self. save _ new _ objects ( ), self. save _ new _ objects ( ) )
1657
+ for attr in ('expects _ localtime ','is _ safe ','needs _ autoescape') :
1658
+ for f in file _ list :
1659
+ import re
1660
+ for processors in get _ standard _ processors ( processors ) :
1661
+ return force _ text ( old _ field _ name, self. _ encoding, errors ='replace')
1662
+ yield v
1663
+ else : : :
1664
+ cc = {'to _ to _ tuple': force _ ( el ). items ( )
1665
+ scheme = template [':']. split ( )
1666
+ escape _ mappings = {'a': ','b': ','' :'',''':''
1667
+ locales = [ locale ]
1668
+ nodelist = parser. parse ( ('endblock ', ) )
1669
+ loaders = [ ]
1670
+ @ register. tag
1671
+ return client
1672
+ return os. stat ( path ). join ( path )
1673
+ def _ _ delitem _ _ ( self, key ) : _ _ _
1674
+ expanded _ template = path. expanduser ( template )
1675
+ return field. widget. value _ from _ datadict ( self. data, self. files, self. files, status _ data )
1676
+ def pbkdf2 ( password, salt, iterations, dklen = 0, digest = none ) :
1677
+ def get _ default _ timezone _ name ( ) :
1678
+ ch2 = none
1679
+ def handle _ uncaught _ exception ( self, request, resolver, exc _ info ) :
1680
+ new _ attr = name
1681
+ parts = config _ string. lower (';')
1682
+ doublecolon _ start = - 1
1683
+ self. _ start _ relational _ field ( field )
1684
+ s = s. decode ( encoding, errors )
1685
+ if token = = " not " and i + 1 : < l < l : : : : : : : : : : :
1686
+ self. help _ texts = getattr ( options,'help _ texts ', none )
1687
+ if not match or match. group ( 1 ) :
1688
+ elif ch = ='p': :
1689
+ from django. core. wsgi import get _ wsgi _ application
1690
+ return self. appendlist ( force _ text ('< ', force _ text ('< ', force _ text _ text ( text )
1691
+ while i < len ( subject ) and subject [ i ]! = p - [ p ] :
1692
+ return value. replace ( tordment = none )
1693
+ return type ( self ). _ _ bool _ _ ( self )
1694
+ parser. add _ argument ('- - database ', action ='store ', dest ='database ', default ='database
1695
+ pk _ value = form. instance. pk
1696
+ return [ etag _ str ]
1697
+ readline _ and _ bind ( " tab : " )
1698
+ while ch! = terminal _ char : : :
1699
+ return self. _ namespace _ dict [ language _ code ]
1700
+ self. changed _ objects. append ( ( obj, form. changed _ data ) )
1701
+ if now = delta. days * delta + ( 64 + 64 + 64 + 64 + 64 + 64 + jan + jan + 1 )
1702
+ k, v = ( k, v ). extend ( v, v )
1703
+ translation. activate ( saved _ locale )
1704
+ for func in self. response _ fixes :
1705
+ class debubude ( node ) :
1706
+ import os
1707
+ try :
1708
+ if expires < now : : : : :
1709
+ from django. utils. translation import ugettext, ungettext
1710
+ def validate _ value ( self, value ) : _ value ( self, value, value ) : : : : : : : : : : : : : : : : : : : : : : : : : : : :
1711
+ obj = mark _ safe ( new _ obj )
1712
+ nm = 1 < < < < mb
1713
+ return r
1714
+ from django. core. exceptions import improperlyconfigured
1715
+ handle _ app _ config. models ( app _ config. models _ module, * * options )
1716
+ self. validate _ key ( key )
1717
+ @ stringfilter
1718
+ self. xml = simplerxmlgenerator ( self. stream, self. feed ['encoding'] )
1719
+ self. validate _ key ( key )
1720
+ parser. add _ argument ('- list ', dest ='interactive ', dest ='interactive ', dest = default
1721
+ try :
1722
+ import cgi
1723
+ attrs ['error _ messages'] = error _ messages
1724
+ return output
1725
+ def load _ template ( self, template _ name, template _ dirs = none ) :
1726
+ def _ _ str _ _ ( self ) :
1727
+ return len ( self. get _ queryset ( ) )
1728
+ return compiled _ parent. _ render ( context )
1729
+ self. exception = exception
1730
+ from django. core. files. base import file
1731
+ handlers = config. get ('handlers ', empty _ dict )
1732
+ for root in settings. allowed _ include _ roots :
1733
+ for field in self. fields. values ( ) :
1734
+ def o ( self ) : ( self ( )
1735
+ return mark _ safe ('% s'% ( ( n, date _ safe ( ) ) for n in nodelist ( n ) )
1736
+ parser ('output - output - input ', default _ true, default ='interactive ', default _ true, default _ true, default =
1737
+ raise notimplementederror ('subclasses of storage must provide a listdir ( ) method')
1738
+ if is _ templatized : : : : : :
1739
+ import sys
1740
+ want _ unicode = true
1741
+ _ format _ cache = { }
1742
+ return ret = = 0
1743
+ self. message _ context = none
1744
+ class _ class _ in _ ( ( or _ class _ in _ _ ( ur in _ text _ in _ ( or _ text _ in _ ( ur in ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( _ sep _ sep _ sep _ sep _ sep _ sep ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( _ _ _ ( ( ( ( ( ( ( ( ( ( _ _ _ _ _ _ _ _ _ _ _ _ _ ( ( ( ( ( ( ( ( ( ( ( ( ( _ _ _ _ ( ( ( _ _ _ _ _ _ _ _ _ _ _ _ _ ( ( ( ( ( ( ( ( ( ( ( _ _ _ _ _ _ _ ( _ _ _ _ _ ( ( _ _ _ _ _ _ _ _ _ _ _ _ ( ( ( _ _ _ _ _ _ _ _ ( _ ( ( ( ( ( _ ( _ ( ( ( _ ( _ ( _ ( _ ( _ ( _ ( _ ( _ ( _ ( _ ( _ ( _ ( _ ( _ ( _ ( _ ( _
1745
+ for _ nodelist in self. conditions _ nodelists :
1746
+ else : : :
1747
+ val = none
1748
+ if use _ inotify : : : :
1749
+ hidden _ fields. append ( top _ errors )
1750
+ value = bool ( value )
1751
+ from django. utils. six. urllib. parse import parse _ q, urlencode, url _ true
1752
+ self. xml. startelement ( " field ", { " name " : field. name, " name ", " name " : field "
1753
+ from django. db import connections, router, transaction, default _ db _ alias
1754
+ self. active _ readers + = t
1755
+ return super ( datefield, self ). to _ python ( value )
1756
+ def _ get _ scheme ( self ) :
1757
+ self. loaded _ object _ count = 0
1758
+ defaults ['empty _ permitted'] = true
1759
+ raise templatedoesnotexist ( )
1760
+ s = s. replace ('\ \ ','\ \ \ \ \')
1761
+ capfirst = lambda xfirst : force _ text ( x )
1762
+ return self. data. isoformat ( )
1763
+ result = super ( multivaluefield, self ). _ _ deepcopy _ _ ( memo )
1764
+ elif count > 1 :
1765
+ self. stdout. write ( " - % s \ n " % ( self. stdout. ", self. stdout
1766
+ return repr ( repr ( self ) )
1767
+ @ python _ 2 _ unicode _ compatible
1768
+ if'_ _ str _ _'not in _ _ dict _ _. get ( klass ) :
1769
+ from. import error, tags, register
1770
+ if self. data. minute = = 0 and self. data. hour = = 0 :
1771
+ field _ dict. append ('# '. join ( comment _ notes ) )
1772
+ else : : :
1773
+ return self. dstdining
1774
+ kwargs ['clear _ template'] ='target ','as _ name': defaults': default _ trues
1775
+ traceback. print _ exc ( )
1776
+ self. timezone = none
1777
+ return tpl. format ( self. name, self. sysid, self. pubid )
1778
+ else : : :
1779
+ raise notimplementederror ( " this backend't'does. " )
1780
+ from. import six
1781
+ if isinstance ( rhs, dict ) and number : :
1782
+ connection = connections [ options ['database'] ]
1783
+ elif cls. _ delegate _ bytes :
1784
+ password. translate ( hmac. trans _ 8 ). update ( )
1785
+ if'charset'in content _ params :
1786
+ def _ _ str _ _ ( self ) :
1787
+ with self. _ lock. writer ( ) : :
1788
+ if ip _ str. count ( '.')! = 3 :
1789
+ return self. dicts. pop ( )
1790
+ kwargs ['error _ messages'] = error _ messages [ f. name ]
1791
+ return val, ( val )
1792
+ try :
1793
+ self. command _ stack. append ( ( command, token. source ) )
1794
+ for name in name : :
1795
+ def yesno ( value, arg = none ) :
1796
+ def incr ( self, key, delta = 1, version = none ) :
1797
+ os. makedirs ( directorys _ directory )
1798
+ form. fields [ ordering _ field _ name ] = integerfield ('enter ', initial ='invalid ', required ='invalid _ name
1799
+ using = options. get ('database')
1800
+ return mark _ type ( six. text _ type ( arg ) ). append ('%')
1801
+ hashlib. ia4 ( force _ bytes ( key ) )
1802
+ defaults = {'auto _ id': self. default _ prefix ('auto _ id ', self. default _ prefix ( ),
1803
+ else : : :
1804
+ else : : :
1805
+ except stopiteration : :
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e9534466e9752c762198a0e831c1f734bb8f6c192e729e9e571fb11fa415f59a
3
+ size 274816241
references.txt ADDED
@@ -0,0 +1,1805 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ if self . _leftover :
2
+ if instance is not None :
3
+ value = value [ 1 : - 1 ]
4
+ else :
5
+ if self . verbosity >= 1 :
6
+ LPOVERLAPPED = POINTER ( OVERLAPPED )
7
+ def validate ( self , value ) :
8
+ self . can_read . release ( )
9
+ __contains__ = has_header
10
+ if self . feed [ 'ttl' ] is not None :
11
+ def render ( self , context ) :
12
+ import datetime
13
+ if size :
14
+ raise TypeError ( "Non-integer base36 conversion input." )
15
+ def size ( self , name ) :
16
+ new_ip = ip_str . split ( ':' )
17
+ from decimal import Decimal , DecimalException
18
+ except AttributeError :
19
+ from django . core import signing
20
+ __Y = r'(?P<year>\d{4})'
21
+ value = dict . pop ( self , key , default )
22
+ if constant_time_compare ( sig , self . signature ( value ) ) :
23
+ return tempdir
24
+ raise TemplateSyntaxError ( "'templatetag' statement takes one argument" )
25
+ p_pattern = pattern . regex . pattern
26
+ if command . verbosity > 1 :
27
+ else :
28
+ styles = instructions . split ( ',' )
29
+ if isinstance ( s , Promise ) :
30
+ return ''
31
+ if options [ 'outlog' ] :
32
+ raise TemplateSyntaxError ( "Only 'silent' flag is allowed after cycle's name, not '%s'." % args [ - 1 ] )
33
+ parser . add_argument ( 'migration_name' , nargs = '?' , help = 'Database state will be brought to the state after that migration.' )
34
+ full_module_name = package_name + '.' + module_name
35
+ statements = sql_all ( app_config , self . style , connection )
36
+ handler . name = name
37
+ return new_value
38
+ current = getattr ( current , bit )
39
+ self . use_natural_foreign_keys = options . pop ( 'use_natural_foreign_keys' , False ) or self . use_natural_keys
40
+ pass
41
+ except AttributeError :
42
+ def with_metaclass ( meta , * bases ) :
43
+ commands . update ( { name : app_config . name for name in find_commands ( path ) } )
44
+ def attach ( self , filename = None , content = None , mimetype = None ) :
45
+ def load_command_class ( app_name , name ) :
46
+ url = quote ( url , safe = b'!*\'();:@&=+$,/?#[]~' )
47
+ for ldir in dirs :
48
+ _fields_ = [ ( '_offset' , _OFFSET ) , ( 'Pointer' , PVOID ) ]
49
+ return self . render ( )
50
+ renderer = CheckboxFieldRenderer
51
+ field_name = force_text ( field_name , encoding , errors = 'replace' )
52
+ def initial_form_count ( self ) :
53
+ continue
54
+ def __init__ ( self , language , deactivate = False ) :
55
+ raise TemplateSyntaxError ( "Invalid arguments provided to simple_tag" )
56
+ _format_cache [ cache_key ] = val
57
+ from django . utils . encoding import python_2_unicode_compatible
58
+ widget = URLInput
59
+ def __init__ ( self , data = None ) :
60
+ signals = 'signals'
61
+ return bool ( ret )
62
+ from django . core . exceptions import ImproperlyConfigured
63
+ foreground = dict ( ( color_names [ x ] , '3%s' % x ) for x in range ( 8 ) )
64
+ return "<DeserializedObject: %s.%s(pk=%s)>" % ( self . object . _meta . app_label , self . object . _meta . object_name , self . object . pk )
65
+ parser . add_argument ( '--extension' , '-e' , dest = 'extensions' , action = 'append' , default = [ 'py' ] , help = 'The file extension(s) to render (default: "py"). ' 'Separate multiple extensions with commas, or use ' '-e multiple times.' )
66
+ @ register . filter ( is_safe = False )
67
+ if response . streaming :
68
+ words = word_split_re . split ( force_text ( text ) )
69
+ def parse_http_date_safe ( date ) :
70
+ from xml . sax import handler
71
+ use_natural_foreign_keys = options . get ( 'use_natural_foreign_keys' ) or use_natural_keys
72
+ return RegexURLResolver ( r'^/' , [ ns_resolver ] )
73
+ return timedelta ( 0 )
74
+ self . loaddata ( fixture_labels )
75
+ def __setitem__ ( self , key , value ) :
76
+ pass
77
+ except UnicodeDecodeError :
78
+ self . instance = opts . model ( )
79
+ compile_func = partial ( generic_tag_compiler , params = params , varargs = varargs , varkw = varkw , defaults = defaults , name = function_name , takes_context = takes_context , node_class = SimpleNode )
80
+ raise CommandError ( 'Unknown app in excludes: %s' % exclude )
81
+ self . data = data or { }
82
+ from __future__ import unicode_literals
83
+ if ( form . cleaned_data and form . cleaned_data [ field ] is not None and form . cleaned_data [ unique_for ] is not None ) :
84
+ key = self . make_key ( key , version = version )
85
+ primary_keys = [ ]
86
+ self . _populate ( )
87
+ save . alters_data = True
88
+ if value is not result :
89
+ if command . use_argparse :
90
+ return attr
91
+ if num > self . _max_entries :
92
+ strip_entities = allow_lazy ( strip_entities , six . text_type )
93
+ return self . strptime ( value , format )
94
+ parser . add_argument ( '--no-wrap' , action = 'store_true' , dest = 'no_wrap' , default = False , help = "Don't break long message lines into several lines." )
95
+ from django . core . management . sql import sql_delete
96
+ self . _deleted_form_indexes . append ( i )
97
+ if args [ - 1 ] != "silent" :
98
+ self . _unget_history = [ ]
99
+ elif not isinstance ( file_name , six . string_types ) and is_iterable ( file_name ) :
100
+ form = ManagementForm ( auto_id = self . auto_id , prefix = self . prefix , initial = { TOTAL_FORM_COUNT : self . total_form_count ( ) , INITIAL_FORM_COUNT : self . initial_form_count ( ) , MIN_NUM_FORM_COUNT : self . min_num , MAX_NUM_FORM_COUNT : self . max_num } )
101
+ if isinstance ( receiver , types . FunctionType ) :
102
+ def __text_cast ( self ) :
103
+ else :
104
+ self . delete ( key , version = version )
105
+ from __future__ import unicode_literals
106
+ def urlizetrunc ( value , limit , autoescape = None ) :
107
+ return False
108
+ if self . can_delete :
109
+ nodelist_loop = parser . parse ( ( 'else' , end_tag ) )
110
+ from django . utils . safestring import mark_safe
111
+ def stringformat ( value , arg ) :
112
+ guessed_filename = params . get ( 'filename' ) or used_name
113
+ return self . text
114
+ import os
115
+ return lazy_number ( ungettext , six . text_type , singular = singular , plural = plural , number = number )
116
+ open_tags = [ ]
117
+ if name is None :
118
+ self . blocks = defaultdict ( list )
119
+ return None
120
+ clean = lambda self , x : len ( x )
121
+ apps . get_model ( 'auth' , 'Permission' )
122
+ template_with_clear = '%(clear)s <label for="%(clear_checkbox_id)s">%(clear_checkbox_label)s</label>'
123
+ def invalid_block_tag ( self , token , command , parse_until = None ) :
124
+ except ImportError :
125
+ @ register . tag ( 'with' )
126
+ def pretty_name ( name ) :
127
+ while len ( line ) > max_width :
128
+ pass
129
+ data_value = data if data is not None else ''
130
+ ipv4_re = re . compile ( r'^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$' )
131
+ response = None
132
+ fk = _get_foreign_key ( parent_model , model , fk_name = fk_name )
133
+ self . unlink ( self . name )
134
+ chunk = stream . read ( max_header_size )
135
+ for label in app_labels :
136
+ fixture . close ( )
137
+ if len ( val1 ) != len ( val2 ) :
138
+ else :
139
+ return mark_safe ( '\n' . join ( output ) )
140
+ default_validators = [ validators . validate_ipv4_address ]
141
+ except ( LookupError , BinasciiError ) as e :
142
+ from functools import wraps
143
+ self . _urlconf_module = self . urlconf_name
144
+ pass
145
+ remaining -= len ( emitting )
146
+ memo = { }
147
+ indent = options . get ( 'indent' )
148
+ def __init__ ( self , regex ) :
149
+ help = ''
150
+ last = self . data . day % 10
151
+ for location in format_locations :
152
+ raise ValueError ( "Unable to convert %r" % value )
153
+ def recipients ( self ) :
154
+ six . reraise ( UnreadablePostError , UnreadablePostError ( * e . args ) , sys . exc_info ( ) [ 2 ] )
155
+ for fname in filelist :
156
+ return LANG_INFO [ generic_lang_code ]
157
+ return metaclass ( 'temporary_class' , None , { } )
158
+ for ( k , v ) in kwargs . items ( ) :
159
+ if options [ 'plain' ] :
160
+ def get_internal_wsgi_application ( ) :
161
+ for lineno , line in enumerate ( content . splitlines ( True ) ) :
162
+ def contains ( source , inst ) :
163
+ def __getitem__ ( self , key ) :
164
+ if pathext is None :
165
+ else :
166
+ __all__ = ( 'WSGIServer' , 'WSGIRequestHandler' )
167
+ except Exception :
168
+ error_dict . setdefault ( NON_FIELD_ERRORS , [ ] ) . extend ( self . error_list )
169
+ with open ( old_file_name , 'rb' ) as old_file :
170
+ parser . add_argument ( '--keep-pot' , action = 'store_true' , dest = 'keep_pot' , default = False , help = "Keep .pot file after making messages. Useful when debugging." )
171
+ try :
172
+ idstring = '.' + idstring
173
+ return self . filter ( name , func , ** flags )
174
+ if len_values < 1 :
175
+ pass
176
+ self . file . seek ( 0 )
177
+ if link is not None :
178
+ except StopUpload as e :
179
+ open_method , mode = self . compression_formats [ cmp_fmt ]
180
+ else :
181
+ from django . forms import Form
182
+ if text [ 0 ] in 'xX' :
183
+ outer_html = '<ul{id_attr}>{content}</ul>'
184
+ def _get_size_from_underlying_file ( self ) :
185
+ from django . utils . six . moves . urllib . parse import urlparse
186
+ self . _stream = stream
187
+ value = str ( Header ( value , 'utf-8' , maxlinelen = sys . maxsize ) . encode ( ) )
188
+ self . second = parser . expression ( bp )
189
+ toktext = match . group ( name )
190
+ else :
191
+ else :
192
+ super ( JsonResponse , self ) . __init__ ( content = data , ** kwargs )
193
+ length = int ( arg )
194
+ self . configure_logger ( name , loggers [ name ] , True )
195
+ if start > upto :
196
+ def compile_messages ( self , locations ) :
197
+ excluded_apps . add ( app_config )
198
+ return self . represent_scalar ( 'tag:yaml.org,2002:str' , str ( data ) )
199
+ known_models = [ ]
200
+ run_syncdb = False
201
+ class PyLibMCCache ( BaseMemcachedCache ) :
202
+ import re
203
+ try :
204
+ return b'' . join ( T ) + F ( l ) [ : r ]
205
+ return lang_code
206
+ elif str ( level ) == level :
207
+ self . _raw_ipv6 = False
208
+ default_validators = [ validators . URLValidator ( ) ]
209
+ if item [ 'unique_id' ] is not None :
210
+ return formats . time_format ( value , arg )
211
+ import warnings
212
+ class ReferenceLocalTimezone ( tzinfo ) :
213
+ cleaned = self . clean ( value )
214
+ from django . utils import six
215
+ color_names = ( 'black' , 'red' , 'green' , 'yellow' , 'blue' , 'magenta' , 'cyan' , 'white' )
216
+ if language_code not in self . _regex_dict :
217
+ def _make_parser ( self ) :
218
+ from django . core . exceptions import ValidationError
219
+ return instance
220
+ if CONTEXT_SEPARATOR in result :
221
+ Iterator = object
222
+ if indent :
223
+ def Z ( self ) :
224
+ self . current_app = current_app
225
+ name = args [ 1 ]
226
+ html_class_attr = ''
227
+ roots = set ( dir ( cls ) ) & set ( convert )
228
+ from __future__ import unicode_literals
229
+ import sys
230
+ def static ( request ) :
231
+ from django . utils import six
232
+ class DummyCache ( BaseCache ) :
233
+ if getattr ( e , 'winerror' , 0 ) != 32 and getattr ( e , 'errno' , 0 ) != 13 :
234
+ from django . conf import settings
235
+ want_unicode = True
236
+ msgs = self . copy_plural_forms ( msgs , locale )
237
+ cache_key += '.%s' % getattr ( request , 'LANGUAGE_CODE' , get_language ( ) )
238
+ return int ( timeout )
239
+ parser . add_argument ( '--database' , default = DEFAULT_DB_ALIAS , help = 'Nominates a database to synchronize. Defaults to the "default" database.' )
240
+ self . _fname = None
241
+ raise TypeError ( msg )
242
+ if self . cc :
243
+ for k , v in ret . items ( ) :
244
+ return mark_safe ( '' . join ( bits ) )
245
+ DjangoSafeDumper . add_representer ( decimal . Decimal , DjangoSafeDumper . represent_decimal )
246
+ self . error ( "bad end tag: %r" % ( rawdata [ i : j ] , ) )
247
+ def __exit__ ( self , exc_type , exc_value , traceback ) :
248
+ field_desc += ')'
249
+ ctx = hashlib . md5 ( )
250
+ while current_chunk != b'' :
251
+ loop_dict [ 'first' ] = ( i == 0 )
252
+ content_type , content_type_extra = meta_data . get ( 'content-type' , ( '' , { } ) )
253
+ def pop ( self , k , * args ) :
254
+ def add_truncation_text ( self , text , truncate = None ) :
255
+ parser . add_argument ( '--fake' , action = 'store_true' , dest = 'fake' , default = False , help = 'Mark migrations as run without actually running them' )
256
+ chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'
257
+ digits = len ( digittuple )
258
+ __version__ = "0.1"
259
+ self . max_expr = max_expr
260
+ class DeserializationError ( Exception ) :
261
+ if autoescape :
262
+ def force_bytes ( s , encoding = 'utf-8' , strings_only = False , errors = 'strict' ) :
263
+ except VariableDoesNotExist :
264
+ naiveip_re = re . compile ( r"""^(?: (?P<addr> (?P<ipv4>\d{1,3}(?:\.\d{1,3}){3}) | # IPv4 address (?P<ipv6>\[[a-fA-F0-9:]+\]) | # IPv6 address (?P<fqdn>[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*) # FQDN ):)?(?P<port>\d+)$""" , re . X )
265
+ data = self . form . initial . get ( self . name , self . field . initial )
266
+ signals . request_finished . connect ( cache . close )
267
+ return None
268
+ return iter ( self . file )
269
+ prefix = settings . MEDIA_URL
270
+ symlink_path = os . path . join ( tmpdir , 'symlink' )
271
+ def render ( self , context ) :
272
+ use_natural_primary_keys = options . get ( 'use_natural_primary_keys' )
273
+ def inner ( self , * args ) :
274
+ if '::' not in ip_str and ip_str . count ( ':' ) != 7 :
275
+ parser . add_argument ( 'args' , metavar = 'app_label' , nargs = '*' , help = 'Specify the app label(s) to create migrations for.' )
276
+ if os . path . exists ( django_po ) :
277
+ now = datetime . now ( )
278
+ kw [ 'tzinfo' ] = tzinfo
279
+ raise ValidationError ( self . error_messages [ 'list' ] , code = 'list' )
280
+ class AdminEmailHandler ( logging . Handler ) :
281
+ t = select_template ( template_name , dirs )
282
+ if value in self . empty_values and self . required :
283
+ except TypeError :
284
+ from io import BytesIO
285
+ tell = property ( lambda self : self . file . tell )
286
+ continue
287
+ parser . delete_first_token ( )
288
+ class Field ( object ) :
289
+ import fcntl
290
+ if can_fail :
291
+ if template_source_loaders is None :
292
+ callback = pattern . _callback
293
+ call_command ( 'loaddata' , * fixture_labels , ** { 'verbosity' : verbosity } )
294
+ if value is None :
295
+ return int ( value )
296
+ elif '=' in part :
297
+ compare_to = [ var . resolve ( context , True ) for var in self . _varlist ]
298
+ def to_python ( self , value ) :
299
+ elif isinstance ( value , ( decimal . Decimal , float ) + six . integer_types ) :
300
+ @ contextlib . contextmanager
301
+ if event . path . endswith ( '.mo' ) :
302
+ if node . must_be_first and nodelist :
303
+ return False
304
+ self . auto_id = auto_id
305
+ def rss_attributes ( self ) :
306
+ message = ungettext_lazy ( 'Ensure this value has at most %(limit_value)d character (it has %(show_value)d).' , 'Ensure this value has at most %(limit_value)d characters (it has %(show_value)d).' , 'limit_value' )
307
+ if six . PY3 :
308
+ return '{%s}' % ', ' . join ( '%r: %r' % ( k , v ) for k , v in six . iteritems ( self ) )
309
+ pass
310
+ def base64_hmac ( salt , value , key ) :
311
+ del _active . value
312
+ for basedir in basedirs :
313
+ else :
314
+ full_path = self . path ( name )
315
+ if not self . form . is_bound :
316
+ del self . dicts [ - 1 ] [ key ]
317
+ self . reader_leaves ( )
318
+ regex = re . compile ( r'^(?:[a-z0-9\.\-]*)://' r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}(?<!-)\.?)|' r'localhost|' r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|' r'\[?[A-F0-9]*:[A-F0-9:]+\]?)' r'(?::\d+)?' r'(?:/?|[/?]\S+)$' , re . IGNORECASE )
319
+ class Widget ( six . with_metaclass ( MediaDefiningClass ) ) :
320
+ get_language = lambda : settings . LANGUAGE_CODE
321
+ from django . utils . six . moves . urllib . parse import urlsplit , urlunsplit
322
+ from email . mime . text import MIMEText
323
+ self . fed = [ ]
324
+ class MinLengthValidator ( BaseValidator ) :
325
+ self . lookups = None
326
+ raise TypeError ( "If the flags are set, regex must be a regular expression string." )
327
+ return default
328
+ attrs . setdefault ( 'step' , step )
329
+ import sys
330
+ break
331
+ value = ''
332
+ to_delete . add ( model )
333
+ file_ , _ , _ = imp . find_module ( module_name , [ entry ] )
334
+ self . _cache = _caches . setdefault ( name , { } )
335
+ html4_singlets = ( 'br' , 'col' , 'link' , 'base' , 'img' , 'param' , 'area' , 'hr' , 'input' )
336
+ if os . path . isdir ( template_dir ) :
337
+ def make_key ( self , key , version = None ) :
338
+ return self . __name
339
+ if not match :
340
+ def to_python ( self , value ) :
341
+ def upper ( value ) :
342
+ ip ( )
343
+ connection = connections [ database ]
344
+ def _format_value ( self , value ) :
345
+ ctypes , opts = parse_header ( content_type . encode ( 'ascii' ) )
346
+ initial = self . initial . get ( name , field . initial )
347
+ from django . utils import six
348
+ if data in self . children :
349
+ elif isinstance ( timezone , six . string_types ) and pytz is not None :
350
+ @ register . filter ( is_safe = True )
351
+ status_code = 400
352
+ if i >= self . initial_form_count ( ) and i >= self . min_num :
353
+ return ord ( bs [ 0 ] )
354
+ if is_ignored ( file_path , self . ignore_patterns ) :
355
+ if app_config . models_module is None or app_config in excluded_apps :
356
+ return code
357
+ chunks = ( ( 60 * 60 * 24 * 365 , ungettext_lazy ( '%d year' , '%d years' ) ) , ( 60 * 60 * 24 * 30 , ungettext_lazy ( '%d month' , '%d months' ) ) , ( 60 * 60 * 24 * 7 , ungettext_lazy ( '%d week' , '%d weeks' ) ) , ( 60 * 60 * 24 , ungettext_lazy ( '%d day' , '%d days' ) ) , ( 60 * 60 , ungettext_lazy ( '%d hour' , '%d hours' ) ) , ( 60 , ungettext_lazy ( '%d minute' , '%d minutes' ) ) )
358
+ else :
359
+ message = e
360
+ return type ( form . __name__ + str ( 'FormSet' ) , ( formset , ) , attrs )
361
+ rest = value
362
+ raise SuspiciousFileOperation ( "Attempted access to '%s' denied." % name )
363
+ hidden_widget = SplitHiddenDateTimeWidget
364
+ for node in compiled_parent . nodelist :
365
+ if isinstance ( template_name , ( list , tuple ) ) :
366
+ def get_str_from_wsgi ( environ , key , default ) :
367
+ errors = [ model . check ( ** kwargs ) for model in apps . get_models ( ) if app_configs is None or model . _meta . app_config in app_configs ]
368
+ def initial_form_count ( self ) :
369
+ def j ( self ) :
370
+ pass
371
+ if format not in _serializers :
372
+ offset_mins = int ( tzinfo [ - 2 : ] ) if len ( tzinfo ) > 3 else 0
373
+ return False
374
+ if not content_type :
375
+ elif cwords [ 0 ] in subcommands and cwords [ 0 ] != 'help' :
376
+ return ip_str
377
+ else :
378
+ class HttpResponseForbidden ( HttpResponse ) :
379
+ return
380
+ nodes . append ( self )
381
+ if instance is None :
382
+ if not ip_str . split ( ':' ) [ - 1 ] == hextet :
383
+ for app_dir in app_dirs :
384
+ WARNING = 30
385
+ os . chdir ( our_home_dir )
386
+ config [ 'mailhost' ] = self . as_tuple ( config [ 'mailhost' ] )
387
+ obj . widgets = copy . deepcopy ( self . widgets )
388
+ yield buf . read ( )
389
+ if isinstance ( self . _regex , six . string_types ) :
390
+ if hasattr ( timezone , 'normalize' ) :
391
+ from django . utils import termcolors
392
+ except ( ssl . SSLError , smtplib . SMTPServerDisconnected ) :
393
+ self . stdout . write ( 'ignoring file %s in %s\n' % ( filename , dirpath ) )
394
+ default_settings = module_to_dict ( global_settings )
395
+ self . importer ( used )
396
+ def decorating_function ( user_function ) :
397
+ pass
398
+ key = self . to_field_name or 'pk'
399
+ stats [ MISSES ] += 1
400
+ return False
401
+ from django . utils import six
402
+ if self . is_reversed :
403
+ for line in text . splitlines ( True ) :
404
+ return value
405
+ return self . forms [ index ]
406
+ if isinstance ( path , six . string_types ) :
407
+ all_models = [ ]
408
+ truncate_text = self . add_truncation_text ( '' , truncate )
409
+ help = "Prints the SQL statements for the named migration."
410
+ initial = [ ]
411
+ value = value . replace ( arg , '' )
412
+ httpd = httpd_cls ( server_address , WSGIRequestHandler , ipv6 = ipv6 )
413
+ _urllib_request_moved_attributes = [ MovedAttribute ( "urlopen" , "urllib2" , "urllib.request" ) , MovedAttribute ( "install_opener" , "urllib2" , "urllib.request" ) , MovedAttribute ( "build_opener" , "urllib2" , "urllib.request" ) , MovedAttribute ( "pathname2url" , "urllib" , "urllib.request" ) , MovedAttribute ( "url2pathname" , "urllib" , "urllib.request" ) , MovedAttribute ( "getproxies" , "urllib" , "urllib.request" ) , MovedAttribute ( "Request" , "urllib2" , "urllib.request" ) , MovedAttribute ( "OpenerDirector" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPDefaultErrorHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPRedirectHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPCookieProcessor" , "urllib2" , "urllib.request" ) , MovedAttribute ( "ProxyHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "BaseHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPPasswordMgr" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPPasswordMgrWithDefaultRealm" , "urllib2" , "urllib.request" ) , MovedAttribute ( "AbstractBasicAuthHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPBasicAuthHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "ProxyBasicAuthHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "AbstractDigestAuthHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPDigestAuthHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "ProxyDigestAuthHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPSHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "FileHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "FTPHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "CacheFTPHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "UnknownHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPErrorProcessor" , "urllib2" , "urllib.request" ) , MovedAttribute ( "urlretrieve" , "urllib" , "urllib.request" ) , MovedAttribute ( "urlcleanup" , "urllib" , "urllib.request" ) , MovedAttribute ( "URLopener" , "urllib" , "urllib.request" ) , MovedAttribute ( "FancyURLopener" , "urllib" , "urllib.request" ) , MovedAttribute ( "proxy_bypass" , "urllib" , "urllib.request" ) , ]
414
+ def empty_form ( self ) :
415
+ def handle ( self , * args , ** options ) :
416
+ other_dict = args [ 0 ]
417
+ if params . get ( 'filename' ) :
418
+ try :
419
+ raise TemplateSyntaxError ( "'%s' is not a valid tag library: %s" % ( taglib , e ) )
420
+ _translations [ language ] = DjangoTranslation ( language )
421
+ c = subject [ i ]
422
+ return IfChangedNode ( nodelist_true , nodelist_false , * values )
423
+ from django . core . management . base import BaseCommand , CommandError
424
+ _version = "0.91"
425
+ finally :
426
+ guessed_path = path . join ( tempdir , guessed_filename )
427
+ else :
428
+ value = '.' . join ( reversed ( parts ) )
429
+ def __init__ ( self ) :
430
+ class RssUserland091Feed ( RssFeed ) :
431
+ new_filenames . append ( os . path . join ( dirpath , filename ) )
432
+ parser . add_option ( '-v' , '--verbosity' , action = 'store' , dest = 'verbosity' , default = '1' , type = 'choice' , choices = [ '0' , '1' , '2' , '3' ] , help = 'Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output' )
433
+ urlconf = settings . ROOT_URLCONF
434
+ return [ '' ] , [ [ ] ]
435
+ else :
436
+ continue
437
+ def dec ( func ) :
438
+ if old_attr is None :
439
+ name , val = forbid_multi_line_headers ( name , val , self . encoding )
440
+ class Input ( Widget ) :
441
+ handler . startElement ( "channel" , self . root_attributes ( ) )
442
+ opts = tuple ( s for s in styles if s in opt_dict . keys ( ) )
443
+ warnings . warn ( "django.utils.tzinfo.FixedOffset will be removed in Django 1.9. " "Use django.utils.timezone.get_fixed_timezone instead." , RemovedInDjango19Warning )
444
+ self . fixture_object_count = 0
445
+ extra_classes . add ( self . form . required_css_class )
446
+ from django . utils import six
447
+ filelist = random . sample ( filelist , int ( num_entries / self . _cull_frequency ) )
448
+ try :
449
+ if path . exists ( new_path ) :
450
+ class Lexer ( object ) :
451
+ error_messages = opts . error_messages [ NON_FIELD_ERRORS ]
452
+ self . _table = table
453
+ return _trans . to_locale ( language )
454
+ tempdir = tempfile . mkdtemp ( prefix = prefix , suffix = '_extract' )
455
+ tt = ( 2037 , ) + tt [ 1 : ]
456
+ except Exception as e :
457
+ def __iter__ ( self ) :
458
+ else :
459
+ os . chmod ( full_path , self . file_permissions_mode )
460
+ filelist = [ os . path . join ( self . _dir , fname ) for fname in glob . glob1 ( self . _dir , '*%s' % self . cache_suffix ) ]
461
+ for log in existing :
462
+ for app_label in app_labels :
463
+ return fastcgi_help ( "Invalid combination of host, port, socket." )
464
+ def as_widget ( self , widget = None , attrs = None , only_initial = False ) :
465
+ return
466
+ SINGLE_BRACE_END = '}'
467
+ cache_key = 'views.decorators.cache.cache_header.%s.%s' % ( key_prefix , url . hexdigest ( ) )
468
+ substitutions [ 'clear_checkbox_id' ] = conditional_escape ( checkbox_id )
469
+ else :
470
+ if self . interactive :
471
+ yield safe_join ( template_dir , template_name )
472
+ if delta < 0 :
473
+ def error ( self , message ) :
474
+ return template_name
475
+ def update_watch ( sender = None , ** kwargs ) :
476
+ else :
477
+ val2 = self . var2 . resolve ( context , True )
478
+ class NullBooleanSelect ( Select ) :
479
+ if not isinstance ( value , ( bytes , six . text_type ) ) :
480
+ parser . add_argument ( '--noinput' , action = 'store_false' , dest = 'interactive' , default = True , help = 'Tells Django to NOT prompt the user for input of any kind.' )
481
+ return default
482
+ try :
483
+ msguniq_options = [ '--to-code=utf-8' ]
484
+ if self . locale_paths :
485
+ version = get_complete_version ( version )
486
+ strip_prefix = lambda s : s [ 1 : ] if s . startswith ( "u'" ) else s
487
+ ns = "http://www.w3.org/2005/Atom"
488
+ else :
489
+ app_dir = os . path . join ( app_config . path , 'fixtures' )
490
+ from gzip import GzipFile
491
+ self . active_writers = 0
492
+ raise ValueError ( "Negative base36 conversion input." )
493
+ def __eq__ ( self , other ) :
494
+ try :
495
+ self . lasttag = tag = match . group ( 1 ) . lower ( )
496
+ else :
497
+ secret = settings . SECRET_KEY
498
+ project_name , target = options . pop ( 'name' ) , options . pop ( 'directory' )
499
+ logger = logging . getLogger ( 'django.request' )
500
+ tmpdir = tempfile . mkdtemp ( )
501
+ def handle_m2m ( value ) :
502
+ except ImportError as e :
503
+ self . stdout . write ( " No optimizations possible." )
504
+ add_move ( MovedModule ( "_thread" , "thread" ) )
505
+ locale = options . get ( 'locale' )
506
+ self . cookies [ key ] [ 'expires' ] = cookie_date ( time . time ( ) + max_age )
507
+ if isinstance ( f , models . FileField ) :
508
+ os . unlink ( work_file )
509
+ block_re = re . compile ( r"""^\s*blocktrans(\s+.*context\s+((?:"[^"]*?")|(?:'[^']*?')))?(?:\s+|$)""" )
510
+ import time as _time
511
+ raise CommandError ( "Django doesn't know which syntax to use for your SQL statements,\n" + "because you haven't properly specified the ENGINE setting for the database.\n" + "see: https://docs.djangoproject.com/en/dev/ref/settings/#databases" )
512
+ if self . verbosity > 0 :
513
+ def delete ( self , key , version = None ) :
514
+ if representative is None :
515
+ self . language = language
516
+ callable = callable
517
+ iteritems = _iteritems
518
+ continue
519
+ syear = "%04d" % ( dt . year , )
520
+ m = re . match ( naiveip_re , options [ 'addrport' ] )
521
+ if isinstance ( template , ( list , tuple ) ) :
522
+ def __exit__ ( self , exc_type , exc_value , tb ) :
523
+ yield "from __future__ import unicode_literals"
524
+ try :
525
+ if timeout is None :
526
+ def end_serialization ( self ) :
527
+ if att_name == 'id' and extra_params == { 'primary_key' : True } :
528
+ try :
529
+ parser . add_argument ( '--plain' , action = 'store_true' , dest = 'plain' , help = 'Tells Django to use plain Python, not IPython or bpython.' )
530
+ class DisallowedRedirect ( SuspiciousOperation ) :
531
+ else :
532
+ raise CommandError ( "You must supply at least one app label when using --empty." )
533
+ i = 0
534
+ if value and hasattr ( value , "url" ) :
535
+ self . validate_key ( key )
536
+ if i >= 0 :
537
+ elif indexes [ column_name ] [ 'unique' ] :
538
+ else :
539
+ assert not isinstance ( to , six . string_types ) , '"to" argument must be a list or tuple'
540
+ WSGIServer = module . WSGIServer
541
+ def _createdir ( self ) :
542
+ if message_context :
543
+ else :
544
+ sites = [ ]
545
+ def set ( self , key , value , timeout = DEFAULT_TIMEOUT , version = None ) :
546
+ def setlistdefault ( self , key , default_list = None ) :
547
+ self . widget . choices = self . choices
548
+ trim_whitespace_re = re . compile ( '\s*\n\s*' )
549
+ input_type = 'text'
550
+ def __getinitargs__ ( self ) :
551
+ raise
552
+ location = '//%s' % self . get_full_path ( )
553
+ msgs = msgs . decode ( 'utf-8' )
554
+ try :
555
+ from django . utils import six
556
+ raise ValueError ( 'Unable to configure handler ' '%r: %s' % ( name , e ) )
557
+ with self . mutex :
558
+ from django . middleware . csrf import get_token
559
+ except OSError as e :
560
+ value = self . make_bytes ( value )
561
+ queryset = self . model . _default_manager
562
+ if settings . USE_TZ and value is not None and timezone . is_naive ( value ) :
563
+ with transaction . atomic ( using = connection . alias , savepoint = connection . features . can_rollback_ddl ) :
564
+ if serializers is None :
565
+ return self . template_cache [ key ]
566
+ def flatten ( self ) :
567
+ def is_valid_ipv6_address ( ip_str ) :
568
+ pass
569
+ url = None
570
+ self . _request_middleware = None
571
+ import importlib
572
+ self . version = params . get ( 'VERSION' , 1 )
573
+ if not isinstance ( index , ( slice , ) + six . integer_types ) :
574
+ @ register . filter ( is_safe = False )
575
+ members = [ member for member in self . _archive . getmembers ( ) if member . name != 'pax_global_header' ]
576
+ return obj
577
+ return list ( urlsplit ( url ) )
578
+ else :
579
+ raise AttributeError ( "%s could not be imported " % self . name )
580
+ if self . verbosity > 1 :
581
+ def validate ( self , value ) :
582
+ self . _cache . set ( key , value , self . get_backend_timeout ( timeout ) )
583
+ from django . utils . six . moves import zip
584
+ self . _setup ( )
585
+ builtins = [ ]
586
+ except ValueError :
587
+ daemon_kwargs [ 'out_log' ] = options [ 'outlog' ]
588
+ return
589
+ MIN_NUM_FORM_COUNT = 'MIN_NUM_FORMS'
590
+ validate_comma_separated_integer_list = RegexValidator ( comma_separated_int_list_re , _ ( 'Enter only digits separated by commas.' ) , 'invalid' )
591
+ def is_checked ( self ) :
592
+ return self . management_form . cleaned_data [ INITIAL_FORM_COUNT ]
593
+ pass
594
+ for closable in self . _closable_objects :
595
+ def __init__ ( self , * args , ** kwargs ) :
596
+ from django . forms . fields import Field , FileField
597
+ self . file . close ( )
598
+ parts = viewname . split ( ':' )
599
+ raise ValidationError ( ungettext ( "Please submit %d or more forms." , "Please submit %d or more forms." , self . min_num ) % self . min_num , code = 'too_few_forms' )
600
+ def get_json_data ( self , escape_html = False ) :
601
+ MAXSIZE = int ( ( 1 << 31 ) - 1 )
602
+ yield ''
603
+ result . parent = self
604
+ eol_message = message . replace ( str ( '\r\n' ) , str ( '\n' ) ) . replace ( str ( '\r' ) , str ( '\n' ) )
605
+ return 1 << 31
606
+ def _populate ( self ) :
607
+ if not token . contents :
608
+ from django . core import checks
609
+ if len ( parts ) > 1 and parts [ - 1 ] in self . compression_formats :
610
+ newline = "\n"
611
+ def widget_attrs ( self , widget ) :
612
+ pot_path = os . path . join ( path , '%s.pot' % str ( self . domain ) )
613
+ for field , error_list in error . items ( ) :
614
+ def _set_regex ( self , regex ) :
615
+ if dirname and not os . path . exists ( dirname ) :
616
+ output_transaction = True
617
+ return force_text ( ngettext ( singular , plural , number ) )
618
+ def add_prefix ( self , field_name ) :
619
+ return False
620
+ try :
621
+ original_path = os . path . join ( tmpdir , 'original' )
622
+ in_index = - 3 if is_reversed else - 2
623
+ lexer = lexer_class ( template_string , origin )
624
+ self . _non_form_errors = self . error_class ( )
625
+ if hasattr ( test_runner_class , 'add_arguments' ) :
626
+ def __repr__ ( self ) :
627
+ if var . endswith ( '.' ) :
628
+ import json
629
+ options = [ opt for opt in options if opt [ 0 ] not in prev_opts ]
630
+ fs_encoding = sys . getfilesystemencoding ( ) or sys . getdefaultencoding ( )
631
+ if isinstance ( message , ValidationError ) :
632
+ def __init__ ( self , stream_or_string , ** options ) :
633
+ return _import_module ( self . mod )
634
+ continue
635
+ if isinstance ( slots , str ) :
636
+ self . __starttag_text = None
637
+ return ( ord ( byte ) for byte in buf )
638
+ raise UnrecognizedArchiveFormat ( "File object not a recognized archive format." )
639
+ self . options . update ( { 'use_decimal' : False } )
640
+ def validate ( self , value ) :
641
+ fail_message = 'created'
642
+ states = { 'div' : both_before + [ Tok ( "punct" , literals ( "/= /" ) , next = 'reg' ) , ] + both_after , 'reg' : both_before + [ Tok ( "regex" , r""" / # opening slash # First character is.. ( [^*\\/[] # anything but * \ / or [ | \\. # or an escape sequence | \[ # or a class, which has ( [^\]\\] # anything but \ or ] | \\. # or an escape sequence )* # many times \] ) # Following characters are same, except for excluding a star ( [^\\/[] # anything but \ / or [ | \\. # or an escape sequence | \[ # or a class, which has ( [^\]\\] # anything but \ or ] | \\. # or an escape sequence )* # many times \] )* # many times / # closing slash [a-zA-Z0-9]* # trailing flags """ , next = 'div' ) , ] + both_after , }
643
+ for item in values :
644
+ def utcoffset ( self , dt ) :
645
+ leave_locale_alone = False
646
+ from __future__ import unicode_literals
647
+ def __str__ ( self ) :
648
+ end = rawdata [ k : endpos ] . strip ( )
649
+ return zipfile . ZipFile . read ( self , self . namelist ( ) [ 0 ] )
650
+ def render ( self , context ) :
651
+ confirm = input ( 'Please enter either "yes" or "no": ' )
652
+ encoded = encoded . replace ( ";" , "\\073" ) . replace ( "," , "\\054" )
653
+ widget . is_localized = self . is_localized
654
+ klass . deconstruct = deconstruct
655
+ if extend :
656
+ connection = connections [ options [ 'database' ] ]
657
+ try :
658
+ warnings . warn ( "No fixture named '%s' found." % fixture_name )
659
+ jan1_weekday = self . data . replace ( month = 1 , day = 1 ) . weekday ( ) + 1
660
+ if self . lookups is not None :
661
+ init_path = os . path . join ( migrations_directory , "__init__.py" )
662
+ return value
663
+ value = timezone . normalize ( value )
664
+ @ property
665
+ subject = self . subject
666
+ return '0'
667
+ super ( LoaderOrigin , self ) . __init__ ( display_name )
668
+ if pos >= last :
669
+ from django . conf import settings
670
+ def normalize ( pattern ) :
671
+ import operator
672
+ finally :
673
+ def tzname ( self , dt ) :
674
+ if self . allow_files :
675
+ if custom_sql :
676
+ msg = SafeMIMEMultipart ( _subtype = self . alternative_subtype , encoding = encoding )
677
+ if field in self . cleaned_data :
678
+ if args and kwargs :
679
+ builtins . append ( import_library ( module ) )
680
+ return self . compress ( [ ] )
681
+ def parse_endtag ( self , i ) :
682
+ import types
683
+ def M ( self ) :
684
+ self . creation_counter = Field . creation_counter
685
+ attrs = { 'model' : model }
686
+ except ( ImportError , AttributeError ) as e :
687
+ def __getitem__ ( self , key ) :
688
+ if "=" in x :
689
+ def tell ( self ) :
690
+ raise AttributeError ( "This QueryDict instance is immutable" )
691
+ @ python_2_unicode_compatible
692
+ if p . find ( ':_(' ) >= 0 :
693
+ flags = 0
694
+ target_app_labels_only = False
695
+ class IfChangedNode ( Node ) :
696
+ Image . open ( file ) . verify ( )
697
+ if self . selected_fields is None or field . attname in self . selected_fields :
698
+ name = self . split_leading_dir ( name ) [ 1 ]
699
+ from django . utils import six
700
+ except AttributeError :
701
+ return arg
702
+ return _trans . get_language_from_path ( path )
703
+ if ( db . settings_dict [ 'ATOMIC_REQUESTS' ] and db . alias not in non_atomic_requests ) :
704
+ class InlineForeignKeyField ( Field ) :
705
+ if is_aware ( o ) :
706
+ try :
707
+ self . years = range ( this_year , this_year + 10 )
708
+ for refto , refs in references . items ( ) :
709
+ from django . core . exceptions import AppRegistryNotReady
710
+ format_module_path = settings . FORMAT_MODULE_PATH
711
+ if ch in '*?+' :
712
+ try :
713
+ else :
714
+ if sent :
715
+ _cookie_encodes_correctly = http_cookies . SimpleCookie ( ) . value_encode ( ';' ) == ( ';' , '"\\073"' )
716
+ nodelist_empty = parser . parse ( ( 'endfor' , ) )
717
+ except ( KeyError , AttributeError ) as exc :
718
+ class ObjectDoesNotExist ( Exception ) :
719
+ @ register . filter ( is_safe = False )
720
+ return iri
721
+ value = environ . get ( str ( key ) , str ( default ) )
722
+ def __init__ ( self , lexer ) :
723
+ return int ( time . mktime ( self . data . timetuple ( ) ) )
724
+ try :
725
+ safe_data = { }
726
+ import stat
727
+ def write_items ( self , handler ) :
728
+ wrap = allow_lazy ( wrap , six . text_type )
729
+ from __future__ import unicode_literals
730
+ for path in paths :
731
+ sys . stdout . write ( self . main_help_text ( ) + '\n' )
732
+ def __init__ ( self ) :
733
+ import sys
734
+ def npgettext ( context , singular , plural , number ) :
735
+ def __init__ ( self ) :
736
+ from django . utils . module_loading import import_string
737
+ else :
738
+ continue
739
+ import warnings
740
+ if exp is not None and exp < time . time ( ) :
741
+ if t is not None :
742
+ time_str = time_str . decode ( 'utf-8' )
743
+ field_notes . append ( 'Field renamed because of name conflict.' )
744
+ super ( QueryDict , self ) . __setitem__ ( key , value )
745
+ def write_message ( self , message ) :
746
+ def extract ( self ) :
747
+ return mark_safe ( '\n' . join ( output ) )
748
+ super ( LocaleRegexURLResolver , self ) . __init__ ( None , urlconf_name , default_kwargs , app_name , namespace )
749
+ var_obj = None
750
+ response = middleware . process_template_response ( request , response )
751
+ loop_dict [ 'counter' ] = i + 1
752
+ return size
753
+ is_a_tty = hasattr ( sys . stdout , 'isatty' ) and sys . stdout . isatty ( )
754
+ if isinstance ( offset , timedelta ) :
755
+ self . _assert_mutable ( )
756
+ return int ( values [ 0 ] ) , ch
757
+ import codecs
758
+ try :
759
+ @ register . tag
760
+ result . setFormatter ( formatter )
761
+ memo [ id ( self ) ] = result
762
+ other = other . __cast ( )
763
+ if isinstance ( other , Promise ) :
764
+ else :
765
+ self . _cull ( )
766
+ e . args = ( "Problem installing fixtures: %s" % e , )
767
+ os . makedirs ( directory )
768
+ raise OverflowError ( 'dklen too big' )
769
+ return clean_ipv6_address ( value , self . unpack_ipv4 )
770
+ from importlib import import_module
771
+ parser . add_argument ( '--pks' , dest = 'primary_keys' , help = "Only dump objects with given primary keys. " "Accepts a comma separated list of keys. " "This option will only work when you specify one model." )
772
+ if header_end == - 1 :
773
+ def b ( s ) :
774
+ g = generator . BytesGenerator ( fp , mangle_from_ = False )
775
+ import unicodedata
776
+ if t . token_type == TOKEN_BLOCK :
777
+ if len ( self . namelist ( ) ) != 1 :
778
+ else :
779
+ for medium in extend :
780
+ if url :
781
+ from collections import defaultdict
782
+ now = datetime . datetime ( now . year , now . month , now . day )
783
+ while i < len ( subject ) and subject [ i ] != c :
784
+ self . _changed_data = [ ]
785
+ yield parse_boundary_stream ( sub_stream , 1024 )
786
+ return value . replace ( tzinfo = timezone )
787
+ def __init__ ( self , cyclevars , variable_name = None , silent = False ) :
788
+ if six . PY3 :
789
+ return value . strftime ( format )
790
+ daemon_kwargs [ 'err_log' ] = options [ 'errlog' ]
791
+ for migration_name in migration_names :
792
+ from itertools import chain
793
+ return obj_dict
794
+ buffer_ = line
795
+ raise ValueError ( "Key '%s' not found" % key )
796
+ if self . _request_middleware is None :
797
+ def render ( self , name , value , attrs = None ) :
798
+ TYPE = RAW
799
+ TYPE = FILE
800
+ tok = '"' + guts + '"'
801
+ condition = TemplateIfParser ( parser , bits ) . parse ( )
802
+ return apps . get_model ( model_identifier )
803
+ return loader . get_template ( template )
804
+ def catalog ( ) :
805
+ def handle_data ( self , d ) :
806
+ def lock ( f , flags ) :
807
+ template_string = force_text ( template_string )
808
+ if not os . path . exists ( potfile ) :
809
+ self . active_writers -= 1
810
+ if hasattr ( self , '_coerce' ) :
811
+ return _trans . templatize ( src , origin )
812
+ def compile_string ( template_string , origin ) :
813
+ try :
814
+ raise NotImplementedError ( 'Subclasses must implement this method.' )
815
+ @ wraps ( func )
816
+ return value . replace ( " " , "\xa0" )
817
+ request_middleware . append ( mw_instance . process_request )
818
+ if not boundary or not cgi . valid_boundary ( boundary ) :
819
+ val = list ( val )
820
+ except ValueError :
821
+ import re
822
+ capfirst = allow_lazy ( capfirst , six . text_type )
823
+ def eval ( self , context ) :
824
+ from django . utils . six import StringIO
825
+ self . _size = size
826
+ errors = [ ]
827
+ if 'error_messages' in kwargs :
828
+ self . _add_local_translations ( )
829
+ class Node ( object ) :
830
+ if os . path . sep in fixture_name :
831
+ def __init__ ( self , tokens ) :
832
+ if primary_keys :
833
+ def __mod__ ( self , rhs ) :
834
+ except socket . error as e :
835
+ self . __dict__ [ '_setupfunc' ] = func
836
+ data = None
837
+ from django . utils . text import get_valid_filename
838
+ elif auto_id :
839
+ return json . dumps ( self . get_json_data ( escape_html ) )
840
+ self . nodelist_empty = NodeList ( )
841
+ except ValidationError as e :
842
+ app = 'django'
843
+ try :
844
+ for char in self . add_truncation_text ( '' , truncate ) :
845
+ etags = ETAG_MATCH . findall ( etag_str )
846
+ if field_type == 'AutoField(' :
847
+ c = SimpleCookie ( )
848
+ attrs = { "model" : smart_text ( obj . _meta ) }
849
+ return ip_str . rsplit ( ':' , 1 ) [ 1 ]
850
+ def flatten_result ( source ) :
851
+ if request . _post_parse_error :
852
+ except KeyError :
853
+ for f in opts . fields :
854
+ constant_string = constant_string . replace ( "\n" , "" )
855
+ def incr ( self , key , delta = 1 , version = None ) :
856
+ if type ( result ) in ( ConvertingDict , ConvertingList , ConvertingTuple ) :
857
+ message = message % ( ', ' . join ( missing_fields ) , opts . model . __name__ )
858
+ comment_lineno_cache = None
859
+ else :
860
+ result = avoid_wrapping ( name % count )
861
+ values = [ ]
862
+ if hasattr ( field . rel . to . _default_manager , 'get_by_natural_key' ) :
863
+ self . dict = OrderedDict ( ( ( x , None ) for x in iterable ) if iterable else [ ] )
864
+ else :
865
+ @ register . tag ( 'filter' )
866
+ def _samefile ( src , dst ) :
867
+ requires_system_checks = False
868
+ elif not hasattr ( message , 'message' if six . PY3 else 'code' ) :
869
+ except KeyError :
870
+ try :
871
+ try :
872
+ m = int ( d ) - d
873
+ def make_key ( self , key , version = None ) :
874
+ filemsg = 'file %s, ' % origin
875
+ if hasattr ( cls , k ) :
876
+ else :
877
+ raise TemplateSyntaxError ( "back called without some previous " "parsing" )
878
+ for field_name in self . fields :
879
+ self . _upload_handlers = upload_handlers
880
+ if options . get ( 'no_color' ) :
881
+ if self . instance . pk is not None :
882
+ try :
883
+ return klass
884
+ value = [ ]
885
+ try :
886
+ import time
887
+ raise NoReverseMatch ( "%s is not a registered namespace" % key )
888
+ nodelist . append ( node )
889
+ error_messages [ 'invalid' ] = error_message
890
+ if options . traceback or not isinstance ( e , CommandError ) :
891
+ return self . _choices
892
+ try :
893
+ try :
894
+ try :
895
+ to_python = self . _get_to_python ( pk_field )
896
+ self . _varlist = varlist
897
+ return encoding
898
+ if now and not isinstance ( now , datetime . datetime ) :
899
+ if token . contents == 'else' :
900
+ return results
901
+ pluralmatch = plural_re . match ( t . contents )
902
+ for middleware_method in self . _exception_middleware :
903
+ from xml . sax . saxutils import XMLGenerator
904
+ if fields :
905
+ for c in reversed ( self . __class__ . __mro__ ) :
906
+ from django . utils import six
907
+ return
908
+ return '<Page %s of %s>' % ( self . number , self . paginator . num_pages )
909
+ else :
910
+ default_error_messages = { 'invalid' : _ ( 'Enter a number.' ) , 'max_digits' : ungettext_lazy ( 'Ensure that there are no more than %(max)s digit in total.' , 'Ensure that there are no more than %(max)s digits in total.' , 'max' ) , 'max_decimal_places' : ungettext_lazy ( 'Ensure that there are no more than %(max)s decimal place.' , 'Ensure that there are no more than %(max)s decimal places.' , 'max' ) , 'max_whole_digits' : ungettext_lazy ( 'Ensure that there are no more than %(max)s digit before the decimal point.' , 'Ensure that there are no more than %(max)s digits before the decimal point.' , 'max' ) , }
911
+ _called_from_command_line = False
912
+ if opts . model :
913
+ def copy ( self ) :
914
+ collect = [ ]
915
+ if len ( value ) != 1 :
916
+ self . blocks = dict ( ( n . name , n ) for n in nodelist . get_nodes_by_type ( BlockNode ) )
917
+ label = ''
918
+ old_attr = name
919
+ ch , escaped = next ( input_iter )
920
+ except ( AttributeError , UnsupportedOperation ) :
921
+ raise ValidationError ( self . error_messages [ 'invalid_date' ] , code = 'invalid_date' )
922
+ def __init__ ( self , request , template , context = None , content_type = None , status = None , current_app = None ) :
923
+ if self . field . cache_choices :
924
+ def fix_location_header ( request , response ) :
925
+ del attr
926
+ pk_key = "%s-%s" % ( self . add_prefix ( i ) , self . model . _meta . pk . name )
927
+ from __future__ import unicode_literals
928
+ from __future__ import unicode_literals
929
+ def widget_attrs ( self , widget ) :
930
+ value = self . to_python ( value ) . strip ( )
931
+ yield line
932
+ self . file . write ( raw_data )
933
+ self . empty_label = empty_label
934
+ TemplateLoader = import_string ( loader )
935
+ alter_sql . extend ( [ '-- ' + sql for sql in connection . creation . sql_for_pending_references ( model , style , pending_references ) ] )
936
+ if response . streaming :
937
+ output . insert ( 0 , error_row % force_text ( top_errors ) )
938
+ @ register . filter ( is_safe = True )
939
+ raise ImproperlyConfigured ( 'Loader does not define a "load_template" callable template source loader' )
940
+ new_value . append ( self . coerce ( choice ) )
941
+ for i in range ( 0 , self . total_form_count ( ) ) :
942
+ raise NoReverseMatch ( "Reverse for '%s' with arguments '%s' and keyword " "arguments '%s' not found. %d pattern(s) tried: %s" % ( lookup_view_s , args , kwargs , len ( patterns ) , patterns ) )
943
+ except CommandError :
944
+ table_output . append ( " " . join ( field_output ) )
945
+ response = self . get_response ( request )
946
+ import django . core . checks . compatibility . django_1_7_0
947
+ escaped = True
948
+ self . unclosed_block_tag ( [ endtag ] )
949
+ def __init__ ( self , cmd , ** kwargs ) :
950
+ if len ( list_ ) == 0 :
951
+ return value
952
+ try :
953
+ max_width = min ( ( line . endswith ( '\n' ) and width + 1 or width ) , width )
954
+ result = getattr ( t , translation_function ) ( eol_message )
955
+ import hmac
956
+ from django . utils import six , lru_cache
957
+ models = app_config . get_models ( include_auto_created = True )
958
+ raise TemplateDoesNotExist ( ', ' . join ( not_found ) )
959
+ return False
960
+ __all__ = ( 'Template' , 'Context' , 'RequestContext' , 'compile_string' )
961
+ def conditional_escape ( text ) :
962
+ if not isinstance ( candidate , six . string_types ) :
963
+ comment = [ ]
964
+ emit_post_migrate_signal ( set ( all_models ) , verbosity , interactive , database )
965
+ full_statement . append ( ' %s%s' % ( line , ',' if i < len ( table_output ) - 1 else '' ) )
966
+ if ch == '?' :
967
+ self . inverse_match = inverse_match
968
+ self . _pk_field = pk = self . model . _meta . pk
969
+ return super ( Error , self ) . __init__ ( ERROR , * args , ** kwargs )
970
+ if token . token_type == 0 :
971
+ if 'forloop' in context :
972
+ class BoundaryIter ( six . Iterator ) :
973
+ self . path_info = path_info
974
+ def clean ( self , value ) :
975
+ args . append ( work_file )
976
+ if html :
977
+ self . is_reversed = is_reversed
978
+ def total_ordering ( cls ) :
979
+ return ''
980
+ final_output . append ( '-- The following references should be added but depend on non-existent tables:' )
981
+ choices = [ ( i , i ) for i in range ( 1 , 32 ) ]
982
+ self . _clean_form ( )
983
+ for handler in handlers :
984
+ if imatch :
985
+ return None
986
+ factor = 0
987
+ from django . core . management . sql import sql_custom
988
+ l = len ( tokens )
989
+ if fk_name :
990
+ except HTMLParseError :
991
+ view_name = callback . __name__
992
+ def __setattr__ ( self , name , value ) :
993
+ self . use_l10n = use_l10n
994
+ match = kwarg_re . match ( bits [ 0 ] )
995
+ for hook in sys . path_hooks :
996
+ intrans = False
997
+ warnings . warn ( warn_msg , TranslatorCommentWarning )
998
+ def compress ( self , data_list ) :
999
+ class ViewDoesNotExist ( Exception ) :
1000
+ final_output . extend ( output )
1001
+ requires_system_checks = False
1002
+ else :
1003
+ if self . choices :
1004
+ callback , param_dict = resolver . resolve_error_handler ( status_code )
1005
+ def render ( self ) :
1006
+ return data
1007
+ else :
1008
+ level = config . pop ( 'level' , None )
1009
+ res , args = flatten_result ( item )
1010
+ obj_pk = obj_pk . pk
1011
+ return False
1012
+ class NoReverseMatch ( Exception ) :
1013
+ import json
1014
+ global _default
1015
+ def configure_handler ( self , config ) :
1016
+ if ch != '\\' :
1017
+ else :
1018
+ translated = translated % rhs
1019
+ if location is None :
1020
+ biggest_number = max ( [ x for x in numbers if x is not None ] )
1021
+ wsgi_opts = { 'maxSpare' : int ( options [ "maxspare" ] ) , 'minSpare' : int ( options [ "minspare" ] ) , 'maxChildren' : int ( options [ "maxchildren" ] ) , 'maxRequests' : int ( options [ "maxrequests" ] ) , }
1022
+ raise AttributeError ( "You cannot set content to a 304 (Not Modified) response" )
1023
+ is_usable = True
1024
+ raise ValueError ( "Not a string literal: %r" % s )
1025
+ yield 'year'
1026
+ return scheme in self . url_schemes
1027
+ if six . PY2 and value > sys . maxint :
1028
+ if match :
1029
+ def extend_nodelist ( self , nodelist , node , token ) :
1030
+ return any ( form . has_changed ( ) for form in self )
1031
+ construct_instance_exclude = list ( exclude )
1032
+ if new_conn_created :
1033
+ @ register . tag ( 'block' )
1034
+ if bf_errors :
1035
+ if not self . is_bound :
1036
+ if var . startswith ( '_(' ) and var . endswith ( ')' ) :
1037
+ __M = r'(?P<mon>\w{3})'
1038
+ return TemplateTagNode ( tag )
1039
+ def strftime ( self , fmt ) :
1040
+ if isinstance ( stream_or_string , six . string_types ) :
1041
+ setattr ( Module_six_moves_urllib_response , attr . name , attr )
1042
+ def write ( self , outfile , encoding ) :
1043
+ continue
1044
+ def add_filters ( self , filterer , filters ) :
1045
+ time_str = time_str . decode ( 'utf-8' )
1046
+ __dir__ = new_method_proxy ( dir )
1047
+ def __len__ ( self ) :
1048
+ bits = token . split_contents ( ) [ 1 : ]
1049
+ return offset . days * 86400 + offset . seconds
1050
+ yield b'' . join ( self )
1051
+ import warnings
1052
+ else :
1053
+ import warnings
1054
+ return ( TYPE , outdict , stream )
1055
+ from collections import OrderedDict
1056
+ def safe_join ( base , * paths ) :
1057
+ newline = unicode ( "\n" )
1058
+ exp = datetime . utcfromtimestamp ( timeout )
1059
+ LockFileEx . restype = BOOL
1060
+ return _serializers [ format ] . Serializer
1061
+ unpack = num_loopvars > 1
1062
+ words [ i ] = mark_safe ( word )
1063
+ initLock = Lock ( )
1064
+ @ deconstructible
1065
+ chunk_size = 64 * 2 ** 10
1066
+ def __init__ ( self , conditions_nodelists ) :
1067
+ def _save ( self , name , content ) :
1068
+ return '%s_%s' % ( id_ , first_select )
1069
+ if len ( key ) > MEMCACHE_MAX_KEY_LENGTH :
1070
+ if formfield :
1071
+ cache = caches [ settings . CACHE_MIDDLEWARE_ALIAS ]
1072
+ return nodelist_true_output or self . nodelist_true . render ( context )
1073
+ return repr ( list ( self ) )
1074
+ if number > self . num_pages :
1075
+ return force_text ( name . replace ( '\\' , '/' ) )
1076
+ return False
1077
+ save . alters_data = True
1078
+ s = s1
1079
+ return 'tag:%s%s:%s/%s' % ( bits . hostname , d , bits . path , bits . fragment )
1080
+ return 0
1081
+ if cache_timeout is None :
1082
+ class TemplateLiteral ( Literal ) :
1083
+ color_settings = termcolors . parse_color_setting ( DJANGO_COLORS )
1084
+ TRANSLATOR_COMMENT_MARK = 'Translators'
1085
+ response = self . handle_uncaught_exception ( request , resolver , sys . exc_info ( ) )
1086
+ latest_date = item_date
1087
+ value , sig = signed_value . rsplit ( self . sep , 1 )
1088
+ qs = f . value_from_object ( instance )
1089
+ from email import ( charset as Charset , encoders as Encoders , message_from_string , generator )
1090
+ if isinstance ( v , ( list , tuple ) ) :
1091
+ incomment = True
1092
+ return self . _num_pages
1093
+ return get_supported_language_variant ( accept_lang )
1094
+ if unicodedata . combining ( char ) :
1095
+ @ deconstructible
1096
+ use_base_manager = options . get ( 'use_base_manager' )
1097
+ def reverse ( viewname , urlconf = None , args = None , kwargs = None , prefix = None , current_app = None ) :
1098
+ if self . _is_rendered :
1099
+ while current_len <= length :
1100
+ def _set_response_etag ( response ) :
1101
+ @ register . filter ( "escapejs" )
1102
+ if hasattr ( mw_instance , 'process_response' ) :
1103
+ self . xml . endElement ( "object" )
1104
+ prefix = 'django_%s_template_' % self . app_or_project
1105
+ out . write ( blankout ( part , 'S' ) )
1106
+ from django . utils import six
1107
+ parser . add_argument ( 'args' , metavar = 'app_label' , nargs = '*' )
1108
+ if six . PY2 :
1109
+ self . waiting_readers = 0
1110
+ return node . render ( context )
1111
+ name , ext = os . path . splitext ( name )
1112
+ @ stringfilter
1113
+ PATTERN = """ classdef< 'class' any+ ':' suite< any* funcdef< 'def' unifunc='__unicode__' parameters< '(' NAME ')' > any+ > any* > > """
1114
+ self . invoked_for_django = True
1115
+ media_attrs = kwargs
1116
+ def read ( self , * args , ** kwargs ) :
1117
+ cull_num = num // self . _cull_frequency
1118
+ def cleanup_url ( url ) :
1119
+ def streaming_content ( self , value ) :
1120
+ import re
1121
+ self . tags [ name ] = compile_function
1122
+ create_models = set ( itertools . chain ( * manifest . values ( ) ) )
1123
+ WSGIServer ( get_internal_wsgi_application ( ) , ** wsgi_opts ) . run ( )
1124
+ def is_naive ( value ) :
1125
+ sql , references = connection . creation . sql_create_model ( model , no_style ( ) , seen_models )
1126
+ post = '<could not parse>'
1127
+ context = Context ( dict ( options , ** { base_name : name , base_directory : top_dir , 'docs_version' : docs_version , } ) , autoescape = False )
1128
+ for key in self . keyOrder :
1129
+ current_len += 1
1130
+ class SuspiciousMultipartForm ( SuspiciousOperation ) :
1131
+ from django . utils . http import urlquote
1132
+ from django . core . serializers . base import DeserializationError
1133
+ from django . utils . deprecation import RemovedInDjango19Warning
1134
+ if self . _wrapped is empty :
1135
+ origin = make_origin ( display_name , self . load_template_source , template_name , template_dirs )
1136
+ return not self . file or self . file . closed
1137
+ import warnings
1138
+ self . pubid = pubid
1139
+ if len ( bits ) not in ( 2 , 3 ) :
1140
+ return WithNode ( None , None , nodelist , extra_context = extra_context )
1141
+ _iterlists = "lists"
1142
+ from django . core . exceptions import ValidationError
1143
+ def __reduce__ ( self ) :
1144
+ if html_message :
1145
+ return False
1146
+ def __init__ ( self , name , regex , next = None ) :
1147
+ except pickle . PickleError :
1148
+ def get_public_serializer_formats ( ) :
1149
+ with open ( writer . path , "wb" ) as fh :
1150
+ def do_ifequal ( parser , token , negate ) :
1151
+ def _assert_mutable ( self ) :
1152
+ pass
1153
+ if isinstance ( data , bytes ) :
1154
+ except OSError as e :
1155
+ for pythonrc in ( os . environ . get ( "PYTHONSTARTUP" ) , '~/.pythonrc.py' ) :
1156
+ parser . add_argument ( '--no-initial-data' , action = 'store_false' , dest = 'load_initial_data' , default = True , help = 'Tells Django not to load any initial data after database synchronization.' )
1157
+ return False
1158
+ for dirname in dirs [ : ] :
1159
+ try :
1160
+ val , encoded = super ( SimpleCookie , self ) . value_encode ( val )
1161
+ using_sysrandom = False
1162
+ user_settings = module_to_dict ( settings . _wrapped )
1163
+ ttl = force_text ( ttl )
1164
+ statement . append ( cleaned_line )
1165
+ if y and m and d :
1166
+ from django . utils . deprecation import RemovedInDjango19Warning
1167
+ time_str = date . strftime ( '%s, %%d %s %%Y %%H:%%M:%%S ' % ( dow , month ) )
1168
+ def u ( s ) :
1169
+ super ( AssignmentNode , self ) . __init__ ( takes_context , args , kwargs )
1170
+ except ( ValueError , TypeError ) :
1171
+ __all__ = [ 'File' ]
1172
+ return retval
1173
+ self . stream . write ( '%s\n' % msg_data )
1174
+ logger . level = logging . NOTSET
1175
+ elif basetype == 'message' and subtype == 'rfc822' :
1176
+ def value_from_datadict ( self , data , files , name ) :
1177
+ raise ValueError ( "Key '%s' not found" % key )
1178
+ except SuspiciousOperation as e :
1179
+ ttl = force_text ( ttl )
1180
+ if set ( kwargs . keys ( ) ) | set ( defaults . keys ( ) ) != set ( params ) | set ( defaults . keys ( ) ) | set ( prefix_args ) :
1181
+ if self . asvar is None :
1182
+ if isinstance ( s , ( six . text_type , Promise ) ) :
1183
+ self . stdout . write ( "Installed %d object(s) from %d fixture(s)" % ( self . loaded_object_count , self . fixture_count ) )
1184
+ left = t . led ( left , self )
1185
+ return '<ExtendsNode: extends %s>' % self . parent_name . token
1186
+ for attachment in self . attachments :
1187
+ return value
1188
+ from django . core . cache . backends . base import BaseCache , DEFAULT_TIMEOUT
1189
+ def __init__ ( self ) :
1190
+ value = next ( cycle_iter ) . resolve ( context )
1191
+ if not self . compile_function_error ( token , e ) :
1192
+ chunks = [ ]
1193
+ logging . Handler . __init__ ( self )
1194
+ conflicts = executor . loader . detect_conflicts ( )
1195
+ _localtime = None
1196
+ return self . number * self . paginator . per_page
1197
+ seen_models . add ( model )
1198
+ def clean ( self , value ) :
1199
+ if not data and initial :
1200
+ else :
1201
+ def url ( self , name ) :
1202
+ if not hasattr ( package , 'rindex' ) :
1203
+ raise
1204
+ match = RE_DATE . match ( value )
1205
+ from django . db . migrations . writer import MigrationWriter
1206
+ if value in ( None , '' ) :
1207
+ msg = "Unclosed tag '%s'. Looking for one of: %s " % ( command , ', ' . join ( parse_until ) )
1208
+ app_config = apps . get_app_config ( app_label )
1209
+ def _iterkeys ( self ) :
1210
+ shutdown_message = options . get ( 'shutdown_message' , '' )
1211
+ return self . source
1212
+ if f is None :
1213
+ def handle ( self , ** options ) :
1214
+ class CommentNode ( Node ) :
1215
+ from django . utils . encoding import force_text
1216
+ module = import_module ( module_path )
1217
+ return result
1218
+ temp_lib . tags [ name ] = lib . tags [ name ]
1219
+ if self . to_field :
1220
+ from django . http . response import ( HttpResponse , StreamingHttpResponse , HttpResponseRedirect , HttpResponsePermanentRedirect , HttpResponseNotModified , HttpResponseBadRequest , HttpResponseForbidden , HttpResponseNotFound , HttpResponseNotAllowed , HttpResponseGone , HttpResponseServerError , Http404 , BadHeaderError , JsonResponse )
1221
+ handler . addQuickElement ( "rights" , item [ 'item_copyright' ] )
1222
+ def byte2int ( bs ) :
1223
+ return lazy_number ( ngettext , str , singular = singular , plural = plural , number = number )
1224
+ class Command ( BaseCommand ) :
1225
+ stream . unget ( chunk )
1226
+ none_model_fields = [ k for k , v in six . iteritems ( fields ) if not v ]
1227
+ _func_defaults = "func_defaults"
1228
+ parser . add_argument ( '--exclude' , '-x' , default = [ ] , dest = 'exclude' , action = 'append' , help = 'Locales to exclude. Default is none. Can be used multiple times.' )
1229
+ try :
1230
+ raise ExternalReferenceForbidden ( context , base , sysid , pubid )
1231
+ with connection . constraint_checks_disabled ( ) :
1232
+ delta = expires - expires . utcnow ( )
1233
+ super ( Serializer , self ) . handle_field ( obj , field )
1234
+ pass
1235
+ else :
1236
+ else :
1237
+ errors . append ( Error ( "%s was connected to the '%s' signal " "with a lazy reference to the '%s' sender, " "which has not been installed." % ( description , name , '.' . join ( reference ) ) , obj = receiver . __module__ , hint = None , id = 'signals.E001' ) )
1238
+ kwargs [ 'instance' ] = self . _existing_object ( pk )
1239
+ if len ( bits ) < 2 :
1240
+ return copy . deepcopy ( self . _wrapped , memo )
1241
+ loaded_objects_in_fixture = 0
1242
+ return result
1243
+ super ( RadioChoiceInput , self ) . __init__ ( * args , ** kwargs )
1244
+ self . dicts [ - 1 ] [ key ] = value
1245
+ from django . core . cache . backends . base import BaseCache , DEFAULT_TIMEOUT
1246
+ if ( self . max_digits is not None and self . decimal_places is not None and whole_digits > ( self . max_digits - self . decimal_places ) ) :
1247
+ if not value and self . required :
1248
+ base_url += '/'
1249
+ if dirname and not os . path . exists ( dirname ) :
1250
+ def regex ( self ) :
1251
+ parser . add_argument ( 'args' , nargs = '*' )
1252
+ if plan_node in loader . applied_migrations :
1253
+ self . _regex_dict [ language_code ] = regex_compiled
1254
+ self . file . seek ( 0 )
1255
+ return self . __name
1256
+ self . _body = self . read ( )
1257
+ return result
1258
+ boundary = opts . get ( 'boundary' )
1259
+ raise InvalidCacheBackendError ( "Could not find backend '%s': %s" % ( backend , e ) )
1260
+ else :
1261
+ def save_existing_objects ( self , commit = True ) :
1262
+ from django . core . mail . utils import DNS_NAME
1263
+ needs_multipart_form = True
1264
+ pass
1265
+ def indexbytes ( buf , i ) :
1266
+ __getattr__ = new_method_proxy ( getattr )
1267
+ sep = len ( hextet [ 0 ] . split ( ':' ) ) + len ( hextet [ 1 ] . split ( ':' ) )
1268
+ def __contains__ ( self , item ) :
1269
+ bits = host . rsplit ( ':' , 1 )
1270
+ try :
1271
+ mask = ( pyinotify . IN_MODIFY | pyinotify . IN_DELETE | pyinotify . IN_ATTRIB | pyinotify . IN_MOVED_FROM | pyinotify . IN_MOVED_TO | pyinotify . IN_CREATE )
1272
+ class MiddlewareNotUsed ( Exception ) :
1273
+ import os
1274
+ handler = self . configure_handler ( handlers [ name ] )
1275
+ else :
1276
+ with connections [ db ] . cursor ( ) as cursor :
1277
+ return datetime . time ( ** kw )
1278
+ filelist = _cached_filenames + new_filenames + _error_files
1279
+ strip_tags = allow_lazy ( strip_tags )
1280
+ self . queryset = field . queryset
1281
+ next = advance_iterator
1282
+ import_module ( templatetag_module )
1283
+ def tag ( self , name = None , compile_function = None ) :
1284
+ if kwargs . pop ( 'ipv6' , False ) :
1285
+ def writer ( self ) :
1286
+ class InvalidTemplateLibrary ( Exception ) :
1287
+ def render ( self , context ) :
1288
+ self . allow_empty_first_page = allow_empty_first_page
1289
+ s = s . replace ( '\t' , '\\t' )
1290
+ needs_multipart_form = False
1291
+ self . handle_starttag ( tag , attrs )
1292
+ try :
1293
+ self . _catalog . update ( other . _catalog )
1294
+ for f in sorted ( opts . concrete_fields + sortable_virtual_fields + opts . many_to_many ) :
1295
+ if isinstance ( message , SafeData ) :
1296
+ if not ( self . data or self . files ) :
1297
+ setattr ( filter_func , attr , value )
1298
+ if nodelist . get_nodes_by_type ( ExtendsNode ) :
1299
+ try :
1300
+ obj = super ( MultiWidget , self ) . __deepcopy__ ( memo )
1301
+ else :
1302
+ def sql_indexes ( app_config , style , connection ) :
1303
+ if app_config . models_module is None :
1304
+ raise NotImplementedError ( 'subclasses of Origin must provide a reload() method' )
1305
+ self . kwargs = kwargs
1306
+ return True
1307
+ self . paths_to_remove . append ( tempdir )
1308
+ if fk . unique :
1309
+ with connection . cursor ( ) as cursor :
1310
+ fields . update ( new_class . declared_fields )
1311
+ self . choices . append ( ( f , f . replace ( path , "" , 1 ) ) )
1312
+ use_null_fallback = False
1313
+ kwargs [ name ] = parser . compile_filter ( value )
1314
+ class SplitDateTimeField ( MultiValueField ) :
1315
+ result = middleware . process_view ( request , view_func , args , kwargs )
1316
+ return b'\r\n' . join ( headers )
1317
+ class Http404 ( Exception ) :
1318
+ def media ( self ) :
1319
+ if ( isinstance ( data , ( datetime . datetime , datetime . time ) ) and not getattr ( self . field . widget , 'supports_microseconds' , True ) ) :
1320
+ from django . conf import settings
1321
+ state_frame [ self ] = None
1322
+ error_msg = "Invalid template name in 'extends' tag: %r." % parent
1323
+ if option_value is None :
1324
+ class LocalTimezone ( ReferenceLocalTimezone ) :
1325
+ @ register . filter ( is_safe = False )
1326
+ elif field_type == 'IntegerField(' and not connection . features . can_introspect_autofield :
1327
+ return QueryDict ( '' , encoding = self . _encoding ) , MultiValueDict ( )
1328
+ def to_python ( self , value ) :
1329
+ if pk_is_not_editable ( pk ) or pk . name not in form . fields :
1330
+ if match :
1331
+ def patch_cache_control ( response , ** kwargs ) :
1332
+ def __init__ ( self , level , msg , hint = None , obj = None , id = None ) :
1333
+ tag , this_value_expr , max_value_expr , max_width = bits
1334
+ db = options . pop ( 'using' , DEFAULT_DB_ALIAS )
1335
+ if not filename :
1336
+ super ( InlineForeignKeyField , self ) . __init__ ( * args , ** kwargs )
1337
+ def __init__ ( self , name ) :
1338
+ from django . core . exceptions import ImproperlyConfigured
1339
+ def xreadlines ( self ) :
1340
+ value = [ conditional_escape ( v ) for v in value ]
1341
+ class TemplateEncodingError ( Exception ) :
1342
+ if version is None :
1343
+ self . xml . startElement ( "field" , { "name" : field . name , "type" : field . get_internal_type ( ) } )
1344
+ thefile = self . file
1345
+ sec = int ( m . group ( 'sec' ) )
1346
+ self . stdout . write ( self . style . MIGRATE_HEADING ( "Merging %s" % app_label ) )
1347
+ value = getattr ( opts , opt )
1348
+ for basedir in basedirs :
1349
+ if hasattr ( file_or_path , 'read' ) :
1350
+ @ classmethod
1351
+ def _replace_entity ( match ) :
1352
+ self . _post , self . _files = self . parse_file_upload ( self . META , data )
1353
+ path_info = get_bytes_from_wsgi ( environ , 'PATH_INFO' , '/' )
1354
+ except Exception :
1355
+ if self . empty :
1356
+ subcommand = 'help'
1357
+ def handle ( self , * app_labels , ** options ) :
1358
+ raise ValueError ( "'%s' has no field named '%s'." % ( self . __class__ . __name__ , field ) )
1359
+ model_fields = Model . _meta . get_all_field_names ( )
1360
+ f = os . path . join ( p , cmd )
1361
+ error_messages = self . fields [ field ] . error_messages
1362
+ self . _lock = threading . RLock ( )
1363
+ from UserList import UserList
1364
+ from django . http import Http404
1365
+ result . append ( self . create_token ( last_bit , ( upto , upto + len ( last_bit ) ) , False ) )
1366
+ class dummy :
1367
+ def __del__ ( self ) :
1368
+ link [ NEXT ] = root
1369
+ from django . apps import apps
1370
+ else :
1371
+ while i < l :
1372
+ def render ( self , context ) :
1373
+ def _cache ( self ) :
1374
+ re_chars = re . compile ( r'<.*?>|(.)' , re . U | re . S )
1375
+ return { }
1376
+ model = app_config . get_model ( model_label )
1377
+ if value is not result :
1378
+ return tt . tm_isdst > 0
1379
+ def _get_choices ( self ) :
1380
+ loader = MigrationLoader ( connection )
1381
+ termios . tcsetattr ( fd , termios . TCSANOW , attr_list )
1382
+ _urllib_robotparser_moved_attributes = [ MovedAttribute ( "RobotFileParser" , "robotparser" , "urllib.robotparser" ) , ]
1383
+ def render ( self , name , value , attrs = None ) :
1384
+ cursor . close ( )
1385
+ endbmatch = endblock_re . match ( t . contents )
1386
+ for key , value in parse_qsl ( query_string or '' , keep_blank_values = True ) :
1387
+ def get_resolver ( urlconf ) :
1388
+ app_dir = apps . get_app_config ( model . _meta . app_label ) . path
1389
+ if locations :
1390
+ class SignatureExpired ( BadSignature ) :
1391
+ def get ( self , key , default = None ) :
1392
+ def _mark_post_parse_error ( self ) :
1393
+ self . xml . endElement ( "field" )
1394
+ super ( GenericIPAddressField , self ) . __init__ ( * args , ** kwargs )
1395
+ from django . utils import six , timezone
1396
+ return value
1397
+ return filelist
1398
+ if self . verbosity >= 1 :
1399
+ stream = StringIO ( stream_or_string )
1400
+ from django . utils import archive
1401
+ return time_str + '-0000'
1402
+ if not self . allow_multiple_selected :
1403
+ raise TemplateSyntaxError ( "'%s' received unexpected keyword argument '%s'" % ( name , param ) )
1404
+ else :
1405
+ from django . apps import apps
1406
+ localpart = str ( Header ( localpart , encoding ) )
1407
+ class FileInput ( Input ) :
1408
+ d = { }
1409
+ return data
1410
+ for line in content . split ( "\n" ) :
1411
+ if value :
1412
+ @ property
1413
+ data [ field . attname ] = value
1414
+ s = six . text_type ( s , encoding , errors )
1415
+ raise
1416
+ if app_config . models_module is None :
1417
+ for tag in open_tags :
1418
+ _assertRegex = "assertRegex"
1419
+ class EmailBackend ( BaseEmailBackend ) :
1420
+ self . _regex_validator = validators . RegexValidator ( regex = regex )
1421
+ if error_messages and f . name in error_messages :
1422
+ parser . add_argument ( 'args' , metavar = 'app_label' , nargs = '+' , help = 'One or more application label.' )
1423
+ child_loggers . append ( existing [ i ] )
1424
+ mimetype , _ = mimetypes . guess_type ( filename )
1425
+ secret = force_bytes ( secret )
1426
+ params , varargs , varkw , defaults = getargspec ( func )
1427
+ def javascript_quote ( s , quote_double_quotes = False ) :
1428
+ i += 1
1429
+ @ deconstructible
1430
+ break
1431
+ def cleaned_data ( self ) :
1432
+ break
1433
+ key = self . make_key ( key , version = version )
1434
+ value = data . get ( name )
1435
+ changeset = timestamp . strftime ( '%Y%m%d%H%M%S' )
1436
+ if val is None :
1437
+ def clear ( self ) :
1438
+ six . reraise ( exc_type , exc_value , sys . exc_info ( ) [ 2 ] )
1439
+ raise ValidationError ( self . error_messages [ 'required' ] , code = 'required' )
1440
+ def get_default_timezone ( ) :
1441
+ def get_host ( self ) :
1442
+ return
1443
+ fmt = config . get ( 'format' , None )
1444
+ if finder . find_module ( name ) :
1445
+ ipv4_address = "%d.%d.%d.%d" % ( int ( hextets [ 6 ] [ 0 : 2 ] , 16 ) , int ( hextets [ 6 ] [ 2 : 4 ] , 16 ) , int ( hextets [ 7 ] [ 0 : 2 ] , 16 ) , int ( hextets [ 7 ] [ 2 : 4 ] , 16 ) , )
1446
+ list_ = [ bytes_to_text ( elt , self . encoding ) for elt in list_ ]
1447
+ return name , ser_fmt , cmp_fmt
1448
+ from django . utils . http import urlquote
1449
+ return value . tzinfo is None or value . tzinfo . utcoffset ( value ) is None
1450
+ else :
1451
+ code_list . append ( background [ v ] )
1452
+ kwargs [ "initial" ] = self . parent_instance . pk
1453
+ last = max ( 0 , end - 1 )
1454
+ def __init__ ( self , widgets , attrs = None ) :
1455
+ class WSGIServer ( simple_server . WSGIServer , object ) :
1456
+ except Exception as e :
1457
+ state = self . state
1458
+ def __get__ ( self , obj , tp ) :
1459
+ invalid_tag = next ( tag for tag in tags if not checks . tag_exists ( tag ) )
1460
+ if use_l10n or ( use_l10n is None and settings . USE_L10N ) :
1461
+ self . activated = True
1462
+ return '' , ''
1463
+ def wrapper ( * args , ** kwargs ) :
1464
+ id_ += '_0'
1465
+ def format_subject ( self , subject ) :
1466
+ kwargs = match . groupdict ( )
1467
+ for dict_ in self . dicts :
1468
+ self . nodelist = t . nodelist
1469
+ def __bool__ ( self ) :
1470
+ import sys
1471
+ kwargs [ 'number' ] = number_value
1472
+ return result
1473
+ if hasattr ( timezone , 'normalize' ) :
1474
+ value = force_text ( value )
1475
+ weight = 0
1476
+ super ( SimpleCookie , self ) . load ( rawdata )
1477
+ class DefusedXmlException ( ValueError ) :
1478
+ else :
1479
+ self . _leftover = b'' . join ( [ bytes , self . _leftover ] )
1480
+ formfield = f . formfield ( ** kwargs )
1481
+ return
1482
+ def _make_decorator ( * m_args , ** m_kwargs ) :
1483
+ def _set_post ( self , post ) :
1484
+ def clear ( self ) :
1485
+ if safe is not None :
1486
+ filter_expression = self . compile_filter ( token . contents )
1487
+ attrs = super ( DecimalField , self ) . widget_attrs ( widget )
1488
+ return bytes ( value )
1489
+ if self . allow_folders :
1490
+ app_list = resolver . app_dict [ ns ]
1491
+ def activate ( timezone ) :
1492
+ else :
1493
+ def writeString ( self , encoding ) :
1494
+ else :
1495
+ choices = property ( _get_choices , _set_choices )
1496
+ def has_other_pages ( self ) :
1497
+ parse = sys . modules [ __name__ + ".moves.urllib_parse" ]
1498
+ form . save_m2m = save_m2m
1499
+ else :
1500
+ _templatetags_modules . append ( templatetag_module )
1501
+ return ( format_html_join ( '' , ' {0}="{1}"' , sorted ( attrs . items ( ) ) ) + format_html_join ( '' , ' {0}' , sorted ( boolean_attrs ) ) )
1502
+ return self
1503
+ self . can_write . release ( )
1504
+ raise KeyError ( key )
1505
+ for arg in args :
1506
+ def has_key ( self , key ) :
1507
+ kw [ 'microsecond' ] = kw [ 'microsecond' ] . ljust ( 6 , '0' )
1508
+ if var . find ( VARIABLE_ATTRIBUTE_SEPARATOR + '_' ) > - 1 or var [ 0 ] == '_' :
1509
+ __all__ = ( 'MultiPartParser' , 'MultiPartParserError' , 'InputStreamExhausted' )
1510
+ dictreprs = ', ' . join ( repr ( d ) for d in self . dicts )
1511
+ elif field . rel and isinstance ( field . rel , models . ManyToOneRel ) :
1512
+ if text == '' and len ( opts ) == 1 and opts [ 0 ] == 'reset' :
1513
+ from django . utils . six . moves . urllib . parse import urljoin
1514
+ self . xml . startElement ( "natural" , { } )
1515
+ @ property
1516
+ raise ValidationError ( self . error_messages [ 'invalid_choice' ] , code = 'invalid_choice' , params = { 'value' : value } , )
1517
+ self . delete ( key , version = version )
1518
+ new_matches = normalize ( parent_pat + pat )
1519
+ yield self [ key ]
1520
+ cache [ key ] = result
1521
+ self . cookies [ key ] [ 'max-age' ] = max_age
1522
+ def __copy__ ( self ) :
1523
+ from django . utils . functional import lazy
1524
+ sites1 = _findall ( s1 , str ( year ) )
1525
+ for middleware_method in self . _request_middleware :
1526
+ def add_arguments ( self , parser ) :
1527
+ ULONG_PTR = c_int64
1528
+ if not language_code_re . search ( lang_code ) :
1529
+ if isinstance ( s , bytes ) :
1530
+ for accessor_name , object_list in self . m2m_data . items ( ) :
1531
+ if isinstance ( obj , datetime . datetime ) :
1532
+ handler . addQuickElement ( "pubDate" , rfc2822_date ( item [ 'pubdate' ] ) )
1533
+ self . mode = file . mode
1534
+ evens = sum ( int ( c ) for c in candidate [ - 1 : : - 2 ] )
1535
+ if sys . version_info [ : 2 ] >= ( 3 , 3 ) :
1536
+ chunk = b'' . join ( chunks )
1537
+ app_template_dirs = [ ]
1538
+ def split_leading_dir ( self , path ) :
1539
+ with self . _lock . reader ( ) :
1540
+ locale_dir = self . default_locale_path
1541
+ output_transaction = True
1542
+ obj = Model ( ** data )
1543
+ apps . setdefault ( pattern . app_name , [ ] ) . append ( pattern . namespace )
1544
+ for key , value in data :
1545
+ def configure_root ( self , config , incremental = False ) :
1546
+ if item [ 'pubdate' ] is not None :
1547
+ tzinfo = get_fixed_timezone ( offset )
1548
+ class SuspiciousOperation ( Exception ) :
1549
+ from django . conf import settings
1550
+ try :
1551
+ if os . path . isdir ( app_dir ) :
1552
+ def mark_for_escaping ( s ) :
1553
+ except AttributeError :
1554
+ return field . rel . to . _meta . get_field ( field . rel . field_name ) . to_python ( field_value )
1555
+ def __init__ ( self , object_list , number , paginator ) :
1556
+ return [ None , None ]
1557
+ def timeuntil ( d , now = None ) :
1558
+ super ( DecimalField , self ) . validate ( value )
1559
+ field_type = 'ForeignKey(%s' % rel_to
1560
+ def avoid_wrapping ( value ) :
1561
+ from django . core . serializers . python import Deserializer as PythonDeserializer
1562
+ if code is not None :
1563
+ raise TemplateSyntaxError ( "'firstof' statement requires at least one argument" )
1564
+ from importlib import find_loader as importlib_find
1565
+ msgs , errors , status = popen_wrapper ( args )
1566
+ id_ = self . field . widget . attrs . get ( 'id' ) or self . auto_id
1567
+ return "<Block Node: %s. Contents: %r>" % ( self . name , self . nodelist )
1568
+ if nodelist_empty is None :
1569
+ def __iter__ ( self ) :
1570
+ from django . utils . module_loading import import_string
1571
+ value = b'' . join ( self . make_bytes ( chunk ) for chunk in value )
1572
+ if value in self . empty_values :
1573
+ parser . add_argument ( 'migration_name' , help = 'Migrations will be squashed until and including this migration.' )
1574
+ def jython_reloader ( main_func , args , kwargs ) :
1575
+ from django . test . signals import setting_changed
1576
+ file . seek ( 0 )
1577
+ return False
1578
+ from django . template . base import TemplateDoesNotExist
1579
+ from django . http import HttpResponse
1580
+ code = 'limit_value'
1581
+ text = match . group ( 1 )
1582
+ for line in header . split ( b'\r\n' ) :
1583
+ obj = base . build_instance ( Model , data , db )
1584
+ iterkeys = _iterkeys
1585
+ return value . pk
1586
+ quant . append ( ch )
1587
+ def write ( self , val ) :
1588
+ def handle_app_config ( self , app_config , ** options ) :
1589
+ return None
1590
+ num_loopvars = len ( self . loopvars )
1591
+ deactivate = deactivate_all = lambda : None
1592
+ PB = 1 << 50
1593
+ start = 0
1594
+ def render_option ( self , selected_choices , option_value , option_label ) :
1595
+ def __getitem__ ( self , key ) :
1596
+ language_code = get_language ( )
1597
+ if bit . startswith ( '_("' ) or bit . startswith ( "_('" ) :
1598
+ return _i18n_cache_key_suffix ( request , cache_key )
1599
+ try :
1600
+ c = int ( text [ 1 : ] , 16 )
1601
+ if os . path . exists ( self . file_path ) and not os . path . isdir ( self . file_path ) :
1602
+ if self . feed [ 'feed_url' ] is not None :
1603
+ return
1604
+ import os
1605
+ return iter ( getattr ( d , _iterlists ) ( ** kw ) )
1606
+ def wrapper ( * args , ** kwds ) :
1607
+ out . write ( ' pgettext(%r, %r) ' % ( message_context , join_tokens ( singular , trimmed ) ) )
1608
+ return self . getlist ( key )
1609
+ defaults = dict ( defaults . _get_kwargs ( ) , ** options )
1610
+ callback = getattr ( self . urlconf_module , 'handler%s' % view_type , None )
1611
+ warn_msg = ( "The translator-targeted comment '%s' " "(%sline %d) was ignored, because it wasn't the last item " "on the line." ) % ( c , filemsg , comment_lineno_cache )
1612
+ pieces . append ( force_text ( getattr ( self , piece ) ( ) ) )
1613
+ d = data . get ( self . day_field % name )
1614
+ func = getattr ( func , '_decorated_function' , func )
1615
+ for name , block in six . iteritems ( blocks ) :
1616
+ import django
1617
+ potfiles = self . build_potfiles ( )
1618
+ self . stdout . write ( "Checking %s for fixtures..." % humanize ( fixture_dir ) )
1619
+ import sys
1620
+ if len ( bits ) != 3 :
1621
+ extracted = self . _archive . extractfile ( member )
1622
+ import binascii
1623
+ else :
1624
+ FILES = property ( _get_files )
1625
+ return True
1626
+ with self . mutex :
1627
+ return get_template ( template_name , dirs )
1628
+ l = lambda x : self . make_key ( x , version = version )
1629
+ def upload_handlers ( self ) :
1630
+ except AmbiguityError :
1631
+ except ValidationError as e :
1632
+ return { 'request' : request }
1633
+ except AttributeError :
1634
+ result = func ( * args )
1635
+ else :
1636
+ from django . utils . encoding import force_text , DEFAULT_LOCALE_ENCODING
1637
+ problem_fields = [ field for model in apps . get_models ( ** kwargs ) if app_configs is None or model . _meta . app_config in app_configs for field in model . _meta . local_fields if isinstance ( field , models . BooleanField ) and not field . has_default ( ) ]
1638
+ self . ignore = options . get ( 'ignore' )
1639
+ class NowNode ( Node ) :
1640
+ except StandardError as e :
1641
+ if msg :
1642
+ _error_files = [ ]
1643
+ @ register . filter ( is_safe = True , needs_autoescape = True )
1644
+ if isinstance ( filename , MIMEBase ) :
1645
+ class DebugNodeList ( NodeList ) :
1646
+ priority = 1.0
1647
+ raise KeyError ( key )
1648
+ elif issubclass ( klass , logging . handlers . SMTPHandler ) and 'mailhost' in config :
1649
+ return maybe
1650
+ def _handle_m2m_field_node ( self , node , field ) :
1651
+ super ( DebugParser , self ) . extend_nodelist ( nodelist , node , token )
1652
+ from django . utils . itercompat import is_iterable
1653
+ return self . has_key ( key )
1654
+ new_class = ( super ( DeclarativeFieldsMetaclass , mcs ) . __new__ ( mcs , name , bases , attrs ) )
1655
+ continue
1656
+ return self . save_existing_objects ( commit ) + self . save_new_objects ( commit )
1657
+ for attr in ( 'expects_localtime' , 'is_safe' , 'needs_autoescape' ) :
1658
+ for f in file_list :
1659
+ import re
1660
+ for processor in get_standard_processors ( ) + processors :
1661
+ self . _files . appendlist ( force_text ( old_field_name , self . _encoding , errors = 'replace' ) , file_obj )
1662
+ yield v
1663
+ else :
1664
+ cc = dict ( _to_tuple ( el ) for el in cc_delim_re . split ( response [ 'Cache-Control' ] ) )
1665
+ scheme = template . split ( ':' , 1 ) [ 0 ] . lower ( )
1666
+ ESCAPE_MAPPINGS = { "A" : None , "b" : None , "B" : None , "d" : "0" , "D" : "x" , "s" : " " , "S" : "x" , "w" : "x" , "W" : "!" , "Z" : None , }
1667
+ locales = [ locale ]
1668
+ nodelist = parser . parse ( ( 'endblock' , ) )
1669
+ loaders = [ ]
1670
+ @ register . tag
1671
+ return client
1672
+ if ( ( os . stat ( path ) . st_mode & stat . S_IREAD ) != stat . S_IREAD ) :
1673
+ def __delitem__ ( self , key ) :
1674
+ expanded_template = path . expanduser ( template )
1675
+ value = field . widget . value_from_datadict ( self . data , self . files , self . add_prefix ( name ) )
1676
+ def pbkdf2 ( password , salt , iterations , dklen = 0 , digest = None ) :
1677
+ def get_default_timezone_name ( ) :
1678
+ ch2 = None
1679
+ def handle_uncaught_exception ( self , request , resolver , exc_info ) :
1680
+ new_attr = name
1681
+ parts = config_string . lower ( ) . split ( ';' )
1682
+ doublecolon_start = - 1
1683
+ self . _start_relational_field ( field )
1684
+ s = s . decode ( encoding , errors )
1685
+ if token == "not" and i + 1 < l and tokens [ i + 1 ] == "in" :
1686
+ self . help_texts = getattr ( options , 'help_texts' , None )
1687
+ if not match or not match . group ( 1 ) :
1688
+ elif ch != 'P' :
1689
+ from django . core . wsgi import get_wsgi_application
1690
+ self . appendlist ( force_text ( key , encoding , errors = 'replace' ) , force_text ( value , encoding , errors = 'replace' ) )
1691
+ while i < len ( subject ) and subject [ i ] != subject [ p ] :
1692
+ return value . replace ( tzinfo = None )
1693
+ return type ( self ) . __bool__ ( self )
1694
+ parser . add_argument ( '--database' , action = 'store' , dest = 'database' , default = DEFAULT_DB_ALIAS , help = 'Nominates a database to ' 'introspect. Defaults to using the "default" database.' )
1695
+ pk_value = form . instance . pk
1696
+ return [ etag_str ]
1697
+ readline . parse_and_bind ( "tab:complete" )
1698
+ while ch != terminal_char :
1699
+ return self . _namespace_dict [ language_code ]
1700
+ self . changed_objects . append ( ( obj , form . changed_data ) )
1701
+ since = delta . days * 24 * 60 * 60 + delta . seconds
1702
+ key += tuple ( type ( v ) for k , v in sorted_items )
1703
+ translation . activate ( saved_locale )
1704
+ for func in self . response_fixes :
1705
+ class DebugNode ( Node ) :
1706
+ import os
1707
+ try :
1708
+ if expires < now :
1709
+ from django . utils . translation import ugettext , ungettext
1710
+ def valid_value ( self , value ) :
1711
+ obj = mark_safe ( new_obj )
1712
+ GB = 1 << 30
1713
+ return r
1714
+ from django . core . exceptions import ImproperlyConfigured
1715
+ return handle_app ( app_config . models_module , ** options )
1716
+ self . validate_key ( key )
1717
+ @ stringfilter
1718
+ self . xml = SimplerXMLGenerator ( self . stream , self . options . get ( "encoding" , settings . DEFAULT_CHARSET ) )
1719
+ self . validate_key ( key )
1720
+ parser . add_argument ( '--noreload' , action = 'store_false' , dest = 'use_reloader' , default = True , help = 'Tells Django to NOT use the auto-reloader.' )
1721
+ try :
1722
+ import cgi
1723
+ attrs [ 'error_messages' ] = error_messages
1724
+ return output
1725
+ def load_template ( self , template_name , template_dirs = None ) :
1726
+ def __str__ ( self ) :
1727
+ return len ( self . get_queryset ( ) )
1728
+ return compiled_parent . _render ( context )
1729
+ self . exception = exception
1730
+ from django . core . files . base import File
1731
+ handlers = config . get ( 'handlers' , EMPTY_DICT )
1732
+ for root in settings . ALLOWED_INCLUDE_ROOTS :
1733
+ for field in self . fields . values ( ) :
1734
+ def O ( self ) :
1735
+ return mark_safe ( '' . join ( force_text ( n ) for n in nodelist ) )
1736
+ parser . add_argument ( '-o' , '--output' , default = None , dest = 'output' , help = 'Specifies file to which the output is written.' )
1737
+ raise NotImplementedError ( 'subclasses of Storage must provide a listdir() method' )
1738
+ if is_templatized :
1739
+ import sys
1740
+ want_unicode = True
1741
+ _format_cache = { }
1742
+ return ( ret == 0 )
1743
+ self . message_context = None
1744
+ WEEKDAYS_REV = { 'monday' : 0 , 'tuesday' : 1 , 'wednesday' : 2 , 'thursday' : 3 , 'friday' : 4 , 'saturday' : 5 , 'sunday' : 6 }
1745
+ for _ , nodelist in self . conditions_nodelists :
1746
+ else :
1747
+ val = None
1748
+ if USE_INOTIFY :
1749
+ hidden_fields . append ( six . text_type ( bf ) )
1750
+ return bool ( value )
1751
+ from django . utils . six . moves . urllib . parse import parse_qsl , urlencode , quote , urljoin , urlsplit
1752
+ self . xml . startElement ( "field" , { "name" : field . name , "rel" : field . rel . __class__ . __name__ , "to" : smart_text ( field . rel . to . _meta ) , } )
1753
+ from django . db import connections , router , transaction , DEFAULT_DB_ALIAS
1754
+ self . active_readers += t
1755
+ return super ( DateField , self ) . to_python ( value )
1756
+ def _get_scheme ( self ) :
1757
+ self . loaded_object_count = 0
1758
+ defaults [ 'empty_permitted' ] = True
1759
+ raise TemplateDoesNotExist
1760
+ s = s . replace ( '\\' , '\\\\' )
1761
+ capfirst = lambda x : x and force_text ( x ) [ 0 ] . upper ( ) + force_text ( x ) [ 1 : ]
1762
+ return self . data . isoformat ( )
1763
+ result = super ( MultiValueField , self ) . __deepcopy__ ( memo )
1764
+ elif count > 1 :
1765
+ self . stdout . write ( " - %s\n" % operation . describe ( ) )
1766
+ return repr ( list ( self ) )
1767
+ @ python_2_unicode_compatible
1768
+ if '__str__' not in klass . __dict__ :
1769
+ from . import Error , Tags , register
1770
+ if self . data . minute == 0 and self . data . hour == 0 :
1771
+ field_desc += ' # ' + ' ' . join ( comment_notes )
1772
+ else :
1773
+ return self . DSTDIFF
1774
+ substitutions [ 'clear_template' ] = self . template_with_clear % substitutions
1775
+ traceback . print_exc ( )
1776
+ self . timezone = None
1777
+ return tpl . format ( self . name , self . sysid , self . pubid )
1778
+ else :
1779
+ raise NotImplementedError ( "This backend doesn't support absolute paths." )
1780
+ from . import six
1781
+ if isinstance ( rhs , dict ) and number :
1782
+ connection = connections [ options [ 'database' ] ]
1783
+ elif cls . _delegate_bytes :
1784
+ outer . update ( password . translate ( hmac . trans_5C ) )
1785
+ if 'charset' in content_params :
1786
+ def __str__ ( self ) :
1787
+ with self . _lock . writer ( ) :
1788
+ if ip_str . count ( '.' ) != 3 :
1789
+ return self . dicts . pop ( )
1790
+ kwargs [ 'error_messages' ] = error_messages [ f . name ]
1791
+ return val , encoded
1792
+ try :
1793
+ self . command_stack . append ( ( command , token . source ) )
1794
+ for character in name :
1795
+ def yesno ( value , arg = None ) :
1796
+ def incr ( self , key , delta = 1 , version = None ) :
1797
+ os . mkdir ( migrations_directory )
1798
+ form . fields [ ORDERING_FIELD_NAME ] = IntegerField ( label = _ ( 'Order' ) , required = False )
1799
+ database = options . get ( 'database' )
1800
+ return ( "%" + six . text_type ( arg ) ) % value
1801
+ args = hashlib . md5 ( force_bytes ( key ) )
1802
+ defaults = { 'auto_id' : self . auto_id , 'prefix' : self . add_prefix ( i ) , 'error_class' : self . error_class , }
1803
+ else :
1804
+ else :
1805
+ except StopIteration :
special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "do_lower_case": true,
4
+ "mask_token": "[MASK]",
5
+ "model_max_length": 512,
6
+ "name_or_path": "google/electra-small-discriminator",
7
+ "pad_token": "[PAD]",
8
+ "sep_token": "[SEP]",
9
+ "special_tokens_map_file": null,
10
+ "strip_accents": null,
11
+ "tokenize_chinese_chars": true,
12
+ "tokenizer_class": "ElectraTokenizer",
13
+ "unk_token": "[UNK]"
14
+ }
trainer_state.json ADDED
@@ -0,0 +1,445 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 0.27424004673957825,
3
+ "best_model_checkpoint": "./ELECTRA-marian-training1/checkpoint-20000",
4
+ "epoch": 10.0,
5
+ "global_step": 20000,
6
+ "is_hyper_param_search": false,
7
+ "is_local_process_zero": true,
8
+ "is_world_process_zero": true,
9
+ "log_history": [
10
+ {
11
+ "epoch": 0.25,
12
+ "learning_rate": 4.9900000000000005e-06,
13
+ "loss": 0.2687,
14
+ "step": 500
15
+ },
16
+ {
17
+ "epoch": 0.5,
18
+ "learning_rate": 9.990000000000001e-06,
19
+ "loss": 0.277,
20
+ "step": 1000
21
+ },
22
+ {
23
+ "epoch": 0.75,
24
+ "learning_rate": 9.737368421052633e-06,
25
+ "loss": 0.2836,
26
+ "step": 1500
27
+ },
28
+ {
29
+ "epoch": 1.0,
30
+ "learning_rate": 9.474210526315791e-06,
31
+ "loss": 0.2768,
32
+ "step": 2000
33
+ },
34
+ {
35
+ "epoch": 1.0,
36
+ "eval_BLEU": 57.12999682789548,
37
+ "eval_BLEU-Bigram-Precision": 60.86708499714775,
38
+ "eval_BLEU-Trigram-Precision": 52.9979629793641,
39
+ "eval_BLEU-Unigram-Precision": 69.55014693693015,
40
+ "eval_ROUGE-2": 67.63182650261197,
41
+ "eval_ROUGE-L": 84.79524146842938,
42
+ "eval_Sacre-Bigram-Precision": 59.36794582392776,
43
+ "eval_Sacre-Trigram-Precision": 52.62858227367622,
44
+ "eval_Sacre-Unigram-Precision": 67.98210576769452,
45
+ "eval_SacreBLEU": 56.24327158648058,
46
+ "eval_loss": 0.32656434178352356,
47
+ "eval_runtime": 631.6153,
48
+ "eval_samples_per_second": 1.583,
49
+ "eval_steps_per_second": 0.396,
50
+ "step": 2000
51
+ },
52
+ {
53
+ "epoch": 1.25,
54
+ "learning_rate": 9.211578947368421e-06,
55
+ "loss": 0.2726,
56
+ "step": 2500
57
+ },
58
+ {
59
+ "epoch": 1.5,
60
+ "learning_rate": 8.94842105263158e-06,
61
+ "loss": 0.269,
62
+ "step": 3000
63
+ },
64
+ {
65
+ "epoch": 1.75,
66
+ "learning_rate": 8.685263157894738e-06,
67
+ "loss": 0.2435,
68
+ "step": 3500
69
+ },
70
+ {
71
+ "epoch": 2.0,
72
+ "learning_rate": 8.422105263157896e-06,
73
+ "loss": 0.2547,
74
+ "step": 4000
75
+ },
76
+ {
77
+ "epoch": 2.0,
78
+ "eval_BLEU": 63.708307948566365,
79
+ "eval_BLEU-Bigram-Precision": 67.31060268850709,
80
+ "eval_BLEU-Trigram-Precision": 59.51428850092656,
81
+ "eval_BLEU-Unigram-Precision": 76.10561595683805,
82
+ "eval_ROUGE-2": 68.87217612147542,
83
+ "eval_ROUGE-L": 85.55610984216905,
84
+ "eval_Sacre-Bigram-Precision": 66.05032405642395,
85
+ "eval_Sacre-Trigram-Precision": 59.367115222876365,
86
+ "eval_Sacre-Unigram-Precision": 74.86947441698572,
87
+ "eval_SacreBLEU": 63.05612776143653,
88
+ "eval_loss": 0.30988046526908875,
89
+ "eval_runtime": 630.4886,
90
+ "eval_samples_per_second": 1.586,
91
+ "eval_steps_per_second": 0.397,
92
+ "step": 4000
93
+ },
94
+ {
95
+ "epoch": 2.25,
96
+ "learning_rate": 8.159473684210528e-06,
97
+ "loss": 0.2381,
98
+ "step": 4500
99
+ },
100
+ {
101
+ "epoch": 2.5,
102
+ "learning_rate": 7.896315789473686e-06,
103
+ "loss": 0.232,
104
+ "step": 5000
105
+ },
106
+ {
107
+ "epoch": 2.75,
108
+ "learning_rate": 7.633157894736842e-06,
109
+ "loss": 0.2435,
110
+ "step": 5500
111
+ },
112
+ {
113
+ "epoch": 3.0,
114
+ "learning_rate": 7.370000000000001e-06,
115
+ "loss": 0.2296,
116
+ "step": 6000
117
+ },
118
+ {
119
+ "epoch": 3.0,
120
+ "eval_BLEU": 64.79809534146953,
121
+ "eval_BLEU-Bigram-Precision": 68.19514796054385,
122
+ "eval_BLEU-Trigram-Precision": 60.96563808040495,
123
+ "eval_BLEU-Unigram-Precision": 76.75671264180201,
124
+ "eval_ROUGE-2": 69.30039589621857,
125
+ "eval_ROUGE-L": 85.78830113401601,
126
+ "eval_Sacre-Bigram-Precision": 67.02522608281771,
127
+ "eval_Sacre-Trigram-Precision": 60.43044619422572,
128
+ "eval_Sacre-Unigram-Precision": 75.53237722729249,
129
+ "eval_SacreBLEU": 63.96756911093659,
130
+ "eval_loss": 0.29766443371772766,
131
+ "eval_runtime": 629.2959,
132
+ "eval_samples_per_second": 1.589,
133
+ "eval_steps_per_second": 0.397,
134
+ "step": 6000
135
+ },
136
+ {
137
+ "epoch": 3.25,
138
+ "learning_rate": 7.106842105263159e-06,
139
+ "loss": 0.2285,
140
+ "step": 6500
141
+ },
142
+ {
143
+ "epoch": 3.5,
144
+ "learning_rate": 6.843684210526317e-06,
145
+ "loss": 0.2196,
146
+ "step": 7000
147
+ },
148
+ {
149
+ "epoch": 3.75,
150
+ "learning_rate": 6.580526315789474e-06,
151
+ "loss": 0.2231,
152
+ "step": 7500
153
+ },
154
+ {
155
+ "epoch": 4.0,
156
+ "learning_rate": 6.317894736842106e-06,
157
+ "loss": 0.2001,
158
+ "step": 8000
159
+ },
160
+ {
161
+ "epoch": 4.0,
162
+ "eval_BLEU": 71.96063699911728,
163
+ "eval_BLEU-Bigram-Precision": 75.06338989662571,
164
+ "eval_BLEU-Trigram-Precision": 68.15829199913738,
165
+ "eval_BLEU-Unigram-Precision": 83.48142882530655,
166
+ "eval_ROUGE-2": 71.30024878570693,
167
+ "eval_ROUGE-L": 87.3933702803602,
168
+ "eval_Sacre-Bigram-Precision": 74.10648392198208,
169
+ "eval_Sacre-Trigram-Precision": 67.83068783068784,
170
+ "eval_Sacre-Unigram-Precision": 82.60371959942775,
171
+ "eval_SacreBLEU": 71.36004249317806,
172
+ "eval_loss": 0.2898695468902588,
173
+ "eval_runtime": 628.5892,
174
+ "eval_samples_per_second": 1.591,
175
+ "eval_steps_per_second": 0.398,
176
+ "step": 8000
177
+ },
178
+ {
179
+ "epoch": 4.25,
180
+ "learning_rate": 6.054736842105264e-06,
181
+ "loss": 0.2076,
182
+ "step": 8500
183
+ },
184
+ {
185
+ "epoch": 4.5,
186
+ "learning_rate": 5.791578947368422e-06,
187
+ "loss": 0.1981,
188
+ "step": 9000
189
+ },
190
+ {
191
+ "epoch": 4.75,
192
+ "learning_rate": 5.52842105263158e-06,
193
+ "loss": 0.2021,
194
+ "step": 9500
195
+ },
196
+ {
197
+ "epoch": 5.0,
198
+ "learning_rate": 5.265263157894738e-06,
199
+ "loss": 0.2024,
200
+ "step": 10000
201
+ },
202
+ {
203
+ "epoch": 5.0,
204
+ "eval_BLEU": 66.40826174420631,
205
+ "eval_BLEU-Bigram-Precision": 69.87874920229739,
206
+ "eval_BLEU-Trigram-Precision": 62.338572429672645,
207
+ "eval_BLEU-Unigram-Precision": 78.25215139109366,
208
+ "eval_ROUGE-2": 70.57079335392051,
209
+ "eval_ROUGE-L": 86.73765256866646,
210
+ "eval_Sacre-Bigram-Precision": 68.74877618954376,
211
+ "eval_Sacre-Trigram-Precision": 62.37816764132553,
212
+ "eval_Sacre-Unigram-Precision": 77.08221865525236,
213
+ "eval_SacreBLEU": 65.90571315873414,
214
+ "eval_loss": 0.2885148823261261,
215
+ "eval_runtime": 627.0,
216
+ "eval_samples_per_second": 1.595,
217
+ "eval_steps_per_second": 0.399,
218
+ "step": 10000
219
+ },
220
+ {
221
+ "epoch": 5.25,
222
+ "learning_rate": 5.002105263157895e-06,
223
+ "loss": 0.1887,
224
+ "step": 10500
225
+ },
226
+ {
227
+ "epoch": 5.5,
228
+ "learning_rate": 4.738947368421053e-06,
229
+ "loss": 0.1874,
230
+ "step": 11000
231
+ },
232
+ {
233
+ "epoch": 5.75,
234
+ "learning_rate": 4.475789473684211e-06,
235
+ "loss": 0.1992,
236
+ "step": 11500
237
+ },
238
+ {
239
+ "epoch": 6.0,
240
+ "learning_rate": 4.213157894736842e-06,
241
+ "loss": 0.1872,
242
+ "step": 12000
243
+ },
244
+ {
245
+ "epoch": 6.0,
246
+ "eval_BLEU": 68.61093978961019,
247
+ "eval_BLEU-Bigram-Precision": 71.91774448683354,
248
+ "eval_BLEU-Trigram-Precision": 64.64625780690079,
249
+ "eval_BLEU-Unigram-Precision": 80.26730228994637,
250
+ "eval_ROUGE-2": 70.81950260424799,
251
+ "eval_ROUGE-L": 86.8879332417248,
252
+ "eval_Sacre-Bigram-Precision": 70.91601523351373,
253
+ "eval_Sacre-Trigram-Precision": 64.70326739275394,
254
+ "eval_Sacre-Unigram-Precision": 79.22208052468574,
255
+ "eval_SacreBLEU": 68.17923527991039,
256
+ "eval_loss": 0.28207001090049744,
257
+ "eval_runtime": 624.7912,
258
+ "eval_samples_per_second": 1.601,
259
+ "eval_steps_per_second": 0.4,
260
+ "step": 12000
261
+ },
262
+ {
263
+ "epoch": 6.25,
264
+ "learning_rate": 3.95e-06,
265
+ "loss": 0.187,
266
+ "step": 12500
267
+ },
268
+ {
269
+ "epoch": 6.5,
270
+ "learning_rate": 3.686842105263158e-06,
271
+ "loss": 0.1883,
272
+ "step": 13000
273
+ },
274
+ {
275
+ "epoch": 6.75,
276
+ "learning_rate": 3.4236842105263162e-06,
277
+ "loss": 0.1763,
278
+ "step": 13500
279
+ },
280
+ {
281
+ "epoch": 7.0,
282
+ "learning_rate": 3.1610526315789474e-06,
283
+ "loss": 0.1744,
284
+ "step": 14000
285
+ },
286
+ {
287
+ "epoch": 7.0,
288
+ "eval_BLEU": 69.71037409859504,
289
+ "eval_BLEU-Bigram-Precision": 73.0115503803174,
290
+ "eval_BLEU-Trigram-Precision": 65.73585686213673,
291
+ "eval_BLEU-Unigram-Precision": 80.83097261567517,
292
+ "eval_ROUGE-2": 72.23412572401338,
293
+ "eval_ROUGE-L": 87.99795170784617,
294
+ "eval_Sacre-Bigram-Precision": 71.93000202306291,
295
+ "eval_Sacre-Trigram-Precision": 65.9443072086234,
296
+ "eval_Sacre-Unigram-Precision": 79.78137056770163,
297
+ "eval_SacreBLEU": 69.33649660546098,
298
+ "eval_loss": 0.2822955548763275,
299
+ "eval_runtime": 624.3473,
300
+ "eval_samples_per_second": 1.602,
301
+ "eval_steps_per_second": 0.4,
302
+ "step": 14000
303
+ },
304
+ {
305
+ "epoch": 7.25,
306
+ "learning_rate": 2.8978947368421055e-06,
307
+ "loss": 0.1737,
308
+ "step": 14500
309
+ },
310
+ {
311
+ "epoch": 7.5,
312
+ "learning_rate": 2.6347368421052633e-06,
313
+ "loss": 0.172,
314
+ "step": 15000
315
+ },
316
+ {
317
+ "epoch": 7.75,
318
+ "learning_rate": 2.371578947368421e-06,
319
+ "loss": 0.173,
320
+ "step": 15500
321
+ },
322
+ {
323
+ "epoch": 8.0,
324
+ "learning_rate": 2.108947368421053e-06,
325
+ "loss": 0.1723,
326
+ "step": 16000
327
+ },
328
+ {
329
+ "epoch": 8.0,
330
+ "eval_BLEU": 70.73541701126916,
331
+ "eval_BLEU-Bigram-Precision": 73.84659198784888,
332
+ "eval_BLEU-Trigram-Precision": 66.86204731002722,
333
+ "eval_BLEU-Unigram-Precision": 81.84498005895612,
334
+ "eval_ROUGE-2": 72.0862001759618,
335
+ "eval_ROUGE-L": 87.92745504885133,
336
+ "eval_Sacre-Bigram-Precision": 72.94695883678067,
337
+ "eval_Sacre-Trigram-Precision": 67.04985203733212,
338
+ "eval_Sacre-Unigram-Precision": 80.88426527958387,
339
+ "eval_SacreBLEU": 70.41870207567095,
340
+ "eval_loss": 0.27576586604118347,
341
+ "eval_runtime": 623.9988,
342
+ "eval_samples_per_second": 1.603,
343
+ "eval_steps_per_second": 0.401,
344
+ "step": 16000
345
+ },
346
+ {
347
+ "epoch": 8.25,
348
+ "learning_rate": 1.8457894736842108e-06,
349
+ "loss": 0.1719,
350
+ "step": 16500
351
+ },
352
+ {
353
+ "epoch": 8.5,
354
+ "learning_rate": 1.5831578947368423e-06,
355
+ "loss": 0.1689,
356
+ "step": 17000
357
+ },
358
+ {
359
+ "epoch": 8.75,
360
+ "learning_rate": 1.32e-06,
361
+ "loss": 0.1636,
362
+ "step": 17500
363
+ },
364
+ {
365
+ "epoch": 9.0,
366
+ "learning_rate": 1.0568421052631578e-06,
367
+ "loss": 0.1669,
368
+ "step": 18000
369
+ },
370
+ {
371
+ "epoch": 9.0,
372
+ "eval_BLEU": 70.48783846238173,
373
+ "eval_BLEU-Bigram-Precision": 73.69567275826154,
374
+ "eval_BLEU-Trigram-Precision": 66.59012629161883,
375
+ "eval_BLEU-Unigram-Precision": 81.4548914453767,
376
+ "eval_ROUGE-2": 72.0137632559393,
377
+ "eval_ROUGE-L": 87.87940419205542,
378
+ "eval_Sacre-Bigram-Precision": 72.72819989801121,
379
+ "eval_Sacre-Trigram-Precision": 66.90084985835693,
380
+ "eval_Sacre-Unigram-Precision": 80.49051365108745,
381
+ "eval_SacreBLEU": 70.22585210766724,
382
+ "eval_loss": 0.27468475699424744,
383
+ "eval_runtime": 623.7859,
384
+ "eval_samples_per_second": 1.603,
385
+ "eval_steps_per_second": 0.401,
386
+ "step": 18000
387
+ },
388
+ {
389
+ "epoch": 9.25,
390
+ "learning_rate": 7.936842105263158e-07,
391
+ "loss": 0.1676,
392
+ "step": 18500
393
+ },
394
+ {
395
+ "epoch": 9.5,
396
+ "learning_rate": 5.310526315789474e-07,
397
+ "loss": 0.1596,
398
+ "step": 19000
399
+ },
400
+ {
401
+ "epoch": 9.75,
402
+ "learning_rate": 2.678947368421053e-07,
403
+ "loss": 0.1682,
404
+ "step": 19500
405
+ },
406
+ {
407
+ "epoch": 10.0,
408
+ "learning_rate": 4.736842105263158e-09,
409
+ "loss": 0.1575,
410
+ "step": 20000
411
+ },
412
+ {
413
+ "epoch": 10.0,
414
+ "eval_BLEU": 70.32327217265255,
415
+ "eval_BLEU-Bigram-Precision": 73.60204371274483,
416
+ "eval_BLEU-Trigram-Precision": 66.35728438836166,
417
+ "eval_BLEU-Unigram-Precision": 81.4936468147636,
418
+ "eval_ROUGE-2": 71.64453167067346,
419
+ "eval_ROUGE-L": 87.60926086741465,
420
+ "eval_Sacre-Bigram-Precision": 72.7263458401305,
421
+ "eval_Sacre-Trigram-Precision": 66.82147711826008,
422
+ "eval_Sacre-Unigram-Precision": 80.53293856402665,
423
+ "eval_SacreBLEU": 70.1714765727047,
424
+ "eval_loss": 0.27424004673957825,
425
+ "eval_runtime": 624.9089,
426
+ "eval_samples_per_second": 1.6,
427
+ "eval_steps_per_second": 0.4,
428
+ "step": 20000
429
+ },
430
+ {
431
+ "epoch": 10.0,
432
+ "step": 20000,
433
+ "total_flos": 925520363520000.0,
434
+ "train_loss": 0.2068538417816162,
435
+ "train_runtime": 7846.7767,
436
+ "train_samples_per_second": 20.391,
437
+ "train_steps_per_second": 2.549
438
+ }
439
+ ],
440
+ "max_steps": 20000,
441
+ "num_train_epochs": 10,
442
+ "total_flos": 925520363520000.0,
443
+ "trial_name": null,
444
+ "trial_params": null
445
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:485073c207d0391b6e4576f6ec5ec683838a811b75c06547e6d623eba4d529b2
3
+ size 3567
vocab.txt ADDED
The diff for this file is too large to render. See raw diff