Re: How to fix a column typo in django

2011-04-18 Thread ravi krishna
You can do this by altering the table through SQL console (if your database
is sql). The commands to do the job for you is :

*mysql -u root -p*
*
use database_name*;

//eg:-for adding new column email to table
ALTER TABLE table_name ADD email VARCHAR(200);

//for modifying a column
ALTER TABLE table_name
MODIFY column_name column_type;

Thanks & Regards,

Ravi Krishna
My profiles: [image:
Facebook]<http://www.facebook.com/profile.php?id=578709891> [image:
LinkedIn] <http://www.linkedin.com/profile/edit?id=65129620=hb_pro> [image:
Twitter] <http://twitter.com/ravi_krishna>
<http://www.wisestamp.com/email-install?utm_source=extension_medium=email_campaign=footer>



On Tue, Apr 19, 2011 at 5:10 AM, Kenneth Gonsalves
<law...@thenilgiris.com>wrote:

> On Mon, 2011-04-18 at 16:11 +0200, Kann Vearasilp wrote:
> > That was one of my idea, but what if the table has already been
> > populated
> > and I don't want to lose the data in the table?
> >
> > Can I just change the column name manually using SQL and modify the
> > models.py afterwards?
>
> that is the recommended way. you can also use a migration tool like
> south
> --
> regards
> KG
> http://lawgon.livejournal.com
> Coimbatore LUG rox
> http://ilugcbe.techstud.org/
>
> --
> 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.
>
>

-- 
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.



Could not find the GEOS library

2011-02-28 Thread ravi krishna
Hi,
i am working on a simple employee listing Django application. i wanted to
include filtering in my app, so tried installing django-filter module. i
think django-filter is not installed properly ( i am not going to use it
anyway). But after doing this, when i try to run my application, it gives
this "ViewDoesNotExist at /employeeList/ ;
Could not import task.employeeDetails.views. Error was: Could not find the
GEOS library (tried "geos_c", "GEOS"). Try setting GEOS_LIBRARY_PATH in your
settings " . while i searched for the error,came to know the error is due to
some wrong geoDjango installation. But i dont need geoDjango and i am
wondering how its throwing this error. Before doing this, my app was working
fine. Somebody please help me to solve this problem.

Thanks & Regards,

Ravi Krishna
My profiles: [image:
Facebook]<http://www.facebook.com/profile.php?id=578709891> [image:
LinkedIn] <http://www.linkedin.com/profile/edit?id=65129620=hb_pro> [image:
Twitter] <http://twitter.com/ravi_krishna>
<http://www.wisestamp.com/email-install?utm_source=extension_medium=email_campaign=footer>

-- 
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: ViewDoesNotExist Error

2011-02-22 Thread ravi krishna
Hi all,

I got it solved.

def employeeProfile(request): *emp_profile* = EmployeeDetails.objects.all()
return
render_to_response('employeeProfile.html',{'emp_profile':emp_profile})



Thanks & Regards,

Ravi Krishna
My profiles: [image:
Facebook]<http://www.facebook.com/profile.php?id=578709891> [image:
LinkedIn] <http://www.linkedin.com/profile/edit?id=65129620=hb_pro> [image:
Twitter] <http://twitter.com/ravi_krishna>
<http://www.wisestamp.com/email-install?utm_source=extension_medium=email_campaign=footer>



On Wed, Feb 23, 2011 at 10:29 AM, Mike Ramirez <gufym...@gmail.com> wrote:

>  On Tuesday, February 22, 2011 08:24:43 pm ravi krishna wrote:
>
> > from task.employeeDetails import emp_profile
>
> I did see* not where emp_profile comes from.
>
>  Mike
>
> (sorry).
>
> --
>
> We are sorry. We cannot complete your call as dialed. Please check
>
> the number and dial again or ask your operator for assistance.
>
> This is a recording.
>
>  --
> 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.
>

-- 
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.



ViewDoesNotExist Error

2011-02-22 Thread ravi krishna
Hi,
 i am trying to do a simple Django application where employee list is read
from database and displayed. for that i defined the models and entered the
values to database through Django admin. But while trying to display data
from database i am stuck with an error, "ViewDoesNotExist at
/employeeProfile/ : Could not import task.employeeDetails.views. Error was:
cannot import name emp_profile ".I am relatively new to django,so please
help me to solve this. This is the code

*VIEWS.PY *
from django.shortcuts import render_to_response
 from django.contrib.auth.models import*
from task.employeeDetails.models import *
 from django.conf import settings
from django.http import HttpResponse
from task.employeeDetails import emp_profile

def employeeList(request): tableList = EmployeeDetails.objects.all() return
render_to_response('employeeList.html', {'emp_list': tableList})

def employeeProfile(request): profile = EmployeeDetails.objects.all() return
render_to_response('employeeProfile.html',{'emp_profile':emp_profile})

*URLS.PY*

(r'^employeeProfile/$','task.employeeDetails.views.employeeProfile'),

*TEMPLATE *

{%for emp in emp_profile%} {{ emp.userName }} {{ emp.designation }} {{
emp.employeeID }} {%endfor%}

*MODELS.PY*

from django.db import models
class EmployeeDetails(models.Model):
userName = models.CharField(max_length=200)
designation = models.CharField(max_length=200)
employeeID = models.IntegerField()
contactNumber = models.IntegerField()
project = models.CharField(max_length=200)
dateOfJoin=models.DateField()


Thanks & Regards,

Ravi Krishna
My profiles: [image:
Facebook]<http://www.facebook.com/profile.php?id=578709891> [image:
LinkedIn] <http://www.linkedin.com/profile/edit?id=65129620=hb_pro> [image:
Twitter] <http://twitter.com/ravi_krishna>
<http://www.wisestamp.com/email-install?utm_source=extension_medium=email_campaign=footer>

-- 
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.



Integrating Django with Amazon's Database

2011-02-20 Thread ravi krishna
Hi,

Can somebody help me to integrate Django with Amazon's Database (SimpleDB).
Can we use SimpleDB like sqlite or mysql with Django? What are the process
involved in doing it ? It would be great help if someone could explain me or
send me some tutorial for doing it.

Thanks & Regards,

Ravi Krishna
My profiles: [image:
Facebook]<http://www.facebook.com/profile.php?id=578709891> [image:
LinkedIn] <http://www.linkedin.com/profile/edit?id=65129620=hb_pro> [image:
Twitter] <http://twitter.com/ravi_krishna>
<http://www.wisestamp.com/email-install?utm_source=extension_medium=email_campaign=footer>

-- 
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: import Error

2010-09-13 Thread ravi krishna
Hi Nick,
I checked dojango in the python path and its importing it without any
errors. And when i run python manage,py runserver it giving  'ImportError:
No module named Chat'. Can u please help by telling how to add the app in
the python path.
Rav!

On Fri, Sep 10, 2010 at 11:32 PM, nick.l...@gmail.com
<nick.l...@gmail.com>wrote:

> Rav,
>
> There's an environmental variable called PYTHONPATH that often tripped me
> up when I was learning python and django. You need to make sure that the
> django-chat module is on your PYTHONPATH.
>
> To check that you've properly added the app to your PYTHONPATH start up
> python then type `import dojango`
>
> n
>
> On Thu, Sep 9, 2010 at 9:37 PM, ravi krishna <ravi.9...@gmail.com> wrote:
>
>> Hi,
>> For installing i followed their instructions
>> SetupĀ¶ <http://code.google.com/p/django-chat/#Setup>
>>
>>- unzip django-chat archive or checkout it
>>- install dojango (
>>http://dojango.googlecode.com/files/dojango-0.3.tar.gz) in the python
>>path
>>- create database (python manage.py syncdb --noinput), the superuser
>>is "admin" password "chat"
>>- python manage.py runserver
>>   - url of the test page: http://localhost:8000/chat
>>
>> After doing the syncdb i am getting this import error. Can u please tell
>> me how to install it via set.py
>>
>> Thanks & Regards,
>> Rav!
>>
>>
>> On Thu, Sep 9, 2010 at 1:12 PM, Jitesh <eximius...@gmail.com> wrote:
>>
>>> Have you installed the django-chat-0.2 using setup.py, (make sure it
>>> is there in python site-packages and also check its application name
>>> there)
>>> and have you specified python's bin path in enviornment variables?
>>>
>>> On Sep 8, 11:21 am, ravi krishna <ravi.9...@gmail.com> wrote:
>>> > Hi,
>>> > I am newbie with python and django. I am trying out various examples in
>>> > order to learn it. I wanted to try using django- chat application.
>>> > downloaded the code from site and installed dojango as instructed. But
>>> when
>>> > i start the server it gives me an error "ImportError: No module named
>>> > django-chat-0.2", where django-chat-0.2 is the apllication name.
>>> Somebody
>>> > please give a solution.
>>> >
>>> > --
>>> > Regards,
>>> > Rav!
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>>
>>
>>
>> --
>> Regards,
>> Rav!
>>
>> --
>> 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...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> --
> Guadajuko! Vamos a correr!
>  -"Cool! we are going to run!"
>
> --
> 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...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Regards,
Rav!

-- 
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...@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.



Any Django/Python Chat application ??

2010-09-10 Thread ravi krishna
Hi,

Can somebody tell me some django Chat application which can be used to embed
inside a Django web application. Both private and group chat should be
possible. Can u suggest some ??

-- 
Regards,
Rav!

-- 
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...@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: import Error

2010-09-09 Thread ravi krishna
Hi,
For installing i followed their instructions
SetupĀ¶ <http://code.google.com/p/django-chat/#Setup>

   - unzip django-chat archive or checkout it
   - install dojango (http://dojango.googlecode.com/files/dojango-0.3.tar.gz)
   in the python path
   - create database (python manage.py syncdb --noinput), the superuser is
   "admin" password "chat"
   - python manage.py runserver
  - url of the test page: http://localhost:8000/chat

After doing the syncdb i am getting this import error. Can u please tell me
how to install it via set.py

Thanks & Regards,
Rav!

On Thu, Sep 9, 2010 at 1:12 PM, Jitesh <eximius...@gmail.com> wrote:

> Have you installed the django-chat-0.2 using setup.py, (make sure it
> is there in python site-packages and also check its application name
> there)
> and have you specified python's bin path in enviornment variables?
>
> On Sep 8, 11:21 am, ravi krishna <ravi.9...@gmail.com> wrote:
> > Hi,
> > I am newbie with python and django. I am trying out various examples in
> > order to learn it. I wanted to try using django- chat application.
> > downloaded the code from site and installed dojango as instructed. But
> when
> > i start the server it gives me an error "ImportError: No module named
> > django-chat-0.2", where django-chat-0.2 is the apllication name. Somebody
> > please give a solution.
> >
> > --
> > Regards,
> > Rav!
>
> --
> 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...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Regards,
Rav!

-- 
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...@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.



import Error

2010-09-08 Thread ravi krishna
Hi,
I am newbie with python and django. I am trying out various examples in
order to learn it. I wanted to try using django- chat application.
downloaded the code from site and installed dojango as instructed. But when
i start the server it gives me an error "ImportError: No module named
django-chat-0.2", where django-chat-0.2 is the apllication name. Somebody
please give a solution.

-- 
Regards,
Rav!

-- 
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...@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.



how to call an external Javascript using static serve() in Django?

2010-06-08 Thread ravi krishna
Hi,
How can i call an external javascript file in Django. I got a value printed
in my html file from View using templates. Now I want to try out printing a
data in View in html using Javascript ( eg: using onload() ). But the path i
i gave in html file is not passing the values to the js file.
*
MY JAVASCRIPT FILE* ( jsvalu.js )
function test(a)
{
alert("Hello");
document.write("The Value is " + a);
}

*MY HTML FILE* ( the statements regarding the JS file )




The error i get from firebug is test() not defined.
Can somebody give me a solution.

-- 
Regards,
Rav!

-- 
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...@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.



Passing JSON data

2010-06-02 Thread ravi krishna
Hi,
I am a newbie with Python n Django programming. Can somebody tell me some
easy methods for passing the Json data to the html page as arguments. I have
the Json converted data stored in a variable. Now need to print those data
in html.  while searching found some methods like using eval() in Ajax. But
i cudnt work it out. Can somebody tel me some other methods with some
examples.

-- 
Regards,
Rav!

-- 
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...@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: Beginner's doubt

2010-05-24 Thread ravi krishna
This is the error i get now

InvalidURL at /index

nonnumeric port:



On Mon, May 24, 2010 at 10:51 AM, ravi krishna <ravi.9...@gmail.com> wrote:

> sorry the VIEW.py is:
>
>
>
> conn=httplib.HTTPConnection("www.python.org")
> conn.request("GET", "/index.html")
>
> r1 = conn.getresponse()
> print r1.status, r1.reason
> data1 = r1.read()
> conn.close()
>
>
> On Mon, May 24, 2010 at 10:30 AM, ravi krishna <ravi.9...@gmail.com>wrote:
>
>> Hi,
>> I want to retrieve data from wikimapia api. For this i am using httplib
>> function of python.
>> this is my VIEW.py file( just the httplic() )
>>
>> conn=httplib.HTTPConnection("www.python.org")
>> r1 = conn.getresponse()
>> print r1.status, r1.reason
>> data1 = r1.read()
>> conn.close()
>>
>> Initially i gave the wikimapia API instead of www.python.org, then it
>> gave invalid URL error; but the url was working.
>> Then i gave www.python.org instead of wikimapia API just lyk given in the
>> example of python documentation ; now its showing Response Not Ready error
>> at /index.
>> Somebody please help me to solve this solution.
>>  --
>> Regards,
>> Rav!
>>
>
>
>
> --
> Regards,
> Rav!
>



-- 
Regards,
Rav!

-- 
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...@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: Beginner's doubt

2010-05-23 Thread ravi krishna
sorry the VIEW.py is:


conn=httplib.HTTPConnection("www.python.org")
conn.request("GET", "/index.html")
r1 = conn.getresponse()
print r1.status, r1.reason
data1 = r1.read()
conn.close()


On Mon, May 24, 2010 at 10:30 AM, ravi krishna <ravi.9...@gmail.com> wrote:

> Hi,
> I want to retrieve data from wikimapia api. For this i am using httplib
> function of python.
> this is my VIEW.py file( just the httplic() )
>
> conn=httplib.HTTPConnection("www.python.org")
> r1 = conn.getresponse()
> print r1.status, r1.reason
> data1 = r1.read()
> conn.close()
>
> Initially i gave the wikimapia API instead of www.python.org, then it gave
> invalid URL error; but the url was working.
> Then i gave www.python.org instead of wikimapia API just lyk given in the
> example of python documentation ; now its showing Response Not Ready error
> at /index.
> Somebody please help me to solve this solution.
> --
> Regards,
> Rav!
>



-- 
Regards,
Rav!

-- 
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...@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.



Beginner's doubt

2010-05-23 Thread ravi krishna
Hi,
I want to retrieve data from wikimapia api. For this i am using httplib
function of python.
this is my VIEW.py file( just the httplic() )

conn=httplib.HTTPConnection("www.python.org")
r1 = conn.getresponse()
print r1.status, r1.reason
data1 = r1.read()
conn.close()

Initially i gave the wikimapia API instead of www.python.org, then it gave
invalid URL error; but the url was working.
Then i gave www.python.org instead of wikimapia API just lyk given in the
example of python documentation ; now its showing Response Not Ready error
at /index.
Somebody please help me to solve this solution.
-- 
Regards,
Rav!

-- 
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...@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: How to pass the data submitted in 1 page to the next page?

2010-05-21 Thread ravi krishna
Thanks for ur reply Ankit. But its not working. Can u please tell me the
steps in details
On Fri, May 21, 2010 at 3:08 PM, ankit rai <ankit9...@gmail.com> wrote:

>
>
> On Fri, May 21, 2010 at 3:06 PM, ankit rai <ankit9...@gmail.com> wrote:
>
>> Make two separate views for handling the page.Enter the data in page one
>> and pass it as a query param or post method. In your  *url.py* mapped the
>> second page and pass the param in post or get method
>>
>>
>> # url.py
>>
>> (r'^admin/xyz/(.*)$','xyz.views.myView'),
>>
>>
>> view.py
>> def myView(request,path):
>>
>p=request.POST.get("yourfield")
>
>>
>>
>>
>>
>>
>> On Fri, May 21, 2010 at 2:59 PM, ravi krishna <ravi.9...@gmail.com>wrote:
>>
>>> Hi,
>>> I have 2 pages. My first page has a form( simple html form) with 3
>>> fields.I want to display the data entered in first page ,to second page. I
>>> am a beginner with Django framework, Somebody please help me to solve this.
>>> I will post my 'VIEW' n 'html file for the first page ' here.
>>>
>>> VIEW:
>>> def index(request):
>>> return render_to_response("page1.html")
>>> def result(request):
>>> return render_to_response("page2.html")
>>>
>>> HTML code for form:
>>> 
>>> Petrol Bunk:
>>> Lattitude : 
>>> Longitude: 
>>> 
>>> 
>>>
>>> Somebody please give me a reply.
>>>
>>> --
>>> Regards,
>>> Rav!
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>
>  --
> 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...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Regards,
Rav!

-- 
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...@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.



How to pass the data submitted in 1 page to the next page?

2010-05-21 Thread ravi krishna
Hi,
I have 2 pages. My first page has a form( simple html form) with 3 fields.I
want to display the data entered in first page ,to second page. I am a
beginner with Django framework, Somebody please help me to solve this. I
will post my 'VIEW' n 'html file for the first page ' here.

VIEW:
def index(request):
return render_to_response("page1.html")
def result(request):
return render_to_response("page2.html")

HTML code for form:

Petrol Bunk:
Lattitude : 
Longitude: 



Somebody please give me a reply.

-- 
Regards,
Rav!

-- 
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...@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: How to insert a search form inside Django?

2010-05-19 Thread ravi krishna
Thanks really..that was helpful :)

On Wed, May 19, 2010 at 6:43 PM, bx2 <burc...@gmail.com> wrote:

> I'm suggesting to use one of signal-based approches as explained at
> DjangoCon presentation by co-author of Satchmo.
> Here is the link with examples of source code:
> http://www.slideshare.net/ecomsmith/custom-signals-for-uncoupled-design.
>
> Furthermore you can look at DjangoBook here:
> http://www.djangobook.com/en/2.0/chapter07/
>
> Have fun!
> bx2
>
>
> On 19 Maj, 08:47, ravi krishna <ravi.9...@gmail.com> wrote:
> > Hi,
> > I want to include a search button inside my Django, which retrieves data
> > from some google API or Wikimapia API, But i am stuck with adding a
> search
> > option inside Django. i am a beginner with Django and Python programming.
> > Can somebody please help me with this.
> >
> > --
> > Regards,
> > Rav!
> >
> > --
> > 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...@googlegroups.com.
> > To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> > For more options, visit this group athttp://
> groups.google.com/group/django-users?hl=en.
>
> --
> 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...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Regards,
Rav!

-- 
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...@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.



How to insert a search form inside Django?

2010-05-19 Thread ravi krishna
Hi,
I want to include a search button inside my Django, which retrieves data
from some google API or Wikimapia API, But i am stuck with adding a search
option inside Django. i am a beginner with Django and Python programming.
Can somebody please help me with this.

-- 
Regards,
Rav!

-- 
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...@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.



How to retrieve data from Wikimapia using its API?

2010-05-18 Thread ravi krishna
Hi,

I am a beginner with Django. Can someone tell me how to access the database
of Wikimapia using its API through Django.

-- 
Regards,
Rav!

-- 
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...@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: Shows indendation error

2010-05-13 Thread ravi krishna
thank a lot everyoneit was really helpful...:)

On Thu, May 13, 2010 at 7:33 PM, Karen Tracey <kmtra...@gmail.com> wrote:

> On Thu, May 13, 2010 at 2:53 AM, ravi krishna <ravi.9...@gmail.com> wrote:
>
>> Hi,,This is my url.py file, when i run this it shows indendation error at
>> line 25. But i dont see an indendation error. Can somebody help me. I am
>> just a  beginner with Django.
>>
>>
> It would help people help you if you were specific about the error. There
> is more than one "indentation error" that Python might report, and the
> specifics of the one you hit might be significant, especially since somehow
> in posting the urls.py content it appears that all indentation has been
> lost. However I think the problem is not actually due to indentation but
> rather an incorrect close paren (see below).
>
>
>>
>> from django.conf.urls.defaults import *
>> from django.conf import settings
>>
>> # Uncomment the next two lines to enable the admin:
>> from django.contrib import admin
>> admin.autodiscover()
>>
>> urlpatterns = patterns('',
>> #if settings.DEBUG:
>> # urlpatterns += patterns('django.views.static',
>> # (r'^static_media/(?P.*)$',
>> # 'serve', {
>> # 'document_root': '/path/to/static_media',
>> # 'show_indexes': True }),)
>>
>> )
>>
>
> Note this close paren is terminating the patterns() call. Python won't be
> expecting any code following this to be indented.
>
>
>>  # Example:
>> # (r'^mysite/', include('mysite.foo.urls')),
>>
>> # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
>> # to INSTALLED_APPS to enable admin documentation:
>> # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
>>
>> # Uncomment the next line to enable the admin:
>> (r'^admin/',include('admin.site.urls')),
>>
>
> I'm guessing this line is actually indented. Since the patterns calls has
> been terminated, if this (the first non-commented line after the patterns
> call termination) line is indented it will cause an unexpected indent error
> in Python. Fix is to remove the close paren up above -- there is already a
> close paren for the end of the patterns() call further down. If you want to
> comment out the remaining lines in patterns it would be better to put a # in
> the first column rather than insert an early close paren.
>
>
>
>> (r'^$','mysite.polls.views.index'),
>> (r'^index','mysite.polls.views.index'),
>> (r'^detail/(?P\d+)','mysite.polls.views.detail'),
>> (r'^results/(?P\d+)','mysite.polls.views.results'),
>> (r'^vote/(?P\d+)','mysite.polls.views.vote'),
>> (r'^latest','mysite.polls.views.latest'),
>> (r'^page1', 'polls.views.page1'),
>> (r'^page2','polls.views.page2'),
>> (r'^page3','polls.views.page3'),
>> #(r'^site_media/(?P.*))
>> #django.views.static.serve', {'document_root': '/path/to/media'})
>> (r'^site_media/(?P.*), 'django.views.static.serve',
>> {'document_root': '/root/Desktop/mysite/temp1/images'})
>> )
>>
>
> With the close paren up above, this last close paren does not match
> anything, so it too will generate a syntax error if Python ever gets far
> enough to see it.
>
> Karen
> --
> http://tracey.org/kmt/
>
>
>  --
> 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...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Regards,
Rav!

-- 
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...@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: Shows indendation error

2010-05-13 Thread ravi krishna
On Thu, May 13, 2010 at 12:23 PM, ravi krishna <ravi.9...@gmail.com> wrote:

> Hi,,This is my url.py file, when i run this it shows indendation error at
> line 25. But i dont see an indendation error. Can somebody help me. I am
> just a  beginner with Django.
>
>
> from django.conf.urls.defaults import *
> from django.conf import settings
>
> # Uncomment the next two lines to enable the admin:
> from django.contrib import admin
> admin.autodiscover()
>
> urlpatterns = patterns('',
> #if settings.DEBUG:
> # urlpatterns += patterns('django.views.static',
> # (r'^static_media/(?P.*)$',
> # 'serve', {
> # 'document_root': '/path/to/static_media',
> # 'show_indexes': True }),)
>
> )
> # Example:
> # (r'^mysite/', include('mysite.foo.urls')),
>
> # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
> # to INSTALLED_APPS to enable admin documentation:
> # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
>
> # Uncomment the next line to enable the admin:
> (r'^admin/',include('admin.site.urls')),
> (r'^$','mysite.polls.views.index'),
> (r'^index','mysite.polls.views.index'),
> (r'^detail/(?P\d+)','mysite.polls.views.detail'),
> (r'^results/(?P\d+)','mysite.polls.views.results'),
> (r'^vote/(?P\d+)','mysite.polls.views.vote'),
> (r'^latest','mysite.polls.views.latest'),
> (r'^page1', 'polls.views.page1'),
> (r'^page2','polls.views.page2'),
> (r'^page3','polls.views.page3'),
> #(r'^site_media/(?P.*)$')
> #django.views.static.serve', {'document_root': '/path/to/media'})
> (r'^site_media/(?P.*)$', 'django.views.static.serve',
> {'document_root': '/root/Desktop/mysite/temp1/images'})
> )
>
>
> --
> Regards,
> Rav!
>



-- 
Regards,
Rav!

-- 
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...@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.

from django.conf.urls.defaults import *
from django.conf import settings

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
#if settings.DEBUG:
 #   urlpatterns += patterns('django.views.static',
  #  (r'^static_media/(?P.*)$', 
   # 'serve', {
#'document_root': '/path/to/static_media',
 #   'show_indexes': True }),)

)
# Example:
# (r'^mysite/', include('mysite.foo.urls')),

# Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
# to INSTALLED_APPS to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
(r'^admin/',include('admin.mysite.urls')),
	(r'^$','mysite.polls.views.index'),
	(r'^index','mysite.polls.views.index'),
	(r'^detail/(?P\d+)','mysite.polls.views.detail'),
	(r'^results/(?P\d+)','mysite.polls.views.results'),
	(r'^vote/(?P\d+)','mysite.polls.views.vote'),
	(r'^latest','mysite.polls.views.latest'),
	(r'^page1', 'polls.views.page1'),
	(r'^page2','polls.views.page2'),
	(r'^page3','polls.views.page3'),
	#(r'^site_media/(?P.*)$') 
	#django.views.static.serve', {'document_root': '/path/to/media'})
	(r'^site_media/(?P.*)$', 'django.views.static.serve',
{'document_root': '/root/Desktop/mysite/temp1/images'})
)



Shows indendation error

2010-05-13 Thread ravi krishna
Hi,,This is my url.py file, when i run this it shows indendation error at
line 25. But i dont see an indendation error. Can somebody help me. I am
just a  beginner with Django.


from django.conf.urls.defaults import *
from django.conf import settings

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
#if settings.DEBUG:
# urlpatterns += patterns('django.views.static',
# (r'^static_media/(?P.*)$',
# 'serve', {
# 'document_root': '/path/to/static_media',
# 'show_indexes': True }),)

)
# Example:
# (r'^mysite/', include('mysite.foo.urls')),

# Uncomment the admin/doc line below and add 'django.contrib.admindocs'
# to INSTALLED_APPS to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
(r'^admin/',include('admin.site.urls')),
(r'^$','mysite.polls.views.index'),
(r'^index','mysite.polls.views.index'),
(r'^detail/(?P\d+)','mysite.polls.views.detail'),
(r'^results/(?P\d+)','mysite.polls.views.results'),
(r'^vote/(?P\d+)','mysite.polls.views.vote'),
(r'^latest','mysite.polls.views.latest'),
(r'^page1', 'polls.views.page1'),
(r'^page2','polls.views.page2'),
(r'^page3','polls.views.page3'),
#(r'^site_media/(?P.*)$')
#django.views.static.serve', {'document_root': '/path/to/media'})
(r'^site_media/(?P.*)$', 'django.views.static.serve',
{'document_root': '/root/Desktop/mysite/temp1/images'})
)


-- 
Regards,
Rav!

-- 
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...@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: how to display an image inside Django

2010-05-11 Thread ravi krishna
Hi,
Thanks for ur reply. I was asking about the ImageField. tried out the
tutorials, but its not working out. Where
all(views,models,urls.py,settings.py) should we make editings inorder to
work. Please help me

On Tue, May 11, 2010 at 6:49 PM, Jason Leveille <m...@jasonleveille.com>wrote:

> On May 11, 7:10 am, ravi krishna <ravi.9...@gmail.com> wrote:
> > Hi,
> > I am a beginner in Django .
> > Can somebody tel me how to display an image in django...
> > if anyone has the right tutorial for beginners, please share with me..
> > --
> > Regards,
> > Rav!
> >
> > --
> > 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...@googlegroups.com.
> > To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> > For more options, visit this group athttp://
> groups.google.com/group/django-users?hl=en.
>
> Are you uploading the image with ImageField?  If so, the ImageField
> attribute in your model will have image related data that you will be
> able to access in a template:
> http://docs.djangoproject.com/en/dev/topics/files/#topics-files.
>
> Also, you can always just insert an image directly in your template.
> Something like: 
>
> If you are really green and just need a place to get started, I would
> recommend the intro tutorial:
> http://docs.djangoproject.com/en/1.1/intro/tutorial01/#intro-tutorial01
>
> --
> 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...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Regards,
Rav!

-- 
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...@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.



how to display an image inside Django

2010-05-11 Thread ravi krishna
Hi,
I am a beginner in Django .
Can somebody tel me how to display an image in django...
if anyone has the right tutorial for beginners, please share with me..
-- 
Regards,
Rav!

-- 
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...@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.