S
S
SiDChik2012-01-25 10:45:20
Django
SiDChik, 2012-01-25 10:45:20

Removing Mongo from view in Django?

There is a model:

class VitrinaByKeys(Document):
    word = StringField(verbose_name = u'слово',max_length=64)
    case_id = StringField(verbose_name = u'витрина',max_length=64)

    meta = {
        'indexes' : ['word', 'case_id', ]
    }

Trying to delete entries:
keyses=VitrinaByKeys.objects.filter(case_id = 'some_id')
keyses.delete()

Through the Shell, everything works fine, but through the view in Debug mode, everything refuses to work. How can this be avoided? Those. to make it work in Debug mode?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
SiDChik, 2012-01-25
@SiDChik

Sorry, everything turned out to be easier, there is such a field as ListField ...

P
Progrik, 2012-01-25
@Progrik

Are you using django-mongodb? How does it feel? I heard that it is still "raw" and does not completely replace Django ORM.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question