Re: code revision short job

2012-01-03 Thread Satyajit Sarangi
his group at > http://groups.google.com/group/django-users?hl=en. > > -- *Satyajit Sarangi* -- 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 fro

How to iterate over a formset?

2011-11-10 Thread Satyajit Sarangi
This is my forms.py: from django import forms from django.forms.formsets import formset_factory class CodeForm(forms.Form): code = forms.CharField(widget = forms.Textarea) CodeFormSet = formset_factory(CodeForm, extra = 5) How do I iterate over the data? I tried this: if

Viewing file-upload in django admin site. How to do it?

2011-10-23 Thread Satyajit Sarangi
This is my models.py from django.db import models # Create your models here. class Question(models.Model): question_name = models.CharField(max_length=200) question_type = models.CharField(max_length=20) def __unicode__(self): return self.question_name

How to link custom search with a view in a different app ?

2011-06-27 Thread Satyajit Sarangi
# Create your views here. from shapes.models import * from openmaps.models import * from django.shortcuts import render_to_response from django.contrib.gis.shortcuts import render_to_kml from openmaps.models import Open_Layers from django import forms from openmaps.forms import GeoForm from

Error while trying to link up to a view from search results in a template .

2011-06-23 Thread Satyajit Sarangi
My views.py is this def map_display(request): if request.method == 'POST': form = DispForm(request.POST) if form.is_valid(): this_user = request.user user1= this_user.pk LName =

How do I add this particular url in my template ?

2011-06-23 Thread Satyajit Sarangi
This is the url http://127.0.0.1:8000/admin/maps/test/ . When I click on a link on a particular template , it should take me there . How do I manage it ? The reason why I am asking is this is in the admin . -- You received this message because you are subscribed to the Google Groups "Django

How to use the foreign key to get the exact row of that particular table ?

2011-06-23 Thread Satyajit Sarangi
My models.py is this class PermiLayer(models.Model): user = models.ForeignKey(User) table = models.ForeignKey(ContentType) permi = models.IntegerField() My views.py is this perm.table = ContentType.objects.get(app_label="OsmMap",model="osmlayers") Perm.table is storing an integer .

Re: What would be a better views.py code to achieve this particular task .

2011-06-23 Thread Satyajit Sarangi
gt; On Thu, Jun 23, 2011 at 10:07 PM, Satyajit Sarangi < > writetosatya...@gmail.com> wrote: > >> I am not saying what is a query set error . I am saying , why am I getting >> such an error , when in the documentation it is mentioned that the exact >> query works . >&g

Content type returns this :ContentType matching query does not exist.

2011-06-23 Thread Satyajit Sarangi
My views.py is this if k == 3: perm = PermiLayer() perm.user = user perm.permi = k if int(rad4) == 0: perm.table =

What would be a better views.py code to achieve this particular task .

2011-06-23 Thread Satyajit Sarangi
This is my models.py of a different app . class PermiLayer(models.Model): user = models.ForeignKey(User) table = models.ForeignKey(ContentType) permi = models.IntegerField() In another app's views , I am accessing a form that has given me a username . I have to

I have two doubts when It comes to django url and django templates . Please help

2011-06-23 Thread Satyajit Sarangi
{% extends "base.html" %} {% load i18n %} Hello User {{user}} {% block content %} {% if form.errors %} {% trans "Sorry there are corrections needed in your form below:" %} {{ form.non_field_errors }} {% endif %} {% if form.is_multipart %} Hello User {{user}} {% else

Haystack No site conf error . How to debug ?

2011-06-23 Thread Satyajit Sarangi
This is my settings.py # Django global settings # This allows us to construct the needed absolute paths dynamically, # e.g., for the GIS_DATA_DIR, MEDIA_ROOT, and TEMPLATE_DIRS settings. # see: http://rob.cogit8.org/blog/2008/Jun/20/django-and-relativity/ import os GEOGRAPHIC_ADMIN_DIR =

create_inactive_user() got an unexpected keyword argument 'profile_callback' Error in django registration . What can be the error ?

2011-06-23 Thread Satyajit Sarangi
This is my stack trace . Traceback: File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/ base.py" in get_response 111. response = callback(request, *callback_args, **callback_kwargs) File "/usr/local/lib/python2.6/dist-packages/registration/views.py" in

Re: how to set up user profile in django-registration ?

2011-06-22 Thread Satyajit Sarangi
Now I get a database error relation "registration_userprofile" does not exist LINE 1: ..."."id", "registration_userprofile"."user_id" FROM "registrat... On Wed, Jun 22, 2011 at 8:58 PM, Shawn Milochik <sh...@milochik.com> wrote: > On

Re: how to set up user profile in django-registration ?

2011-06-22 Thread Satyajit Sarangi
me 'UserProfile' is not defined On Wed, Jun 22, 2011 at 8:52 PM, Shawn Milochik <sh...@milochik.com> wrote: > On 06/22/2011 11:21 AM, Satyajit Sarangi wrote: > >> These are my steps . >> 1. Not using django-profile >> 2. Create my own view to show the profile by usi

Re: how to set up user profile in django-registration ?

2011-06-22 Thread Satyajit Sarangi
()'), But this is giving me an error here . On Wed, Jun 22, 2011 at 8:48 PM, Piotr Zalewa <zal...@gmail.com> wrote: > On 06/22/11 16:09, Satyajit Sarangi wrote: > >> I am using django registration , which is not displaying any profile >> when I log in . Thus I am not able to

how to set up user profile in django-registration ?

2011-06-22 Thread Satyajit Sarangi
I am using django registration , which is not displaying any profile when I log in . Thus I am not able to login . What should I do to overcome this ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: How to use django-profile with django registration ?

2011-06-21 Thread Satyajit Sarangi
file.urls')), > > /me is no expert, but that smells like asking for trouble. > > zalun > > > > On 06/21/11 14:48, Satyajit Sarangi wrote: > >> I am using 1.3 >> This is my settings.py >> http://dpaste.com/556954/ >> >> This is my urls.py >>

Re: How to use django-profile with django registration ?

2011-06-21 Thread Satyajit Sarangi
I am using 1.3 This is my settings.py http://dpaste.com/556954/ This is my urls.py http://dpaste.com/556955/ On Tue, Jun 21, 2011 at 7:14 PM, Piotr Zalewa <zal...@gmail.com> wrote: > On 06/21/11 14:15, Satyajit Sarangi wrote: > >> https://bitbucket.org/**ubernostrum/django-**

How to use django-profile with django registration ?

2011-06-21 Thread Satyajit Sarangi
https://bitbucket.org/ubernostrum/django-registration This is what I am using for user registration . Once , I log in the user is not able to get into the userprofile page . Thus I installed this https://bitbucket.org/ubernostrum/django-profiles/ for user profile . Now , this produces a conflict

Re: How to send the class name from one template to another template both in different apps in django ?

2011-06-21 Thread Satyajit Sarangi
seems you have an issue and you are asking for help on making your > solution work, when you should be telling us what it is that you want > to do. Only then will we be able to advise you. > > Sincerely, > Andre Terra > > On 6/20/11, Satyajit Sarangi <writetosatya...@gmai

How do I create dynamic django models ?

2011-06-21 Thread Satyajit Sarangi
I went through this link , but couldn't really understand where to put where . A little more help as to how to go about it would be very helpful . https://code.djangoproject.com/wiki/DynamicModels -- You received this message because you are subscribed to the Google Groups "Django users" group.

How to send the class name from one template to another template both in different apps in django ?

2011-06-20 Thread Satyajit Sarangi
Lets say I work on a class in one template by a certain view . There is a link on that template , that takes me to another template in a different app , where I would like to add certain permissions to that particular class_id that I just saved in this app . How do I do that ? -- You received

How to view the data of a shape file without using the databrowse admin ?

2011-06-17 Thread Satyajit Sarangi
I don't want to use django databrowse admin . Want to create my own template and view that allows user to view a shapefile stored in the database . And also view open layers data and OSM data stored in database . how do I do it ? -- You received this message because you are subscribed to the

Re: django.db.utils.IntegrityError: null value in column “layer_id_id” violates not-null constraint . How to debug ?

2011-06-16 Thread Satyajit Sarangi
the Test model , but doesn't know what to do about the layer_id . Thats what I think . Not sure . What can be the way out ? On Thu, Jun 16, 2011 at 2:19 PM, Daniel Roseman <dan...@roseman.org.uk>wrote: > On Wednesday, 15 June 2011 22:25:24 UTC+1, Satyajit Sarangi wrote: >> >>

Re: How do I link one template with another template ?

2011-06-15 Thread Satyajit Sarangi
ups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- *Satyajit Sarangi* -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-

Re: How do I link one template with another template ?

2011-06-15 Thread Satyajit Sarangi
ibe 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. > > -- *Satyajit Sarangi* -- You received this message because you are subscribed to the Google Groups "D

How do I link one template with another template ?

2011-06-15 Thread Satyajit Sarangi
I have a template , in which I want to display a link , which when clicked takes the user to another template of another app . How to do it ? I understand its a basic django question , but still any help would be usefull . -- You received this message because you are subscribed to the Google

django.db.utils.IntegrityError: null value in column “layer_id_id” violates not-null constraint . How to debug ?

2011-06-15 Thread Satyajit Sarangi
his is my models.py from django.db import models class Sdr_Layer(models.Model): layer_name = models.CharField(max_length = 100) layer_attribute_name=models.CharField(max_length=100) # This is an auto-generated Django model module created by ogrinspect. from django.contrib.gis.db import models

How to make geodjango databrowse admin view GeometryCollection Field data ?

2011-06-15 Thread Satyajit Sarangi
The present databrowse doesnt load if the model has anything apart from point . How to make it load for polygon , line string and GeometryCollectionField ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

How to display shp file data on an osm layer using django without using the databrowse widget ?

2011-06-15 Thread Satyajit Sarangi
I want to display the data that I have stored ,( Openlayers data , kml , shp file) data from postgis data on a openlayers/google map template . How do I do it ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

My django admin page breaks up . Any reason why ?

2011-06-15 Thread Satyajit Sarangi
My django admin page some times breaks up . As in , initially it will show all the required tables in a nice columns , but suddenly the whole design breaks and the data shows up in random ways . Also how to reset the django admin password ? -- You received this message because you are

Using django floppy forms , how do I get the longitude and latitude of the point I clicked , or the line I draw ?

2011-06-15 Thread Satyajit Sarangi
I want to know how to get the latitude and logitiude of a point , or a line that I marked on open layers using django floppy forms . It returns the geom_id , but how do I get latitude and longitude out of it ? -- You received this message because you are subscribed to the Google Groups "Django

How to make databrowseadmin of django show all the objects of shape file and not one by one ?

2011-06-14 Thread Satyajit Sarangi
After I upload a shapefile , the databrowse admin allows to view the files in databrowse admin , but does not all the objects to be shown on one file , i.e it allows only one row of a table mapped onto a openlayers file . How to make all the data , (all the rows ) be displayed on one openlayers

Error 'str' object has no attribute '_meta' . How to debug ?

2011-06-14 Thread Satyajit Sarangi
I want to create a model that brings user_id of the user_auth table as foreign key , layer_id from layer table(defined by me) as also a foreign key . Combine both to form a primary key . and have another integer called perm . My model looks like this from django.contrib.gis.db import models from

How to display a shape file in open layers as a separate app without using geodjango ?

2011-06-13 Thread Satyajit Sarangi
I want to display a shape file stored in my database without in django by using open layers without using databrowse admin . I assume I have to export the data as JSON onto a shapefile . I would like to know how to do it ? -- You received this message because you are subscribed to the Google

What should be a forms.py and views.py be like for a template that has radio buttons ?

2011-06-13 Thread Satyajit Sarangi
My template has radio buttons . I would like to know what exactly be there in forms.py to render this template in the views ? This is my tempalte Username: Who can view the data Any registered users Only users that can edit Who can edit the data Any registered user Only the