21 |
21 |
{% endblock %}
|
22 |
22 |
|
23 |
23 |
{% block content %}
|
24 |
|
<h3>{% trans "Imports" %}</h3>
|
25 |
|
<table class="main">
|
26 |
|
<thead>
|
27 |
|
<tr>
|
28 |
|
<th>{% trans "Filename" %}</th>
|
29 |
|
<th>{% trans "Creation date" %}</th>
|
30 |
|
<th>{% trans "By" %}</th>
|
31 |
|
<th>{% trans "Rows" %}</th>
|
32 |
|
<th></th>
|
33 |
|
</tr>
|
34 |
|
</thead>
|
35 |
|
<tbody>
|
36 |
|
{% for import in imports %}
|
37 |
|
<tr>
|
38 |
|
<td><a href="{% url "a2-manager-users-import" uuid=import.uuid %}">{{ import.filename }}</a></td>
|
39 |
|
<td>{{ import.created }}</td>
|
40 |
|
<td>{{ import.user }}</td>
|
41 |
|
<td>{{ import.rows_count }}</td>
|
42 |
|
<td><form method="post">{% csrf_token %}<button name="delete" value="{{ import.uuid }}">{% trans "Delete" %}</button></form></td>
|
43 |
|
</tr>
|
44 |
|
{% endfor %}
|
45 |
|
</tbody>
|
46 |
|
</table>
|
|
24 |
<div class="section">
|
|
25 |
<h3>{% trans "Imports" %}</h3>
|
|
26 |
<table class="main left">
|
|
27 |
<thead>
|
|
28 |
<tr>
|
|
29 |
<th>{% trans "Filename" %}</th>
|
|
30 |
<th>{% trans "Creation date" %}</th>
|
|
31 |
<th>{% trans "By" %}</th>
|
|
32 |
<th>{% trans "Rows" %}</th>
|
|
33 |
<th></th>
|
|
34 |
</tr>
|
|
35 |
</thead>
|
|
36 |
<tbody>
|
|
37 |
{% for import in imports %}
|
|
38 |
<tr data-uuid="{{ import.uuid }}">
|
|
39 |
<td><a href="{% url "a2-manager-users-import" uuid=import.uuid %}">{{ import.filename }}</a></td>
|
|
40 |
<td>{{ import.created }}</td>
|
|
41 |
<td>{{ import.user }}</td>
|
|
42 |
<td>{{ import.rows_count }}</td>
|
|
43 |
<td><form method="post">{% csrf_token %}<button name="delete" value="{{ import.uuid }}">{% trans "Delete" %}</button></form></td>
|
|
44 |
</tr>
|
|
45 |
{% endfor %}
|
|
46 |
</tbody>
|
|
47 |
</table>
|
|
48 |
</div>
|
|
49 |
|
|
50 |
<div class="section">
|
|
51 |
<h3>{% trans "Help" %}</h3>
|
|
52 |
<p>
|
|
53 |
{% blocktrans trimmed %}
|
|
54 |
The first line of your CSV file must be a header <a href="#help-attributes">mapping columns to user's attributes identifier</a>.
|
|
55 |
Each user attribute name can be followed by <a href="#help-flags">flags</a> separated by spaces.
|
|
56 |
You can also import an <a href="#help-external-identifier">external identifier</a> to prevent creating duplicates when doing multiple import from the same source.
|
|
57 |
{% endblocktrans %}
|
|
58 |
</p>
|
|
59 |
<h4 id="help-attributes">{% trans "Attributes" %}</h4>
|
|
60 |
<table class="main left">
|
|
61 |
<thead>
|
|
62 |
<tr>
|
|
63 |
<th>{% trans "Label" %}</th>
|
|
64 |
<th>{% trans "Identifier" %}</th>
|
|
65 |
</tr>
|
|
66 |
</thead>
|
|
67 |
<tbody>
|
|
68 |
{% for column in help_columns %}
|
|
69 |
<tr>
|
|
70 |
<td>{{ column.label }}</td>
|
|
71 |
<td><var>{{ column.name }}</var></td>
|
|
72 |
</tr>
|
|
73 |
{% endfor %}
|
|
74 |
</tbody>
|
|
75 |
</table>
|
|
76 |
<h4 id="help-flags">{% trans "Flags" %}</h4>
|
|
77 |
<p>{% blocktrans trimmed %}Each column can receive flags after its name, separated by spaces. Each modifier can be prefixed by <var>no-</var> to set its value to false.{% endblocktrans %}</p>
|
|
78 |
<table class="main left">
|
|
79 |
<thead>
|
|
80 |
<tr>
|
|
81 |
<th>{% trans "Flag" %}</th>
|
|
82 |
<th>{% trans "Meaning" %}</th>
|
|
83 |
<th>{% trans "Default value" %}</th>
|
|
84 |
</tr>
|
|
85 |
</thead>
|
|
86 |
<tbody>
|
|
87 |
<tr>
|
|
88 |
<td>key</td>
|
|
89 |
<td>
|
|
90 |
{% blocktrans trimmed %}
|
|
91 |
The column is an import key, it is used to match the row with an existing user. Only one column can be an import key.
|
|
92 |
{% endblocktrans %}
|
|
93 |
</td>
|
|
94 |
<td>{% trans "False" %}</td>
|
|
95 |
</tr>
|
|
96 |
<tr>
|
|
97 |
<td>create</td>
|
|
98 |
<td>
|
|
99 |
{% blocktrans trimmed %}
|
|
100 |
Values will be used when creating a new user.
|
|
101 |
{% endblocktrans %}
|
|
102 |
</td>
|
|
103 |
<td>{% trans "True" %}</td>
|
|
104 |
</tr>
|
|
105 |
<tr>
|
|
106 |
<td>update</td>
|
|
107 |
<td>
|
|
108 |
{% blocktrans trimmed %}
|
|
109 |
Values will be used when updating an existing user.
|
|
110 |
{% endblocktrans %}
|
|
111 |
</td>
|
|
112 |
<td>{% trans "True" %}</td>
|
|
113 |
</tr>
|
|
114 |
<tr>
|
|
115 |
<td>unique</td>
|
|
116 |
<td>
|
|
117 |
{% blocktrans trimmed %}
|
|
118 |
Values must be unique in the target organizational unit.
|
|
119 |
{% endblocktrans %}
|
|
120 |
</td>
|
|
121 |
<td>{% trans "False" %} {% blocktrans trimmed %}
|
|
122 |
(default is True for the <var>email</var> and <var>username</var> columns if they are configured to be unique in the target organizational unit)
|
|
123 |
{% endblocktrans %}
|
|
124 |
</td>
|
|
125 |
</tr>
|
|
126 |
<tr>
|
|
127 |
<td>globally-unique</td>
|
|
128 |
<td>
|
|
129 |
{% blocktrans trimmed %}
|
|
130 |
Values must be unique among all users.
|
|
131 |
{% endblocktrans %}
|
|
132 |
</td>
|
|
133 |
<td>{% trans "False" %} {% blocktrans trimmed %}
|
|
134 |
(default is True for the <var>email</var> and <var>username</var> columns if they are configured to be globally unique)
|
|
135 |
{% endblocktrans %}</td>
|
|
136 |
</tr>
|
|
137 |
<tr>
|
|
138 |
<td>verified</td>
|
|
139 |
<td>
|
|
140 |
{% blocktrans trimmed %}
|
|
141 |
Values are verified.
|
|
142 |
{% endblocktrans %}
|
|
143 |
</td>
|
|
144 |
<td>{% trans "False" %} {% blocktrans %}(default is True for the <var>email</var> column){% endblocktrans %}</td>
|
|
145 |
</tr>
|
|
146 |
</tbody>
|
|
147 |
</table>
|
|
148 |
|
|
149 |
<h4 id="help-external-identifier">{% trans "External identifier" %}</h4>
|
|
150 |
<p>
|
|
151 |
{% blocktrans trimmed %}
|
|
152 |
You can also use two special columns <var>_source_name</var> and
|
|
153 |
<var>_source_id</var>. <var>_source_name</var> must be the name of the
|
|
154 |
source directory from which the users are exported, it must not
|
|
155 |
change between imports. <var>_source_id</var> is the unique identifier
|
|
156 |
from the source directory from which the users are extracted, it must
|
|
157 |
not change between imports and should never be reused for different
|
|
158 |
users. <var>_source_id</var> is automatically the key column, and you
|
|
159 |
cannot use another key column.
|
|
160 |
{% endblocktrans %}
|
|
161 |
</p>
|
|
162 |
<h4>{% trans "Examples" %}</h4>
|
|
163 |
<p>Importing verified first and last name of users keyed by email</p>
|
|
164 |
<blockquote>
|
|
165 |
<pre>email key,first_name verified,last_name verified
|
|
166 |
john.doe@example.com,John,Doe
|
|
167 |
</pre>
|
|
168 |
</blockquote>
|
|
169 |
<p>Importing email, family_reference, first and last name of users from application <var>app1</var>, ensuring family_reference is unique.</p>
|
|
170 |
<blockquote>
|
|
171 |
<pre>_source_name,_source_id,email,family_reference,first_name,last_name
|
|
172 |
app1,1,john.doe@example.com,1234,John,Doe
|
|
173 |
</pre>
|
|
174 |
</blockquote>
|
|
175 |
</div>
|
47 |
176 |
{% endblock %}
|