django-nonrel

Django-nonrel form field for ListField

不问归期 提交于 2019-11-28 18:28:35
I'm experimenting with django-nonrel on appengine and trying to use a djangotoolbox.fields.ListField to implement a many-to-many relation. As I read in the documentation a ListField is something that you can use to make a workaround for djamgo-nonrel not supporting many-to-many relations. This is an excerpt from my model: class MyClass(models.Model): field = ListField(models.ForeignKey(AnotherClass)) So if I am getting this right I am creating a list of foreign keys to another class to show a relationship with multiple instances of another class With this approach everything works fine ... No

GAE SDK 1.6.4 dev_appserver datastore flush

邮差的信 提交于 2019-11-28 14:23:08
Hoping to get a comment from the GAE python team on this one. Has something changed between 1.6.3, 1.6.4 with regards to the way the dev_appserver datastore is flushed to disk on app exit? I'm using django-nonrel, and on 1.6.3, and before, I used to be able to load up a python shell: python manage.py shell (manage.py is provided by django-nonrel) I could then import my models and acceess the datastore, modify entities, and quit. On 1.6.4, I'm able to do that, but when I quit, changes are not saved to the datastore. When I run django-nonrel as a WSGI app, it saves properly, and I see a message

Django-nonrel vs Django-mongodb vs Mongokit vs pymongo native

本小妞迷上赌 提交于 2019-11-27 21:50:57
问题 Working on a Django project that requires a NoSQL store and I believe I've settled on Mongo. I've seen a lot of topics that talk about Mongo and Django, but none that mentioned Django-nonrel, and I can't see why it might have been disqualified, but I have no experience with any of them. Ideally, I'd like to preserve the SQL store for the simple things, user auth, groups, etc., and use Mongo for the bigger data. I'd also like to have my Mongo-stored objects as classes, in a Django-ORM style,

Can't login to Django /admin interface

此生再无相见时 提交于 2019-11-27 14:41:27
问题 First of all, I am a newbie. I'm running Ubuntu 11.04 which comes with Python 2.7 so I installed Python2.5 in different dir to run Django-Non-Rel on Google App Engine . I did the Guestbook tutorial and now I am trying to add admin access but when I type in correct username:password Django thinks its incorrect. It doesn't even work when deployed to GAE. If you know please poke me in the right direction. I added: AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', )

Django-nonrel form field for ListField

余生颓废 提交于 2019-11-27 11:22:06
问题 I'm experimenting with django-nonrel on appengine and trying to use a djangotoolbox.fields.ListField to implement a many-to-many relation. As I read in the documentation a ListField is something that you can use to make a workaround for djamgo-nonrel not supporting many-to-many relations. This is an excerpt from my model: class MyClass(models.Model): field = ListField(models.ForeignKey(AnotherClass)) So if I am getting this right I am creating a list of foreign keys to another class to show a

Django-nonrel + Django-registration problem: unexpected keyword argument 'uidb36' when resetting password

本秂侑毒 提交于 2019-11-27 10:55:10
问题 I'm using Django-nonrel with registration app. Things seem to be working fine, except when I try to reset my password. When clicking on reset-password link sent to me in email, Django produces error message: password_reset_confirm() got an unexpected keyword argument 'uidb36' My question: has anybody seen it and knows what's the cure? EDIT: The problem is caused by registration\auth_urls.py - they duplicate entries in django\contrib\auth\urls.py, circumwenting patched version of the file in

Django - How to make a variable available to all templates?

二次信任 提交于 2019-11-26 19:54:58
I would like to know how to pass a variable to all my templates, without repeating the same code on every method in my views.py file? In the example below I would like to make categories (an array of category objects) available to all templates in the web app. Eg: I would like to avoid writing 'categories':categories on every method. Is it possible? One view method def front_page(request): categories = Category.objects.all() if is_logged_in(request) is False: return render_to_response('users/signup.html', {'is_logged_in': is_logged_in(request), 'categories':categories}, context_instance

Django - How to make a variable available to all templates?

浪尽此生 提交于 2019-11-26 09:24:38
问题 I would like to know how to pass a variable to all my templates, without repeating the same code on every method in my views.py file? In the example below I would like to make categories (an array of category objects) available to all templates in the web app. Eg: I would like to avoid writing \'categories\':categories on every method. Is it possible? One view method def front_page(request): categories = Category.objects.all() if is_logged_in(request) is False: return render_to_response(\