Hello everyone,
I am trying to use datetime picker from django.contrib.admin
I am succesful, but my picker has no style. I see only numbers, but no
border, background..
html(shortened)
Find parking
{% block stylesheet_extra %}{% endblock %}
{{ form.media }}
{% for f in form %}
{{ f.label }}
{{ f }}
{% if f.errors %}
{{ f.errors }}
{% endif %}
{% endfor %}
Forms.py
class DateForm(forms.Form):
departure_date =
forms.DateTimeField(widget=adminwidgets.AdminSplitDateTime, required =
'True')
Can anyone give me some advice?
Thanks so much.
Alex
--
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.
Hello,
I am totally helpless. I am trying to use JQuery in my django
templates, but I always get in firebug this: $ not defined.
In my template I am linking jquery :
And then
$(document).ready(function() {
alert("Hello from jQuery");
});
But I always get nothing..
using ubuntu 9.10. Thanks for your help in advance.
--
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.
Hello everybody,
I am using Dajaxice to get my data from DB to my template.
function getParking_callBack(data){
if(data!='DAJAXICE_EXCEPTION'){
return data;
}
else{
alert("error") ;
}
}
def getParking(request):
list = []
data = Parking.objects.all()
for d in data:
odpoved = {}
odpoved['name'] = d.name
odpoved['x'] = d.gps.x
odpoved['y'] = d.gps.y
list.append(odpoved)
return simplejson.dumps({'data': list})
This is OK it returns what I want, but here is problem: I have this on
console of firebux: getParking_callBack({"data": [{"y":
49.830522574995236, "x": 18.264255523681641, "name": "ostrava
centrum"}, {"y": 49.830522574995236, "x": 18.264255523681641, "name":
"Ostrava Centrum"}]})
This is nice, but I don't know how to parse object from that variable.
Please help me. Thanks so much for your help.
Alex
--
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.
Hello there,
Is possible to get my data from Django using Dajaxice? I need get
information to create markers on google maps.
Thanks for your advices.
Alex.
--
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.
I am using django-dajaxice-0.1.0
Console is clear.
How can print out logging info?
Where should I put this:
import logging logging.basicConfig(level=logging.DEBUG)
On 3 ún, 20:47, Jorge Bastida <neo2...@gmail.com> wrote:
> What version of dajaxice are you using?
> The server console hasn't got any output?
>
> Try to print out the logging info:
> import logging logging.basicConfig(level=logging.DEBUG)
>
> 2010/2/3 Alexis Selves <petr.pej...@gmail.com>
>
>
>
> > Hello DAJAXICE_DEBUG = True
> > in my settings.py is set already..
>
> > On 3 ún, 20:22, Jorge Bastida <neo2...@gmail.com> wrote:
> > > Hello Alexis,
> > > Dajaxice returns DAJAXICE_EXCEPTION if your ajax function
> > > (maps.ajax.sendRoute) raises any Exception.
> > > Try to set DAJAXICE_DEBUG=True and see the server console or try:except:
> > the
> > > code inside your ajax function to see what Exception was raised
>
> > > Hope it helps you.
>
> > > 2010/2/3 Alexis Selves <petr.pej...@gmail.com>
>
> > > > Hey there,
> > > > I have problem with dajaxice. I am trying to save vertex from google
> > > > route to my db.
> > > > Call of JS function:
> > > > Dajaxice.maps.sendRoute('sendRoute_callBack',{'data':array});
>
> > > > function sendRoute_callBack(data){
> > > > if(data!='DAJAXICE_EXCEPTION'){
> > > > alert(data.message);
> > > > }
> > > > else{
>
> > > > alert('Error');
> > > > }
> > > > }
>
> > > > Problem is that I always get Error.
>
> > > > Admin.py:
> > > > from django.utils import simplejson
> > > > from django.contrib.gis.geos import Point,Multipoint
> > > > from maps.models import Route
>
> > > > def sendRoute(request, data, name):
> > > > mp=MultiPoint()
> > > > counter = 0
> > > > for coord in data:
> > > > if counter == 0:
> > > > lng=coord
> > > > elif counter == 1:
> > > > lat=coord
> > > > p = Point(lng,lat)
> > > > mp.append(p)
> > > > counter=0
> > > > route = Route()
> > > > route.name=name
> > > > route.coordinates=mp;
> > > > route.save()
>
> > > > return simplejson.dumps({'message':'Data stored' })
>
> > > > I don't know what to do.. Can anyone help me...
>
> > > > --
> > > > 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>
> > <django-users%2bunsubscr...@googlegroups.com<django-users%252bunsubscr...@googlegroups.com>
>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/django-users?hl=en.
>
> > > --
> > > Benito Jorge Bastida
> > > jo...@thecodefarm.com
>
> > > thecodefarm SL
> > > Av. Gasteiz 21, 1º Derecha
> > > 01008 Vitoria-Gasteizhttp://thecodefarm.com
> > > Tel: (+34) 945 06 55 09
>
> > --
> > 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.
>
> --
> Benito Jorge Bastida
> jo...@thecodefarm.com
>
> thecodefarm SL
> Av. Gasteiz 21, 1º Derecha
> 01008 Vitoria-Gasteizhttp://thecodefarm.com
> Tel: (+34) 945 06 55 09
--
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.
Hello DAJAXICE_DEBUG = True
in my settings.py is set already..
On 3 ún, 20:22, Jorge Bastida <neo2...@gmail.com> wrote:
> Hello Alexis,
> Dajaxice returns DAJAXICE_EXCEPTION if your ajax function
> (maps.ajax.sendRoute) raises any Exception.
> Try to set DAJAXICE_DEBUG=True and see the server console or try:except: the
> code inside your ajax function to see what Exception was raised
>
> Hope it helps you.
>
> 2010/2/3 Alexis Selves <petr.pej...@gmail.com>
>
>
>
> > Hey there,
> > I have problem with dajaxice. I am trying to save vertex from google
> > route to my db.
> > Call of JS function:
> > Dajaxice.maps.sendRoute('sendRoute_callBack',{'data':array});
>
> > function sendRoute_callBack(data){
> > if(data!='DAJAXICE_EXCEPTION'){
> > alert(data.message);
> > }
> > else{
>
> > alert('Error');
> > }
> > }
>
> > Problem is that I always get Error.
>
> > Admin.py:
> > from django.utils import simplejson
> > from django.contrib.gis.geos import Point,Multipoint
> > from maps.models import Route
>
> > def sendRoute(request, data, name):
> > mp=MultiPoint()
> > counter = 0
> > for coord in data:
> > if counter == 0:
> > lng=coord
> > elif counter == 1:
> > lat=coord
> > p = Point(lng,lat)
> > mp.append(p)
> > counter=0
> > route = Route()
> > route.name=name
> > route.coordinates=mp;
> > route.save()
>
> > return simplejson.dumps({'message':'Data stored' })
>
> > I don't know what to do.. Can anyone help me...
>
> > --
> > 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.
>
> --
> Benito Jorge Bastida
> jo...@thecodefarm.com
>
> thecodefarm SL
> Av. Gasteiz 21, 1º Derecha
> 01008 Vitoria-Gasteizhttp://thecodefarm.com
> Tel: (+34) 945 06 55 09
--
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.
Edit: Ajax.py not Admin.py
On 3 ún, 20:09, Alexis Selves <petr.pej...@gmail.com> wrote:
> Hey there,
> I have problem with dajaxice. I am trying to save vertex from google
> route to my db.
> Call of JS function:
> Dajaxice.maps.sendRoute('sendRoute_callBack',{'data':array});
>
> function sendRoute_callBack(data){
> if(data!='DAJAXICE_EXCEPTION'){
> alert(data.message);
> }
> else{
>
> alert('Error');
> }
> }
>
> Problem is that I always get Error.
>
> Ajax.py:
> from django.utils import simplejson
> from django.contrib.gis.geos import Point,Multipoint
> from maps.models import Route
>
> def sendRoute(request, data, name):
> mp=MultiPoint()
> counter = 0
> for coord in data:
> if counter == 0:
> lng=coord
> elif counter == 1:
> lat=coord
> p = Point(lng,lat)
> mp.append(p)
> counter=0
> route = Route()
> route.name=name
> route.coordinates=mp;
> route.save()
>
> return simplejson.dumps({'message':'Data stored' })
>
> I don't know what to do.. Can anyone help me...
--
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.
Hey there,
I have problem with dajaxice. I am trying to save vertex from google
route to my db.
Call of JS function:
Dajaxice.maps.sendRoute('sendRoute_callBack',{'data':array});
function sendRoute_callBack(data){
if(data!='DAJAXICE_EXCEPTION'){
alert(data.message);
}
else{
alert('Error');
}
}
Problem is that I always get Error.
Admin.py:
from django.utils import simplejson
from django.contrib.gis.geos import Point,Multipoint
from maps.models import Route
def sendRoute(request, data, name):
mp=MultiPoint()
counter = 0
for coord in data:
if counter == 0:
lng=coord
elif counter == 1:
lat=coord
p = Point(lng,lat)
mp.append(p)
counter=0
route = Route()
route.name=name
route.coordinates=mp;
route.save()
return simplejson.dumps({'message':'Data stored' })
I don't know what to do.. Can anyone help me...
--
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.
Hello again,
I have another problem...
When I want to install PostGIS using this
http://geodjango.org/docs/install.html#postgis
I receive this:
make -C liblwgeom
make[1]: Entering directory `/home/petr/Skola/postgis-1.4.0/liblwgeom'
gcc -g -O2 -fno-common -DPIC -Wall -Wmissing-prototypes -c -o
measures.o measures.c
In file included from measures.c:16:
liblwgeom.h:18:31: error: ../postgis_config.h: No such file or
directory
make[1]: *** [measures.o] Error 1
make[1]: Leaving directory `/home/petr/Skola/postgis-1.4.0/liblwgeom'
make: *** [liblwgeom] Error 2
I am hopeless or I don't know.. Everything I do is following the hints
on official pages..
I use ubuntu 9.10.. by the way..
On 26 led, 18:56, Alessandro Pasotti <apaso...@gmail.com> wrote:
> 2010/1/26 Alexis Selves <petr.pej...@gmail.com>
>
>
>
> > Thanks for hints.
>
> > But here is another problem, how can I store my data do geodb with
> > javascript?
> > I was searching several hours, but nothing...
>
> > On 25 led, 15:40, Alessandro Pasotti <apaso...@gmail.com> wrote:
> > > 2010/1/25 Alexis Selves <petr.pej...@gmail.com>
>
> > > > Hi there,
> > > > I am new here by the way.
> > > > I have only simple question, how can I extract route from google map
> > > > and save it into geodb as multipoint or etc..
> > > > Thanks for answers.
>
> > > According to the GMap api docs, you can request driving directions from
> > the
> > > client with or without geometric data for the routing polyline:
>
> > >http://code.google.com/intl/it-IT/apis/maps/documentation/services.ht...
>
> > > Once you have pulled the polyline from Gmap server, you can send them
> > back
> > > to your server and store them in your geodb.
>
> > > You probably will want to decode the polyline from google's encoding
> > format
> > > before storinghttp://
> > facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/
>
> > > Hope this helps
> > > --
> > > Alessandro Pasotti
> > > w3: www.itopen.it
>
> You need some kind of Ajax XHR call from the client and a server-side piece
> of software that gets the data coming from the client and put them into the
> DB.
>
> --
> Alessandro Pasotti
> w3: www.itopen.it
--
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.
Thanks for hints.
But here is another problem, how can I store my data do geodb with
javascript?
I was searching several hours, but nothing...
On 25 led, 15:40, Alessandro Pasotti <apaso...@gmail.com> wrote:
> 2010/1/25 Alexis Selves <petr.pej...@gmail.com>
>
> > Hi there,
> > I am new here by the way.
> > I have only simple question, how can I extract route from google map
> > and save it into geodb as multipoint or etc..
> > Thanks for answers.
>
> According to the GMap api docs, you can request driving directions from the
> client with or without geometric data for the routing polyline:
>
> http://code.google.com/intl/it-IT/apis/maps/documentation/services.ht...
>
> Once you have pulled the polyline from Gmap server, you can send them back
> to your server and store them in your geodb.
>
> You probably will want to decode the polyline from google's encoding format
> before storinghttp://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/
>
> Hope this helps
> --
> Alessandro Pasotti
> w3: www.itopen.it
--
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.
Hi there,
I am new here by the way.
I have only simple question, how can I extract route from google map
and save it into geodb as multipoint or etc..
Thanks for answers.
--
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.
19 matches
Mail list logo
|