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
c
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 requ
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://
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 foll
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 Grou
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
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 fil
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 u
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 subscribed
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 to
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 djan
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
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 Gro
roup, 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
"Django users" group
def map_view(request):
return render_to_response('mapsaved.html',{})
And this my urls.py
url(r'^openmaps/','openmaps.views.map_page',name='maps'),
url(r'^openmaps/','openmaps.views.map_view',name='mapsaved'),
Where have
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 wrote:
> On Wednesday, 15 June 2011 22:25:24 UTC+1, Satyajit Sarangi wrote:
>>
>> his is my models.py
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 Goog
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 th
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.
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 wrote:
> > Lets say I work on a class in one temp
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
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 wrote:
> On 06/21/11 14:15, Satyajit Sarangi wrote:
>
>> https://bitbucket.org/**ubernostrum/django-**registration<https:
de('userprofile.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/
>>
>&
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 django-us
ser.get_profile()'),
But this is giving me an error here .
On Wed, Jun 22, 2011 at 8:48 PM, Piotr Zalewa 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 login
Exception Value: name 'UserProfile' is not defined
On Wed, Jun 22, 2011 at 8:52 PM, Shawn Milochik 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
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 wrote:
> On 06/22/2011 11:25
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
regi
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 = os.path.
{% 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 %}
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 chec
My views.py is this
if k == 3:
perm = PermiLayer()
perm.user = user
perm.permi = k
if int(rad4) == 0:
perm.table =
ContentType.ob
ou are asking.
>
> Cal
>
>
> 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
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 .
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 us
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 = for
# 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 djan
37 matches
Mail list logo