Thursday, January 31, 2013

Re: Special SELECT and UPDATE for a field

In the end,
what i did is, i added a conversion type to MySQLDB for my Corrdinates object to convert it to a non literal string.
and for the selecting part, i had to copy and alter db/sql/compiler's get_columns and get_default_columns to wrap my field selection with the AsText function. a very bad solution. but it worked.
this was really difficult to do, there is no reason for django not to let me tell django to put in NOW() or AsText or any non literal string.

On Wednesday, January 30, 2013 10:14:57 PM UTC+2, Yarden Sachs wrote:
Hello,
i want to create a field class for geometry (not using geodjango).
here's the field code: http://pastebin.com/yADpZykJ

i want 2 things i can't seem to do:
1. I want the select to wrap the column with MySql AsText() Function
e.x. SELECT AsText(location) FROM addresses

2. I want to be able to save the value wrapped with a function e.x. GeomFromText('POINT(0.0 0.0)')
but is seems that django will wrap that function with quotes, and so mysql thinks its a string.

I found that in order to fix these, i will have to write an SQLCompiler, Query, QuerySet, QuerySetManager. (or modify the get_columns and get_default_columns methods of the SQLCompiler)
I am sure there is a simpler way.

What can I do?

Thanks!

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: F function?

Pro tip:  if you find yourself in a similar situation again, try searching Django code for "def F(" and "class F(" - that should narrow your search a bit :)

  Cheers

    Jirka


On Fri, Feb 1, 2013 at 6:14 AM, Chad Vernon <chadvernon@gmail.com> wrote:
Nevermind, found it!  Was having a hard time searching for "F" :)

https://docs.djangoproject.com/en/1.4/topics/db/queries/#query-expressions


On Thursday, January 31, 2013 9:10:39 PM UTC-8, Chad Vernon wrote:
I was looking at this snippet:

http://djangosnippets.org/snippets/1560/#comments

And on this line:
ReportField.objects.filter(order__range=range).update(order=F('order')+shift)

What is the F in F('order')?

Thanks!
Chad

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

RE: newbie confused about urls

You need to change the view argument you supplied - 'order_details' either to a string with the full path to the 'order_details' function like:

(r'^order_details/(?P<order_id>[-\w]+)/$', 'path.to.my.view.order_details',
     {'template_name': 'registration/order_details.html'}, 'order_details'),

or import 'order_details' into your namespace then remove the quote marks from the view argument so that you will be passing the actual order_detail object like:

from path.to.my.view import order_details
(r'^order_details/(?P<order_id>[-\w]+)/$', order_details,
     {'template_name': 'registration/order_details.html'}, 'order_details'),

Sent from my Windows Phone

From: frocco
Sent: 2/1/2013 1:55 AM
To: django-users@googlegroups.com
Subject: Re: newbie confused about urls

Re: initial argument in forms not working for me

Weird HTML formatting in your message. Plain text fixes things.

The issue is the capital P in initial='Public'. The choices list looks like (value stored in the database, value displayed to the user). The choices that the RadioSelect looks for from the datase are 'public' and 'private'. 'Public' doesn't match either of them.

On Jan 27, 2013, at 10:44 PM, Nikhil Verma wrote:

> Sorry I made a typo in last email .
>
> Can anybody explain what mistake i am doing ?
>
> Hi
>
> I am using django 1.4.3 and have a field in form
>
>
> PROFILE_TYPE = (
> ('public', 'Public'),
> ('private', 'Private'),
> )
> profile_type = forms.CharField(max_length=10,
> widget=RadioSelect(choices=PROFILE_TYPE),
> initial='Public',
> required=False
> )
>
> Thanks
>
>
>
> On Mon, Jan 28, 2013 at 11:05 AM, Nikhil Verma <varma.nikhil22@gmail.com> wrote:
> Hi
>
> I am using django 1.4.3 and have a field in form
>
>
> PROFILE_TYPE = (
> ('public', 'Public'),
> ('private', 'Private'),
> )
> profile_type = forms.CharField(max_length=10, widget=RadioSelect
> (choices=PROFILE_TYPE),
> initial='Public',
> required=False
> )
>
> I want that when i open this form the radio button with choice public should be pre selected.
> Can anybody explain what mistake you are doing ?
>
> Thanks
>
>
> --
> Regards
> Nikhil Verma
> +91-958-273-3156
>
>
>
> --
> Regards
> Nikhil Verma
> +91-958-273-3156
>
> --
> 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+unsubscribe@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Peter of the Norse
RahmCoff@Radio1190.org



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Re: Polls tutorial receive object not object representation

On Jan 27, 2013, at 6:53 PM, Sayth Renshaw wrote:

> Hi
>
> Just seeking a little clarification.
>
> In the Polls tutorial we get this section.
>
> >>> p = Poll.objects.get(pk=1)
>
> # Display any choices from the related object set -- none so far.
> >>> p.choice_set.all()
> []
>
> # Create three choices.
> >>> p.choice_set.create(choice_text='Not much', votes=0)
> <Choice: Not much>
> >>> p.choice_set.create(choice_text='The sky', votes=0)
> <Choice: The sky>
> >>> c = p.choice_set.create(choice_text='Just hacking again', votes=0)
>
> # Choice objects have API access to their related Poll objects.
> >>> c.poll
> <Poll: What's up?>
>
> # And vice versa: Poll objects get access to Choice objects.
> >>> p.choice_set.all()
> [<Choice: Not much>, <Choice: The sky>, <Choice: Just hacking again>]

> Now the only thing is that when I call p.choice_set.all() I don't get the representation 'The sky' or 'Just Hacking again' . I receive choice object itself. Is this normal?

> In [14]: c = p.choice_set.create(choice_text='Just Hacking again', votes=0)
>
> In [15]: c.poll
> Out[15]: <Poll: What's up?>
>
> In [16]: p.choice_set.all()
> Out[16]: [<Choice: Choice object>, <Choice: Choice object>, <Choice: Choice object>, <Choice: Choice ob
> ject>]
>
> Thanks
> Sayth

Did you add an __unicode__ method to Choice class? That's how you get the pretty representations of objects. https://docs.djangoproject.com/en/1.4/intro/tutorial01/#playing-with-the-api

Peter of the Norse
RahmCoff@Radio1190.org



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Re: Announcing new django project

Very nice!  I'll probably try it out in my current project.

On Thursday, January 31, 2013 9:25:06 PM UTC-8, h3 wrote:
Hi everybody,

I would like to introduce you my latest project: django-editlive

It can make any database object editable in template with a simple template tag.

More informations, including demos and docs here: http://editlive.motion-m.ca

Feedback would be appreciated.

--

  Maxime Haineault
  Consultant Web / Associé

∞ Motion Média 
   http://motion-m.ca
   m...@motion-m.ca
   (450) 747-0862

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: Announcing new django project

Awesome!

пятница, 1 февраля 2013 г., 9:25:06 UTC+4 пользователь h3 написал:
Hi everybody,

I would like to introduce you my latest project: django-editlive

It can make any database object editable in template with a simple template tag.

More informations, including demos and docs here: http://editlive.motion-m.ca

Feedback would be appreciated.

--

  Maxime Haineault
  Consultant Web / Associé

∞ Motion Média 
   http://motion-m.ca
   m...@motion-m.ca
   (450) 747-0862

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Announcing new django project

Hi everybody,

I would like to introduce you my latest project: django-editlive

It can make any database object editable in template with a simple template tag.

More informations, including demos and docs here: http://editlive.motion-m.ca

Feedback would be appreciated.

--

  Maxime Haineault
  Consultant Web / Associé

∞ Motion Média 
   http://motion-m.ca
   max@motion-m.ca
   (450) 747-0862

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: F function?

Nevermind, found it!  Was having a hard time searching for "F" :)

https://docs.djangoproject.com/en/1.4/topics/db/queries/#query-expressions

On Thursday, January 31, 2013 9:10:39 PM UTC-8, Chad Vernon wrote:
I was looking at this snippet:

http://djangosnippets.org/snippets/1560/#comments

And on this line:
ReportField.objects.filter(order__range=range).update(order=F('order')+shift)

What is the F in F('order')?

Thanks!
Chad

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

F function?

I was looking at this snippet:

http://djangosnippets.org/snippets/1560/#comments

And on this line:
ReportField.objects.filter(order__range=range).update(order=F('order')+shift)

What is the F in F('order')?

Thanks!
Chad

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: newbie confused about urls

Okay, please paste the full error page contents at http://dpaste.org
Also, show us your models.py which contains the Order model


On Fri, Feb 1, 2013 at 6:25 AM, frocco <farocco@gmail.com> wrote:
I am getting this error:

TypeError at /order_details/17/

  'str' object is not callable

urls.py
 (r'^order_details/(?P<order_id>[-\w]+)/$', 'order_details',
     {'template_name': 'registration/order_details.html'}, 'order_details'),
   
template
<a href="{{ order.get_absolute_url }}">Order #{{ order.id }} - {{ order.date|date }}  (view)</a><br />

views.py
def order_details(request, order_id, template_name="registration/order_details.html"):
    """ displays the details of a past customer order; order details can only be loaded by the same 
    user to whom the order instance belongs.
    
    """
    order = get_object_or_404(Order, id=order_id, user=request.user)
    page_title = 'Order Details for Order #' + order_id
    order_items = OrderItem.objects.filter(order=order)
    return render_to_response(template_name, locals(), context_instance=RequestContext(request))


On Thursday, January 31, 2013 2:17:24 PM UTC-5, yati sagade wrote:
Hi
You usually define get_absolute_urls() on a model to let Django know how to derive a URL for that object. The docs for get_absolute_url can be found  here. I advise you to understand how URL routing works in Django thoroughly, especially how not to hardcode stuff into your models. In the linked page, you'll also see how you can use `reverse` to reference formatted URLs from the urlconf in question.

Regards


On Thu, Jan 31, 2013 at 11:26 PM, frocco <far...@gmail.com> wrote:
I am following the "Beginning Django e-commerce" book and he uses the get_absolute_url method in his models.
The book is dated (2009) and being new, I am not sure what applies.
He also creates urls.py in each module directory, but when I run it, it never finds it.
it defaults to the main urls.py that was created when I created the project.


On Thursday, January 31, 2013 11:54:37 AM UTC-5, Mike Doroshenko II wrote:
You mean mappings urls to views(pages?). Because if get_absolue_url is like request.get_full_path() then you would use that in the view itself and use urls.py to map urls to pages/views. And templates are are called from in views.

frocco wrote:
Hi All,

I am trouble understanding how to use urls.
I see tutorials that have get_absolue_url, url  mysite, ect.

I need to do:

1. load a page with no parameters
2. load a page with 1 parameter
3. load a page with more than 1 parameter

What should my templates look like?

Thank you



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
-- Mike Doroshenko, Junior Sys Admin TecKnoQuest Inc.
mi...@tecknoquest.com www.tecknoquest.com

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Yati Sagade

Software Engineer at mquotient

Twitter: @yati_itay | Github: yati-sagade

Organizing member of TEDx EasternMetropolitanBypass
http://www.ted.com/tedx/events/4933
https://www.facebook.com/pages/TEDx-EasternMetropolitanBypass/337763226244869

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Yati Sagade

Software Engineer at mquotient

Twitter: @yati_itay | Github: yati-sagade

Organizing member of TEDx EasternMetropolitanBypass
http://www.ted.com/tedx/events/4933
https://www.facebook.com/pages/TEDx-EasternMetropolitanBypass/337763226244869

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: Special SELECT and UPDATE for a field

On Thu, 31 Jan 2013 23:17:57 +0200, Yarden Sachs <yrdnsa@gmail.com>
declaimed the following in gmane.comp.python.django.user:

> You can see in my paste that i already created a custom field for geometry
> field.
>
<ugh -- top-posted with massive quote... as a result my comments
will be rather unordered>

I believe the implication is that, if you define a custom field, YOU
must define the type translations for storing and retrieving values in
that field definition. You do not hope that some internal DBMS function
can do translations for you.

https://docs.djangoproject.com/en/1.4/howto/custom-model-fields/#converting-database-values-to-python-objects
... and the next two or three subheadings after that

>
> On Thu, Jan 31, 2013 at 7:52 PM, Tom Evans <tevans.uk@googlemail.com> wrote:
>
> > On Wed, Jan 30, 2013 at 8:14 PM, Yarden Sachs <yarden@tapingo.com> wrote:
> > > Hello,
> > > i want to create a field class for geometry (not using geodjango).
> > > here's the field code: http://pastebin.com/yADpZykJ
> > >
> > > i want 2 things i can't seem to do:
> > > 1. I want the select to wrap the column with MySql AsText() Function
> > > e.x. SELECT AsText(location) FROM addresses
> > >
> > > 2. I want to be able to save the value wrapped with a function e.x.
> > > GeomFromText('POINT(0.0 0.0)')
> > > but is seems that django will wrap that function with quotes, and so
> > mysql
> > > thinks its a string.
> > >

Any proper DB-API usage will escape data values explicitly to
prevent them being treated as executable SQL statements -- not just
MySQL.

Furthermore -- EVERYTHING supplied to MySQL comes in as a string
(MySQLdb works with MySQL versions down to 3.x. Prior to MySQL v5.x,
MySQL did not support "prepared" statements -- .executemany() generates
many individual SQL statements with the placeholders replaced by escaped
values.

Using raw DB-API SQL form, you are attempting the equivalent of:

cur.execute("""insert into TABLE (LOCATION, other, stuff)
values (%s, %s, %s)""",
("GeomFromText('POINT(0.0 0.0)')", Other, Stuff) )

but since parameterized values get escaped/safed to prevent SQL
injection attacks, you really need the SQL to look like:

cur.execute("""insert into TABLE (LOCATION, other, stuff)
values (GeomFromText(%s), %s, %s)""",
('POINT(0.0 0.0)', Other, Stuff) )

That is, the GeomFromText() call needs to be /in/ the parameterized SQL
before the parameters go in.

Django, on its own, is not capable of generating this (it is
generating the equivalent of the first example).


<snip>

> > Sounds like you want to define a custom field rather than fiddle with
> > a Model's manager.
> >
> > https://docs.djangoproject.com/en/1.4/howto/custom-model-fields/
> >
> > Cheers
> >
> > Tom
> >

One problem I see is that you are NOT really using a custom type.
Django's "custom types" are a way to convert a non-native Python object
into common Django DBMS types -- which for plain Django do not include
the geometry extensions.

If you are insisting on using DBMS geometry extensions but NOT
geodjango, you will have to implement everything that geodjango does to
handle those extensions. Note this clause from
https://docs.djangoproject.com/en/1.4/ref/contrib/gis/tutorial/#introduction
"""
* Extensions to Django's ORM for the querying and manipulation of
spatial data.
"""
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Re: newbie confused about urls

I am getting this error:

TypeError at /order_details/17/

'str' object is not callable

urls.py
 (r'^order_details/(?P<order_id>[-\w]+)/$', 'order_details',
     {'template_name': 'registration/order_details.html'}, 'order_details'),
   
template
<a href="{{ order.get_absolute_url }}">Order #{{ order.id }} - {{ order.date|date }}  (view)</a><br />

views.py
def order_details(request, order_id, template_name="registration/order_details.html"):
    """ displays the details of a past customer order; order details can only be loaded by the same 
    user to whom the order instance belongs.
    
    """
    order = get_object_or_404(Order, id=order_id, user=request.user)
    page_title = 'Order Details for Order #' + order_id
    order_items = OrderItem.objects.filter(order=order)
    return render_to_response(template_name, locals(), context_instance=RequestContext(request))


On Thursday, January 31, 2013 2:17:24 PM UTC-5, yati sagade wrote:
Hi
You usually define get_absolute_urls() on a model to let Django know how to derive a URL for that object. The docs for get_absolute_url can be found  here. I advise you to understand how URL routing works in Django thoroughly, especially how not to hardcode stuff into your models. In the linked page, you'll also see how you can use `reverse` to reference formatted URLs from the urlconf in question.

Regards


On Thu, Jan 31, 2013 at 11:26 PM, frocco <far...@gmail.com> wrote:
I am following the "Beginning Django e-commerce" book and he uses the get_absolute_url method in his models.
The book is dated (2009) and being new, I am not sure what applies.
He also creates urls.py in each module directory, but when I run it, it never finds it.
it defaults to the main urls.py that was created when I created the project.


On Thursday, January 31, 2013 11:54:37 AM UTC-5, Mike Doroshenko II wrote:
You mean mappings urls to views(pages?). Because if get_absolue_url is like request.get_full_path() then you would use that in the view itself and use urls.py to map urls to pages/views. And templates are are called from in views.

frocco wrote:
Hi All,

I am trouble understanding how to use urls.
I see tutorials that have get_absolue_url, url  mysite, ect.

I need to do:

1. load a page with no parameters
2. load a page with 1 parameter
3. load a page with more than 1 parameter

What should my templates look like?

Thank you



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
-- Mike Doroshenko, Junior Sys Admin TecKnoQuest Inc.
mi...@tecknoquest.com www.tecknoquest.com

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Yati Sagade

Software Engineer at mquotient

Twitter: @yati_itay | Github: yati-sagade

Organizing member of TEDx EasternMetropolitanBypass
http://www.ted.com/tedx/events/4933
https://www.facebook.com/pages/TEDx-EasternMetropolitanBypass/337763226244869

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Greyed out models in Django Admin

Hi,

Using Django 1.4, have registered 3 model classes with admin. When accessing admin page provided by test server can select each class and edit entries. However when accessing production admin the classes are greyed out, only the users, groups and sites are selectable. I thought this might be database access issues however I can run syncdb without any problems. Any ideas?

Many thanks

Huw Jones.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: Special SELECT and UPDATE for a field

You can see in my paste that i already created a custom field for geometry field.


On Thu, Jan 31, 2013 at 7:52 PM, Tom Evans <tevans.uk@googlemail.com> wrote:
On Wed, Jan 30, 2013 at 8:14 PM, Yarden Sachs <yarden@tapingo.com> wrote:
> Hello,
> i want to create a field class for geometry (not using geodjango).
> here's the field code: http://pastebin.com/yADpZykJ
>
> i want 2 things i can't seem to do:
> 1. I want the select to wrap the column with MySql AsText() Function
> e.x. SELECT AsText(location) FROM addresses
>
> 2. I want to be able to save the value wrapped with a function e.x.
> GeomFromText('POINT(0.0 0.0)')
> but is seems that django will wrap that function with quotes, and so mysql
> thinks its a string.
>
> I found that in order to fix these, i will have to write an SQLCompiler,
> Query, QuerySet, QuerySetManager. (or modify the get_columns and
> get_default_columns methods of the SQLCompiler)
> I am sure there is a simpler way.
>
> What can I do?
>
> Thanks!

Sounds like you want to define a custom field rather than fiddle with
a Model's manager.

https://docs.djangoproject.com/en/1.4/howto/custom-model-fields/

Cheers

Tom

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: Kindly help for an interview with Google on python django

thanks for the write-up!!!!

Best Regards,
Srinivas Reddy Thatiparthy
9703888668.

"Anyone who has never made a mistake has never tried anything new !!! "
--Albert Einstein


On Thu, Jan 31, 2013 at 11:53 PM, Larry Martell <larry.martell@gmail.com> wrote:
This is something I found back in 07 when I was offered a chance to
interview there. I searched for it again, and there are links to it,
but they don't appear to work. My situation was the strangely similar
to Peter's - I also got an unsolicited call from someone at google who
said they saw my resume, and "they wanted me." I hadn't applied at
google, I wasn't looking for a new job, AND we were living in Santa Fe
(where we still live). Odd.

My Interview at Google
by Peter Abilla

In September 2005 I got an unsolicited call from someone at google who
said they saw my resume, and "they wanted me." I hadn't applied at
google, in fact I wasn't even looking for a new job, nor were we
looking to move (we were living in Santa Fe at the time). But
nevertheless I was honored and intrigued and after much discussion
with my wife, I decided to follow up.   In October I flew out to
interview with them at their Mountain View headquarters. My interview
was over 2 days, on 10/12/2005 and 10/13/2005. I didn't do much to
prepare for the interview. unlike most companies that fly their
candidates out for an onsite interview, google's policy was for me to
pay for my flight, hotel, and food, but that they would reimburse me
later. i thought that was lame and unprofessional; after all, they are
the ones that contacted me for an interview and i never applied for a
job with them. luckily, i was going to be in that area anyway for
business, so i just scheduled my business trip for that week.

day 1, 4 interviews:

in the lobby reception desk, i typed my name on this little widget and
signed the dotted line. then, this little widget prints a
self-adhesive name tag with my name, google, and my location. i gladly
took that self-adhesive and put in on my shirt breast. then, i met
with the hr people, both of whom were very nice. they were very, very
late, but i had fun hanging out in the lobby of 1625 charleston road,
building #44. in the lobby were 4 refrigerators full of odwalla
drinks; i helped myself to a couple. on the wall was a large flat
monitor that showed, in real time, the current google searches. this
was really amusing. i remember the following searches:

* size d bra
* how to make a bomb
* osama
* italian mob + hbo
* catholic anger

this was really cool. finally, the hr folks were ready and brought me
into a room next to the korean and chinese speaking engineers. my
first interviewer came in late and was really sweaty. he had just
ridden his bike to work. he was sorry he was late. he was super nice
and his questions were easy. the next person was a little tougher; she
had been with sun microsystems for several years and was in charge of
their warehouse and distribution side. she asked some tough questions,
was very open about her frustrations with google, but ended up very
nice to me. the next person came in had a background in library
science and an mba from michigan. he was really nice too and asked
fluffy questions. he wasn't an engineer and i don't think he knew what
to ask me, so he asked me lame conversational-type questions. i don't
think it was a fit interview either; i think he was just clueless. the
next person i interviewed with was sharp; he was a stanford mba and
had been in the print industry for a while. he wasn't quantitative at
all, but was nice. he asked me hypothetical questions about potential
problems that they face in the print group. the problems were very
interesting. there is true innovation going on at google, for sure.

that was it for day 1. there was no lunch, but i was free to raid the
fully-stocked kitchen whenever i wanted to; i helped myself to a
healthy dose of mountain dew and stopped by the cafeteria for a veggie
sandwich. the atmosphere there is very cool and i felt energy and
could visually see the innovation going on. very cool.

that evening, i went to my hotel and did some work for the company i
was with at the time.

day 2, 7 interviews:

i did the whole self-adhesive, name tag thing again. got an odwalla (2
of them), then waited. eventually, the hr people came and got me. this
day was much tougher than day 1. my first interview was with a former
nasa scientist-turned googler. my interview with him was fun and
interesting; he proposed several real case studies and problems that
they face in the print team. my second interview was with another
engineer; he asked me basic questions and one brain teaser. the brain
teaser goes something like this, if i remember it right:

   you are at a party with a friend and 10 people are present
including you and the friend. your friend makes you a wager that for
every person you find that has the same birthday as you, you get $1;
for every person he finds that does not have the same birthday as you,
he gets $2. would you accept the wager?

i had fun trying to solve this one. the answer has to do with the
number of days in the year and the probability the person's birthday
falls on the same day as mine (without replacement). i eventually
solved it, but it took time learning how to apply probability with no
replacement. i tried using 10! (factorial), for some reason, but that
was totally the wrong approach. we ended the interview; i didn't feel
as good about that one, because i struggled a little bit through that
brain teaser.

my next interviewer asked a lot of algorithm questions. he made me
write pseudo-code for a binary search; he had me uml a system; he made
me explain cron, diff, the permission system in unix, and had me write
a bunch sql queries. this guy was a scientist at epson, the printer
company. he was sharp; quantitative but warm. i liked that interview.

my next interview was with a nice lady who had been with google for a
few years. she was cold, but not mean; observant, but not expressive.
i felt that i answered her questions fine and our interview was done.

my next couple of interviews were with people that i had interviewed
with the previous day, in day 1. those went fine and uneventful. but,
by this time of day, i was getting really tired, physically and just
tired of interviewing.

alas, the last interviewer came, the head of global operations for
google. he was very nice, open, and direct. that interview went fine
and he openly shared his strong interest in my background and said
that i'd be a great addition to the team. he also shared how living in
the bay area is so nice and seemed to be trying to sell the location
and the company. i saw this as a good sign. our time ended; i left,
but before i walked out the bulding, i managed to steal a few more of
those odwalla drinks.

i drove to the san jose airport, caught my flight, and went home.

MANY. MANY weeks later. . .

the hr guy called and gave me an offer! but, it wasn't what i was
expecting. i was excited for the google stock units (gsu) and the phat
salary that would barely keep me alive with the bay area cost of
living, but that's not what i got. instead, google offered me a
contract position, with a VERY high hourly rate. of course, because it
was contractual, there would be no benefits or google stock units. on
the phone, on the spot, i declined the job offer. moving to the bay
area wasn't that appealing to me, especially if the job didn't have
google stock units and benefits. the cash was good, but my family
needed more than that.

all in all, the experience was okay. there is certainly more hype
about google than i believe it really merits. true, they hire sharp —
really sharp people; i felt a lot of energy and could see the
innovation happening there. but, the people i interviewed with didn't
seem happy to me. they looked tired and grumpy. i didn't get a feeling
that google treats their people very well. i'm glad for my decision
not to join google. but, i'll always wish i had free reign on those
odwalla drinks :)

On Thu, Jan 31, 2013 at 8:15 AM, laxmikant ratnaparkhi
<laxglx01@gmail.com> wrote:
> Hello Everybody,
>       I have an interview scheduled on monday with google. So can you
> anybody have an related information  or any experience. Please help me what
> would be asked for this interview.
>  I have 2 years of exp in python and django.
>
> Thanks in advance!!!
>
> regards,
>
> Laxmikant
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscribe@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: newbie confused about urls

Hi
You usually define get_absolute_urls() on a model to let Django know how to derive a URL for that object. The docs for get_absolute_url can be found  here. I advise you to understand how URL routing works in Django thoroughly, especially how not to hardcode stuff into your models. In the linked page, you'll also see how you can use `reverse` to reference formatted URLs from the urlconf in question.

Regards


On Thu, Jan 31, 2013 at 11:26 PM, frocco <farocco@gmail.com> wrote:
I am following the "Beginning Django e-commerce" book and he uses the get_absolute_url method in his models.
The book is dated (2009) and being new, I am not sure what applies.
He also creates urls.py in each module directory, but when I run it, it never finds it.
it defaults to the main urls.py that was created when I created the project.


On Thursday, January 31, 2013 11:54:37 AM UTC-5, Mike Doroshenko II wrote:
You mean mappings urls to views(pages?). Because if get_absolue_url is like request.get_full_path() then you would use that in the view itself and use urls.py to map urls to pages/views. And templates are are called from in views.

frocco wrote:
Hi All,

I am trouble understanding how to use urls.
I see tutorials that have get_absolue_url, url  mysite, ect.

I need to do:

1. load a page with no parameters
2. load a page with 1 parameter
3. load a page with more than 1 parameter

What should my templates look like?

Thank you



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
-- Mike Doroshenko, Junior Sys Admin TecKnoQuest Inc.
mi...@tecknoquest.com www.tecknoquest.com

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Yati Sagade

Software Engineer at mquotient

Twitter: @yati_itay | Github: yati-sagade

Organizing member of TEDx EasternMetropolitanBypass
http://www.ted.com/tedx/events/4933
https://www.facebook.com/pages/TEDx-EasternMetropolitanBypass/337763226244869

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Application Developer Position in Sunny San Diego!!!!

Looking for an experience Django/python developer to fill an open development position for Qualcomm.

You can see the details and apply here: https://jobs.qualcomm.com/public/jobDetails.xhtml?requisitionId=1910238&page=jobSearch

Requisition #
N1910238
Job Title
Application Developer



Company - Division
Qualcomm Incorporated - Information Technology
Job Area
Information Technology
Location
California - San Diego
Job Function
Work with Program Management and Development team to develop innovative technical solutions, provide input to project roadmaps, provide estimates for technical components and technical consulting as required.

Provide technical leadership and strategic direction to team for technical strategies/approaches.

Collaborate with users, QA and Management to ensure that enhancements and application defects are managed effectively.

Communicate status of development activities as required.

Demonstrate strong initiative and ability to work with minimal supervision or direction.

Responsibilities
  • Exposure to hardware and software design processes
  • Performance tuning
  • JAVA development skills
  • Understanding of HTTP protocol
  • SSO solutions such as Siteminder
  • Build tools such as Maven/ANT
  • LDAP integration

  • Skills/Experience
  • 5+ years of experience
  • Python
  • Solid understanding of MVC frameworks, including Django
  • Object Oriented Programming
  • SQL queries and scripting
  • Oracle, MySQL database experience
  • Javascript, jQuery, jQuery UI
  • HTML and CSS
  • Unit testing
  • SOAP and REST Web Services
  • Linux
  • Apache web server
  • Solid troubleshooting and debugging skills
  • Good communication skills
  • Continuous Integration
  • SCM experience (i.e. Subversion, Git)

  • Education Requirements
    Bachelor's degree in technical discipline or equivalent experience required. Master's degree preferred.


    --
    You received this message because you are subscribed to the Google Groups "Django users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
    To post to this group, send email to django-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/django-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
     
     

    Re: Kindly help for an interview with Google on python django

    This is something I found back in 07 when I was offered a chance to
    interview there. I searched for it again, and there are links to it,
    but they don't appear to work. My situation was the strangely similar
    to Peter's - I also got an unsolicited call from someone at google who
    said they saw my resume, and "they wanted me." I hadn't applied at
    google, I wasn't looking for a new job, AND we were living in Santa Fe
    (where we still live). Odd.

    My Interview at Google
    by Peter Abilla

    In September 2005 I got an unsolicited call from someone at google who
    said they saw my resume, and "they wanted me." I hadn't applied at
    google, in fact I wasn't even looking for a new job, nor were we
    looking to move (we were living in Santa Fe at the time). But
    nevertheless I was honored and intrigued and after much discussion
    with my wife, I decided to follow up. In October I flew out to
    interview with them at their Mountain View headquarters. My interview
    was over 2 days, on 10/12/2005 and 10/13/2005. I didn't do much to
    prepare for the interview. unlike most companies that fly their
    candidates out for an onsite interview, google's policy was for me to
    pay for my flight, hotel, and food, but that they would reimburse me
    later. i thought that was lame and unprofessional; after all, they are
    the ones that contacted me for an interview and i never applied for a
    job with them. luckily, i was going to be in that area anyway for
    business, so i just scheduled my business trip for that week.

    day 1, 4 interviews:

    in the lobby reception desk, i typed my name on this little widget and
    signed the dotted line. then, this little widget prints a
    self-adhesive name tag with my name, google, and my location. i gladly
    took that self-adhesive and put in on my shirt breast. then, i met
    with the hr people, both of whom were very nice. they were very, very
    late, but i had fun hanging out in the lobby of 1625 charleston road,
    building #44. in the lobby were 4 refrigerators full of odwalla
    drinks; i helped myself to a couple. on the wall was a large flat
    monitor that showed, in real time, the current google searches. this
    was really amusing. i remember the following searches:

    * size d bra
    * how to make a bomb
    * osama
    * italian mob + hbo
    * catholic anger

    this was really cool. finally, the hr folks were ready and brought me
    into a room next to the korean and chinese speaking engineers. my
    first interviewer came in late and was really sweaty. he had just
    ridden his bike to work. he was sorry he was late. he was super nice
    and his questions were easy. the next person was a little tougher; she
    had been with sun microsystems for several years and was in charge of
    their warehouse and distribution side. she asked some tough questions,
    was very open about her frustrations with google, but ended up very
    nice to me. the next person came in had a background in library
    science and an mba from michigan. he was really nice too and asked
    fluffy questions. he wasn't an engineer and i don't think he knew what
    to ask me, so he asked me lame conversational-type questions. i don't
    think it was a fit interview either; i think he was just clueless. the
    next person i interviewed with was sharp; he was a stanford mba and
    had been in the print industry for a while. he wasn't quantitative at
    all, but was nice. he asked me hypothetical questions about potential
    problems that they face in the print group. the problems were very
    interesting. there is true innovation going on at google, for sure.

    that was it for day 1. there was no lunch, but i was free to raid the
    fully-stocked kitchen whenever i wanted to; i helped myself to a
    healthy dose of mountain dew and stopped by the cafeteria for a veggie
    sandwich. the atmosphere there is very cool and i felt energy and
    could visually see the innovation going on. very cool.

    that evening, i went to my hotel and did some work for the company i
    was with at the time.

    day 2, 7 interviews:

    i did the whole self-adhesive, name tag thing again. got an odwalla (2
    of them), then waited. eventually, the hr people came and got me. this
    day was much tougher than day 1. my first interview was with a former
    nasa scientist-turned googler. my interview with him was fun and
    interesting; he proposed several real case studies and problems that
    they face in the print team. my second interview was with another
    engineer; he asked me basic questions and one brain teaser. the brain
    teaser goes something like this, if i remember it right:

    you are at a party with a friend and 10 people are present
    including you and the friend. your friend makes you a wager that for
    every person you find that has the same birthday as you, you get $1;
    for every person he finds that does not have the same birthday as you,
    he gets $2. would you accept the wager?

    i had fun trying to solve this one. the answer has to do with the
    number of days in the year and the probability the person's birthday
    falls on the same day as mine (without replacement). i eventually
    solved it, but it took time learning how to apply probability with no
    replacement. i tried using 10! (factorial), for some reason, but that
    was totally the wrong approach. we ended the interview; i didn't feel
    as good about that one, because i struggled a little bit through that
    brain teaser.

    my next interviewer asked a lot of algorithm questions. he made me
    write pseudo-code for a binary search; he had me uml a system; he made
    me explain cron, diff, the permission system in unix, and had me write
    a bunch sql queries. this guy was a scientist at epson, the printer
    company. he was sharp; quantitative but warm. i liked that interview.

    my next interview was with a nice lady who had been with google for a
    few years. she was cold, but not mean; observant, but not expressive.
    i felt that i answered her questions fine and our interview was done.

    my next couple of interviews were with people that i had interviewed
    with the previous day, in day 1. those went fine and uneventful. but,
    by this time of day, i was getting really tired, physically and just
    tired of interviewing.

    alas, the last interviewer came, the head of global operations for
    google. he was very nice, open, and direct. that interview went fine
    and he openly shared his strong interest in my background and said
    that i'd be a great addition to the team. he also shared how living in
    the bay area is so nice and seemed to be trying to sell the location
    and the company. i saw this as a good sign. our time ended; i left,
    but before i walked out the bulding, i managed to steal a few more of
    those odwalla drinks.

    i drove to the san jose airport, caught my flight, and went home.

    MANY. MANY weeks later. . .

    the hr guy called and gave me an offer! but, it wasn't what i was
    expecting. i was excited for the google stock units (gsu) and the phat
    salary that would barely keep me alive with the bay area cost of
    living, but that's not what i got. instead, google offered me a
    contract position, with a VERY high hourly rate. of course, because it
    was contractual, there would be no benefits or google stock units. on
    the phone, on the spot, i declined the job offer. moving to the bay
    area wasn't that appealing to me, especially if the job didn't have
    google stock units and benefits. the cash was good, but my family
    needed more than that.

    all in all, the experience was okay. there is certainly more hype
    about google than i believe it really merits. true, they hire sharp —
    really sharp people; i felt a lot of energy and could see the
    innovation happening there. but, the people i interviewed with didn't
    seem happy to me. they looked tired and grumpy. i didn't get a feeling
    that google treats their people very well. i'm glad for my decision
    not to join google. but, i'll always wish i had free reign on those
    odwalla drinks :)

    On Thu, Jan 31, 2013 at 8:15 AM, laxmikant ratnaparkhi
    <laxglx01@gmail.com> wrote:
    > Hello Everybody,
    > I have an interview scheduled on monday with google. So can you
    > anybody have an related information or any experience. Please help me what
    > would be asked for this interview.
    > I have 2 years of exp in python and django.
    >
    > Thanks in advance!!!
    >
    > regards,
    >
    > Laxmikant
    >
    > --
    > You received this message because you are subscribed to the Google Groups
    > "Django users" group.
    > To unsubscribe from this group and stop receiving emails from it, send an
    > email to django-users+unsubscribe@googlegroups.com.
    > To post to this group, send email to django-users@googlegroups.com.
    > Visit this group at http://groups.google.com/group/django-users?hl=en.
    > For more options, visit https://groups.google.com/groups/opt_out.
    >
    >

    --
    You received this message because you are subscribed to the Google Groups "Django users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
    To post to this group, send email to django-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/django-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.

    inspectdb option and DJango normal operations

    If I use the inspectdb command to create models.py file from existing database schema would it function the same way as if I had created the tables using the syncdb command.?

    Thanks

    --
    You received this message because you are subscribed to the Google Groups "Django users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
    To post to this group, send email to django-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/django-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
     
     

    Re: Kindly help for an interview with Google on python django

    Google is HEAVY on Python... I have some experience working directly with Google engineers in their offices, and I can tell you the level of knowledge that they all have in their respective areas. It's significant, and they're going to want someone with a deep working knowledge of the technologies with which they are familiar. For Python, this includes things like knowing the interpreter, and how the interpreter handles memory, how different Python objects are handled in the background and their performance (such as iterators and generators... you should know the difference), GIL, etc.

    Here are a few resources that have helped me BIG TIME with not only learning more specific (and often advanced) Python features/methodologies, but also with knocking out difficult Python job interviews.


    Get to know that link well. Read through each one, and make sure you understand them. You may already know most of them, or you may not. Either way, it's likely that one or more of those will appear on someone's Python quiz.


    Understand that. In fact, if you're a Python developer, you should make it a point to understand that. Interview or not.

    What are good Python interview questions? http://www.quora.com/What-are-good-Python-interview-questions

    There are only a couple here, but they definitely make you think about some of the core (and common) Python objects and how they're used, and why they work the way they do.

    Above all else, many places (actually, every place except one) has required that I write code in order to complete the interview. I'm not sure if Google will ask you for this, but I don't see why they wouldn't. Be prepared to write code, and make sure it's readable (they'll likely want you on a team, so your code better be readable and "play well with others").

    And if you do write code in the interview, most importantly... PEP8!! Learn PEP8, and show that you know it in your interview!


    I hope this helps you. Good luck and let us know how it went!

    --
    Joey "JoeLinux" Espinosa



    On Thu, Jan 31, 2013 at 12:48 PM, Tom Evans <tevans.uk@googlemail.com> wrote:
    On Thu, Jan 31, 2013 at 5:25 PM, Larry Martell <larry.martell@gmail.com> wrote:
    > Books have been written about interviewing at google. Google
    > 'interviewing at google' and you'll find a plethora of stories. After
    > reading them you may not want to interview there. I was offered a
    > chance to interview there about 8 years ago, and I after reading what
    > it would be like, I declined. YMMV

    Don't google for 'interviewing at google', or they'll know what you
    are up to! Best to use Bing for that.

    Bad jokes aside, you should have a clear idea why you want to work
    there, what you can bring to them, and why they would want it (this is
    basically true of any interview). Work it out before you go there, so
    you don't stammer around trying to figure it out on the spot!

    Cheers

    Tom

    --
    You received this message because you are subscribed to the Google Groups "Django users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
    To post to this group, send email to django-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/django-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.



    --
    You received this message because you are subscribed to the Google Groups "Django users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
    To post to this group, send email to django-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/django-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
     
     

    Re: newbie confused about urls

    I am following the "Beginning Django e-commerce" book and he uses the get_absolute_url method in his models.
    The book is dated (2009) and being new, I am not sure what applies.
    He also creates urls.py in each module directory, but when I run it, it never finds it.
    it defaults to the main urls.py that was created when I created the project.


    On Thursday, January 31, 2013 11:54:37 AM UTC-5, Mike Doroshenko II wrote:
    You mean mappings urls to views(pages?). Because if get_absolue_url is like request.get_full_path() then you would use that in the view itself and use urls.py to map urls to pages/views. And templates are are called from in views.

    frocco wrote:
    Hi All,

    I am trouble understanding how to use urls.
    I see tutorials that have get_absolue_url, url  mysite, ect.

    I need to do:

    1. load a page with no parameters
    2. load a page with 1 parameter
    3. load a page with more than 1 parameter

    What should my templates look like?

    Thank you



    --
    You received this message because you are subscribed to the Google Groups "Django users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
    To post to this group, send email to django...@googlegroups.com.
    Visit this group at http://groups.google.com/group/django-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
    --  Mike Doroshenko, Junior Sys Admin  TecKnoQuest Inc.  mi...@tecknoquest.com  www.tecknoquest.com

    --
    You received this message because you are subscribed to the Google Groups "Django users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
    To post to this group, send email to django-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/django-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
     
     

    Re: Special SELECT and UPDATE for a field

    On Wed, Jan 30, 2013 at 8:14 PM, Yarden Sachs <yarden@tapingo.com> wrote:
    > Hello,
    > i want to create a field class for geometry (not using geodjango).
    > here's the field code: http://pastebin.com/yADpZykJ
    >
    > i want 2 things i can't seem to do:
    > 1. I want the select to wrap the column with MySql AsText() Function
    > e.x. SELECT AsText(location) FROM addresses
    >
    > 2. I want to be able to save the value wrapped with a function e.x.
    > GeomFromText('POINT(0.0 0.0)')
    > but is seems that django will wrap that function with quotes, and so mysql
    > thinks its a string.
    >
    > I found that in order to fix these, i will have to write an SQLCompiler,
    > Query, QuerySet, QuerySetManager. (or modify the get_columns and
    > get_default_columns methods of the SQLCompiler)
    > I am sure there is a simpler way.
    >
    > What can I do?
    >
    > Thanks!

    Sounds like you want to define a custom field rather than fiddle with
    a Model's manager.

    https://docs.djangoproject.com/en/1.4/howto/custom-model-fields/

    Cheers

    Tom

    --
    You received this message because you are subscribed to the Google Groups "Django users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
    To post to this group, send email to django-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/django-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.

    Re: Kindly help for an interview with Google on python django

    On Thu, Jan 31, 2013 at 10:48 AM, Tom Evans <tevans.uk@googlemail.com> wrote:
    > On Thu, Jan 31, 2013 at 5:25 PM, Larry Martell <larry.martell@gmail.com> wrote:
    >> Books have been written about interviewing at google. Google
    >> 'interviewing at google' and you'll find a plethora of stories. After
    >> reading them you may not want to interview there. I was offered a
    >> chance to interview there about 8 years ago, and I after reading what
    >> it would be like, I declined. YMMV
    >
    > Don't google for 'interviewing at google', or they'll know what you
    > are up to!

    They already know everything about everyone.

    --
    You received this message because you are subscribed to the Google Groups "Django users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
    To post to this group, send email to django-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/django-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.

    Re: Kindly help for an interview with Google on python django

    On Thu, Jan 31, 2013 at 5:25 PM, Larry Martell <larry.martell@gmail.com> wrote:
    > Books have been written about interviewing at google. Google
    > 'interviewing at google' and you'll find a plethora of stories. After
    > reading them you may not want to interview there. I was offered a
    > chance to interview there about 8 years ago, and I after reading what
    > it would be like, I declined. YMMV

    Don't google for 'interviewing at google', or they'll know what you
    are up to! Best to use Bing for that.

    Bad jokes aside, you should have a clear idea why you want to work
    there, what you can bring to them, and why they would want it (this is
    basically true of any interview). Work it out before you go there, so
    you don't stammer around trying to figure it out on the spot!

    Cheers

    Tom

    --
    You received this message because you are subscribed to the Google Groups "Django users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
    To post to this group, send email to django-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/django-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.

    Re: Kindly help for an interview with Google on python django

    On Thu, Jan 31, 2013 at 8:15 AM, laxmikant ratnaparkhi
    <laxglx01@gmail.com> wrote:
    > Hello Everybody,
    > I have an interview scheduled on monday with google. So can you
    > anybody have an related information or any experience. Please help me what
    > would be asked for this interview.
    > I have 2 years of exp in python and django.
    >
    > Thanks in advance!!!

    Books have been written about interviewing at google. Google
    'interviewing at google' and you'll find a plethora of stories. After
    reading them you may not want to interview there. I was offered a
    chance to interview there about 8 years ago, and I after reading what
    it would be like, I declined. YMMV

    --
    You received this message because you are subscribed to the Google Groups "Django users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
    To post to this group, send email to django-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/django-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.