Re: GeometryField.geography = True Syntax Help GIS Model
First of all, you have to create a geo database. Postgis (a PostgreSQL extension) is the best choice. After that, you have to define some geography fields and import your data, shape files (shp), etc. GeoDjango Tutorial provides all the steps to get it done. https://docs.djangoproject.com/en/dev/ref/contrib/gis/tutorial/ If you are not familiar with geo concepts, I recommend to take a look at http://geodjango.org/presentations/ Hope that helps you On Fri, Nov 2, 2012 at 11:30 PM, JJ Zolper wrote: > Wait so does anyone know how to do this? > > I posted this a long time ago. > > How do I define a geography field? I need a geography column so I can > perform geographic queries on it and the documentation doesn't give me > a definitive way on how to do it. > > Would it be like: > > city = models.CharField(max_length=**50, GeometryField.geography = true) > > ??? > > > On Saturday, October 20, 2012 1:22:32 PM UTC-4, JJ Zolper wrote: >> >> Hello everyone, >> >> So I've decided for my GeoDjango application I want WGS84 along with a >> geography database column, rather than geometry. >> >> I was reading here: >> >> https://docs.djangoproject.**com/en/1.4/ref/contrib/gis/** >> model-api/#geography<https://docs.djangoproject.com/en/1.4/ref/contrib/gis/model-api/#geography> >> >> GeometryField.geography<https://docs.djangoproject.com/en/1.4/ref/contrib/gis/model-api/#django.contrib.gis.db.models.GeometryField.geography> >> >> If set to True, this option will create a database column of type >> geography, rather than geometry. Please refer to the geography >> type<https://docs.djangoproject.com/en/1.4/ref/contrib/gis/model-api/#geography-type> >> section >> below for more details. >> >> >> that to set up a new column as geography I had to >> set GeometryField.geography = True. >> >> I am unsure of the syntax of how to do this? There was no example given. >> Or where to properly place this line? >> >> Here is the model.py file I am working on. If you could tell me where to >> fit this in that would be great? >> >> >> from django.contrib.gis.db import models >> >> class Artist(models.Model): >> name = models.CharField(max_length=**30) >> genre = models.CharField(max_length=**30) >> city = models.CharField(max_length=**60) >> state = models.CharField(max_length=**30) >> country = models.CharField(max_length=**50) >> website = models.URLField() >> objects = models.GeoManager() >> >> def __unicode__(self): >>return self.name >> >> >> >> Thanks so much, >> >> JJ >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/django-users/-/tWBJBDuXZzYJ. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- Christiano Anderson | http://christiano.me/ http://twitter.com/dump -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: MongoDB and Django
It is not supported by default. Check django-nonrel and django-mongodb-engine projects. I am not sure if these projects are still available. On 31 August 2013 05:22, Timothy Makobu wrote: > Hi, > > Is MongoDB support coming to standard Django? > > regards, > Tim > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > For more options, visit https://groups.google.com/groups/opt_out. > -- Christiano Anderson http://christiano.me/ http://twitter.com/dump/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: Django logs for the website
By default, a Django application doesn't log everything, except 500 errors. You can also check the access.log and error.log of your Nginx or WSGI system. If you want a more verbose logging system, take a look at: https://docs.djangoproject.com/en/dev/topics/logging/ On 1 September 2013 14:21, Alek Uritsky wrote: > Hi all, > does Django/Python has a standard logs system? I am trying to find the > logs generated by the website, so far was able to find only the webserver > logs (nginx). > Is there a standard place where a Python website developer would put > website specific logs? > > thanx > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > For more options, visit https://groups.google.com/groups/opt_out. > -- Christiano Anderson http://christiano.me/ http://twitter.com/dump/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: MongoDB and Django
Russ, you are right! I have used Django MongoDB Engine. It works fine, but requires an older version of Django and can't be updated. Some Django features (like many-to-many, some admin features or strong ORM related) doesn't work fine with MongoDB (and makes sense, it is NoSQL). Today this is not my choice. I have several projects using MongoDB, my first choice is to use Django as it is, without any modification on its ORM, accessing a Postgres database and on those parts I need MongoDB, I simply call pymongo inside of the Django views. You can also use MongoEngine, an ORM-Like module. My 2 cents. Cheers On 2 September 2013 09:38, Russell Keith-Magee wrote: > > On Sat, Aug 31, 2013 at 6:22 PM, Timothy Makobu < > makobu.mwambir...@gmail.com> wrote: > >> Hi, >> >> Is MongoDB support coming to standard Django? >> > > There's nothing official being planned, and I'm not aware of any active > efforts to add the features to Django's core. > > Christiano pointed you at some third-party projects that have attempted to > integrate MongoDB into Django; I can't comment on how well they work, or > how well they're being maintained. > > It's also worth pointing out that even if there isn't official Django > support for MongoDB, you can still use Django. You just can't use anything > ORM related, but you can still use Django's URL routing, forms, > middlewares, cache layers, email tools, and so on. When you need to touch > actual data, you use the native MongoDB APIs. > > Yours, > Russ Magee %-) > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > For more options, visit https://groups.google.com/groups/opt_out. > -- Christiano Anderson http://christiano.me/ http://twitter.com/dump/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: Recommended dev environment for a Django project deployed to Linode
d be a good choice here. But, >>> would it make more difficult the deployment cycle? And using a virtual >>> machine to just open the IDE and develop sounds like a resource waste to >>> me. Is there any other solution? >>> >>> I think I should use, at least, VirtualEnv, VirtualEnvWrapper and PIP, >>> like I've read in these useful links >>> >>> http://www.slideshare.net/**ryan_blunden/virtualenv-and-** >>> pip-isolated-python-**environments<http://www.slideshare.net/ryan_blunden/virtualenv-and-pip-isolated-python-environments> >>> http://www.slideshare.net/**ajdiaz/isolated-development-**in-python<http://www.slideshare.net/ajdiaz/isolated-development-in-python> >>> >>> But I'd like to know the opinion of Djanjo experts / hard "pythonistas". >>> Any suggestion is strongly appreciated. >>> >>> Many thanks in advance, and best regards >>> >>> -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > For more options, visit https://groups.google.com/groups/opt_out. > -- Christiano Anderson http://christiano.me/ http://twitter.com/dump/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: Responsive design
Django gives you all the freedom to create responsive layouts or not. To be responsive or not is not related to Django, but to the templates you create. You can also use a CSS framework like Bootstrap, BluePrint or your favourite to create your templates as you like. Cheers On 26 September 2013 05:18, Jasvir Singh wrote: > Could anyone please tell me, how to make responsive design > in django? > -- > Jasvir Singh Grewal > Blog: jasvirsinghgrewal91.wordpress.com > > : > [ GNU/Linux One Stanza Tip (LOST) ]### > > Sub : awk tips [#13] LOST #473 > > # Print sequence number and then column 1 of file: > $ awk '{print NR, $1}' textfile > > [banduji (at) symonds.net] > : > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > For more options, visit https://groups.google.com/groups/opt_out. > -- Christiano Anderson http://christiano.me/ http://twitter.com/dump/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.