django-nonrel

How to use static files with django nonrel

不问归期 提交于 2019-12-03 06:16:58
I'm trying to use the Django nonrel project for google app engine. I setup the test project as described here . I added a new folder to the project named "static" for my static files. And for the app.yaml file i added the lines; - url: /static static_dir: static I can't reach my static files. Do i have to do additional configuration? Thx in advance. app.yaml have nothing to do with Django, but it does configures App Engine front-end. The answer depends on whether you want to serve static files with Django or the front-end (which is, well, cheaper and faster). If you just "added" your - url:

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

五迷三道 提交于 2019-12-03 00:28:44
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? 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-engine.github.com/mongodb-engine/cool-stuff.html#included-mongodb-batteries from django_mongodb_engine

Django MongoDB Engine error when running tellsiteid

浪尽此生 提交于 2019-12-02 19:47:57
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). Please make sure your SITE_ID contains a valid ObjectId string." After some googling apparently I

Django-Nonrel with Mongodb listfield

强颜欢笑 提交于 2019-12-02 13:37:16
问题 I am trying to implement manytomany field relation in django-nonrel on mongodb. It was suggessted at to: Django-nonrel form field for ListField Following the accepted answer models.py class MyClass(models.Model): field = ListField(models.ForeignKey(AnotherClass)) i am not sure where the following goes, it has been tested in fields.py, widgets,py, models.py class ModelListField(ListField): def formfield(self, **kwargs): return FormListField(**kwargs) class ListFieldWidget(SelectMultiple): pass

Django-Nonrel with Mongodb listfield

自闭症网瘾萝莉.ら 提交于 2019-12-02 07:10:54
I am trying to implement manytomany field relation in django-nonrel on mongodb. It was suggessted at to: Django-nonrel form field for ListField Following the accepted answer models.py class MyClass(models.Model): field = ListField(models.ForeignKey(AnotherClass)) i am not sure where the following goes, it has been tested in fields.py, widgets,py, models.py class ModelListField(ListField): def formfield(self, **kwargs): return FormListField(**kwargs) class ListFieldWidget(SelectMultiple): pass class FormListField(MultipleChoiceField): """ This is a custom form field that can display a

How to use custom python libraries and apps in Google App Engine?

匆匆过客 提交于 2019-12-02 03:54:42
问题 I would like to know how to install and use third party libraries and/or apps in django nonrel at Google App Engine? Currently my web application uses django-nonrel and I would like to install some libraries available in github: Ususally libraries require installation via the pip or easy_install command: $ pip install django-social-auth How can I install or use libraries in Google App Engine? Sample App Structure: myapp/ lib/ django-social-auth/ app.yaml index.yaml main.py views.py 回答1: Put

Creating superuser in django-nonrel

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 17:11:33
问题 I'm a newbie been going through the django-nonrel tutorials and have set up django-nonrel inside of Google App Engine. I am now trying to create a superuser using: manage.py createsuperuser --username=joe --email=joe@example.com I get Unknown command: 'createsuperuser' Type 'manage.py help' for usage When I type manage.py help, I don't see createsuperuser listed. Help. 回答1: Solved this. For anyone else having the same problem, in order to get admin to work: 1) Ensure that django.contrib.auth

How do I configure mongoDB indexes in django-nonrel without using Models?

一笑奈何 提交于 2019-12-01 14:04:40
I'm building a site using mongodb and django-nonrel. I've read in various places that for mongo, it's better to use straight pymongo than the django ORM. This jives with my experience as well -- django's ORM is awesome for relational databases, but for doesn't give you much that pymongo doesn't do already. My problem is that I don't know how to set up the database tables (err... "collections") initially without using django's ORM. What do I need to do to cast off the shackles of models.py and syncdb, and just write the code myself? Seems like somebody should have created a guide for this

How do I configure mongoDB indexes in django-nonrel without using Models?

孤人 提交于 2019-12-01 13:14:17
问题 I'm building a site using mongodb and django-nonrel. I've read in various places that for mongo, it's better to use straight pymongo than the django ORM. This jives with my experience as well -- django's ORM is awesome for relational databases, but for doesn't give you much that pymongo doesn't do already. My problem is that I don't know how to set up the database tables (err... "collections") initially without using django's ORM. What do I need to do to cast off the shackles of models.py and

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

纵然是瞬间 提交于 2019-11-29 02:18:37
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, so that I can have a similar 'feel', but that isn't critical. Lastly, do any of the above allow me to