django-nonrel

django-nonrel on Google App Engine - Implications of using ListField for ManyToMany

僤鯓⒐⒋嵵緔 提交于 2019-12-06 04:49:47
I am working on a Google App Engine application and I am relatively new at this. I have built an app already in Django and have a model using a field type of ManyToMany. I am aware that django-nonrel does not support many-to-many field types of Django. So I am considering using ListField instead. Questions: - What is the implication of using ListField instead of ManyToMany? - I am aware that this means that Django's JOIN API cannot be used. But what does this mean for my app? - Am I going to have problems when it comes to doing a search for something in a many-to-many field? Apologies if these

Django 1.8 and MongoDB?

爱⌒轻易说出口 提交于 2019-12-05 13:06:38
This question is already asked on StackOverflow, The asked questions date back to 2013, Its 2015 now and Django has grown up fast. What is the situation of using mongodb with Django 1.8 as of 2015? Does Django support Monogodb out of the box (with db adapters)? or another distribution like django-nonrel should be used? just my thoughts and somewhat subjective and opinionated but I would say it does not work very well. I quickly disbanded the idea of trying to run Django with MongoDB, since it's auth system is heavily reliant upon a relational database to work. There are apparently ways around

Django-nonrel ≤1.3 and Memcache on Google App Engine

拥有回忆 提交于 2019-12-05 08:15:57
I'm a designer still trying to code up my first app in Google App Engine as an experiment. I have got to the point where I want to set up memcache to cache my entire site following the instructions at: http://docs.djangoproject.com/en/dev/topics/cache/#memcached I am clear that I need to add in my settings.py the following: CACHE_BACKEND = 'memcached:// [IP ADDRESS] : [PORT] /' And then: MIDDLEWARE_CLASSES = ( 'django.middleware.cache.UpdateCacheMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.cache.FetchFromCacheMiddleware', ) CACHE_MIDDLEWARE_SECONDS=60*2 This

Django App Engine: AttributeError: 'AnonymousUser' object has no attribute 'backend'

柔情痞子 提交于 2019-12-05 06:32:48
I am using djangoappengine. When I try create a new user, authenticate that user, and log them in, I get the following error AttributeError: 'AnonymousUser' object has no attribute 'backend' . My code is simple and looks like: user = User.objects.create_user(username, username, password) user.set_password(password) user.save() user = django.contrib.auth.authenticate(username=username, password=password) django.contrib.auth.login(request, user) I only get the following error on production and only occasionally: web req_create: 'AnonymousUser' object has no attribute 'backend' Traceback (most

Django MongoDB problem

筅森魡賤 提交于 2019-12-05 06:09:16
my django app run with mysql, but when i try with mongodb then show thie error Traceback (most recent call last): File "manage.py", line 14, in <module> execute_manager(settings) File "/home/abdullah/django-trunk/django/core/management/__init__.py", line 442, in execute_manager utility.execute() File "/home/abdullah/django-trunk/django/core/management/__init__.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/abdullah/django-trunk/django/core/management/base.py", line 191, in run_from_argv self.execute(*args, **options.__dict__) File "/home/abdullah

django-nonrel google app engine fail to log in admin panel

亡梦爱人 提交于 2019-12-04 21:30:57
I've created a django-nonrel app on gae. Added a user (django.auth.models.User) with is_active, is_staff, is_suiperuser all True. On localhost I login successfully, but I fail to login on GAE after deploy (I've created the same user on GAE too and it can be seen on datastore view). But when I try to login on http://.appspot.com/admin/ it returns "Please enter a correct username and password." Nick and Elliot are right. You have to use manage.py remote createsuperuser 来源: https://stackoverflow.com/questions/5686060/django-nonrel-google-app-engine-fail-to-log-in-admin-panel

Why do I get an InvalidDocument exception when saving an object into MongoDB in Django for the first time?

这一生的挚爱 提交于 2019-12-04 18:47:42
I've been having a nightmare of a time trying to get MongoDB working with Django. I now have it successfully installed, but it errors upon the first attempt to save an object. I've been following this tutorial , and the Post model they present I have copied precisely. Here is the code for the model: from django.db import models from djangotoolbox.fields import ListField class Post(models.Model): title = models.CharField(max_length=200) text = models.TextField() tags = ListField() comments = ListField() The post is actually created (and inserted) here: post = Post.objects.create( ... title=

Google App Engine bulkloader issue when using yaml autogenerated configuration and entities with numeric ID

风流意气都作罢 提交于 2019-12-04 09:19:15
My application uses Django non-rel . I don't have access to model. I have my bulkloader.yaml file autogenerated by appcfg.py create_bulkloader_config . Problem is entities numeric ID's are being imported as string key names. So if I export entity with int ID of, for example, '62' , it gets imported as entity with string key name of '61' which screws up Django. Revelant bulkloader.yaml Fragment: property_map: - property: __key__ external_name: key export_transform: transform.key_id_or_name_as_string I'm trying to setup download/upload od data using bulkloader, and I want to have data as easy to

How to make a custom query using django-nonrel and mongodb

浪子不回头ぞ 提交于 2019-12-03 10:48:21
问题 Is there a recommended way to make a custom query to mongodb using django nonrel? I have an entire site set up and running well, now I am just adding in some geospatial indexing and queries, and wanted to know if for geospatial queries there is already support or if there is a best practice way to do it using a custom made query? 回答1: I found one answer to this question, let me now if there is a better one. As documented here assign your objects to the MongoDBManager - http://django-mongodb

Django MongoDB Engine error when running tellsiteid

这一生的挚爱 提交于 2019-12-03 06:23:36
问题 SO I created a django project and app as per the tutorial and I have all the dependencies necessarry for MongoDB Engine it all seemed to be working fine and dandy till I tried enabling the admin interface. I uncommented the require bits, and added 'django_mongodb_engine' and 'djangotoolbox' to the apps section in settings.py When I try to get into localhost:8000/admin I get an error: "AutoField (default primary key) values must be strings representing an ObjectId on MongoDB (got u'1' instead)