Answer the question
In order to leave comments, you need to log in
For what reasons can a query in mongodb like db.presets.find({}, {"name":1}) not work?
Good afternoon.
On my PC, I created a selection from the mongo base, which should select the names of all fields in the presets collection.
Everything works correctly on the PC, but when uploaded to 2 different servers, nothing works =(
Through trial / error / tests, I came to the conclusion that the line does not work:
presets_names1 = db.presets.find({}, {"name":1})
args['presets_names1'] = presets_names1
{% for pres1 in presets_names1 %}
<label class="radio">
<input class="pres1" type="radio" name="group1" value="{{ pres1.name }}">{{ pres1.name }}
</label>
{% endfor %}
pres = presets_col.find_one({'name':preset})
preset_username = pres['login']
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question