Django: How to customize the admin form for specific model

2015-01-24 Thread Shoaib Ijaz
First of all I apologize the question title can be unrelated to my query. I am also confused what I want to do because I am less familiar with django. I want to create simple comment system. The requirement is clear that user can post comment with multiple images.Every comment should have repl

Django REST Framework: How to add prefix in URL for versioning

2014-11-05 Thread Shoaib Ijaz
I am trying to create version for REST application. Here is my URL Examle www.myapi.com/foo [default version] www.myapi.com/v1/foo [version one] This is the project structure ├── __init__.py├── settings.py├── urls.py├── default_app│ ├── __init__.py│ ├── serializer.py│ ├── models.py│ ├── views

Re: Django: How to apply filter on geometry type using GeoDjango QuerySet

2014-10-14 Thread Shoaib Ijaz
:34:04 -0700 (PDT) > Shoaib Ijaz > wrote: > > > > > > > I am trying to convert a SQL into Django Query: > > > > SELECT * from tbl_name where geometrytype(geometry) LIKE 'POINT'; > > > > I have searched on it but cannot find any geom

Django: How to apply filter on geometry type using GeoDjango QuerySet

2014-10-13 Thread Shoaib Ijaz
I am trying to convert a SQL into Django Query: SELECT * from tbl_name where geometrytype(geometry) LIKE 'POINT'; I have searched on it but cannot find any geometry type function. Any Help? Thank you -- You received this message because you are subscribed to the Google Groups "Django users"

django - How to fix “the procedure entry point sqlite3_rtree_geometry_callback could not be located in the dynamic link library sqlite3.dll”

2014-08-19 Thread Shoaib Ijaz
I have problem with django project. I am facing error when i am trying to execute project in browser. "the procedure entry point sqlite3_rtree_geometry_callback could not be located in the dynamic link library sqlite3.dll" I have no idea where is the issue. -- You received this message beca

How to use Database Views in Django Rest Framework

2014-04-18 Thread Shoaib Ijaz
I am using Django Rest Framework for serialize data. I came across a scenario where I have to use Database Views as Model. *My Model* class A(models.Model): name = models.CharField(max_length=240, blank=True) value = models.CharField(max_length=240, blank=True) class Meta:

Re: How to create Union in Django queryset

2014-04-16 Thread Shoaib Ijaz
I don't want use SQL query in django On Thursday, 17 April 2014 04:39:09 UTC+5, Russell Keith-Magee wrote: > > On Wed, Apr 16, 2014 at 9:30 PM, Shoaib Ijaz > > > wrote: > > Sorry for duplicate post How to create Union > > > > I am using Django REST Fra

How to create Union in Django queryset

2014-04-16 Thread Shoaib Ijaz
Sorry for duplicate post How to create Union I am using Django REST Framework in project and I want to create union two different Models. *My Models* class A(models.Model): name = models.CharField(max_lengt

Relation in Django REST Framework?

2014-04-08 Thread Shoaib Ijaz
I am using serializers.GeoFeatureModelSerializer to serialize Model. I have a queryset that is creating Left Outer Join. I want to serialize related Model fields Here is my Model class LookupTiming(models.Model): day = models.CharField(max_length=7) time_1 = models.TimeField() tim

How to create complex Left JOIN in Django

2014-04-07 Thread Shoaib Ijaz
I am trying to create multi Model Left join using django Here is my model class LookupTiming(models.Model): day = models.CharField(max_length=7) time_1 = models.TimeField() time_2 = models.TimeField() class Meta: db_table = u'lookup_timing' class Streets(models.Model):

How to use inspectdb command for postgres table in Django

2014-04-03 Thread Shoaib Ijaz
I am trying to generate Model class from postgres table, this table contain some geometry type column. I am using following command for Model creation python manage.py inspectdb But facing this error Exception: Could not find a geometry or geography column for "accommodation"."geometry" th

Re: How transform specific geometry column using Django GIS GeoQuerySet

2014-03-28 Thread Shoaib Ijaz
> > Can you elaborate following statement, i am at beginner level in django > what why i cannot understand your reply * One option would be to return the data and then transform it once you have the spatial objects into python variables. * Thank you > -- You received this message

How transform geometry column using GeoDjango

2014-03-27 Thread Shoaib Ijaz
I am trying to transform geometry column in django, here is my model class Network(models.Model): name = models.CharField(max_length=50, blank=True) alias = models.CharField(max_length=100, blank=True) geometry = models.GeometryField(srid=3857, null=True, blank=True) bbox = model

Re: How transform specific geometry column using Django GIS GeoQuerySet

2014-03-27 Thread Shoaib Ijaz
*(*)* I am not doing sql queries in django On Thursday, 27 March 2014 16:53:30 UTC+5, Shoaib Ijaz wrote: > > I am doing sql queries in django, the queries that i mentioned above are >> print queries of django > > > Network.objects.transform(srid=3857).values('geomet

Re: How transform specific geometry column using Django GIS GeoQuerySet

2014-03-27 Thread Shoaib Ijaz
> > I am doing sql queries in django, the queries that i mentioned above are > print queries of django Network.objects.transform(srid=3857).values('geometry', 'bbox') *This is printed SQL query output of above django query * SELECT ST_Transform("tbl_network"."geometry", 3857), "tbl_networ

Re: How transform specific geometry column using Django GIS GeoQuerySet

2014-03-26 Thread Shoaib Ijaz
Sorry i mistype queries Network.objects.transform(srid=3857).values('geometry', 'bbox') > > SELECT ST_Transform("tbl_network"."geometry", 3857), "tbl_network"."bbox" > FROM "tbl_network" > > Network.objects.transform(srid=3857).values('bbox') > > SELECT "tbl_network"."bbox" FROM "tbl_networ

How transform specific geometry column using Django GIS GeoQuerySet

2014-03-26 Thread Shoaib Ijaz
I am trying to transform geometry column type in django, here is my model class Network(models.Model): name = models.CharField(max_length=50, blank=True) alias = models.CharField(max_length=100, blank=True) geometry = models.GeometryField(srid=3857, null=True, blank=True) bbox =

How to convert SQL Complex QUERY to django QUERY

2014-03-18 Thread Shoaib Ijaz
I am trying to convert sql query to django query but failed to do this, can anyone help me select id,name,round(value::numeric,2) as value, st_transform(geometry, 3857) as geometry from net_rest where state_id in (1,2) and name = 'height' union (select d.id,d.re

Python-Django : ImportError at / : No module named urls

2013-12-11 Thread shoaib ijaz
I have created Djnago project in eclipse. Unfortunately, i am facing issue when i run the project ImportError at / No module named urls Here Error Page http://dpaste.com/1499981/ Eclipse Project http://i1008.photobucket.com/albums/af204/shoaibshah01/Untitled_zps84f95b4f.jpg -- You received