Re: Can I use Components and Classes in Django for views/controllers?

2009-04-01 Thread Ariel Mauricio Nunez Gomez
Yes, Class Based Views are nice, here is a fresh blog post about it:
http://www.screeley.com/entries/2009/apr/01/class-based-views-and-reusable-apps/

--~--~-~--~~~---~--~~
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: mp3 converstion

2009-03-31 Thread Ariel Mauricio Nunez Gomez
On Tue, Mar 31, 2009 at 7:44 PM, oregon10  wrote:

>
> DISCLAMER: I'm not a program - only an end user and part-time admin
>
> I'm trying to upload a mp3 file to our my list of documents - so our
> views can assess it online. It goes through the motions of uploading
> but never appears in my list of docs. That tells me that the format
> might be wrong. If so, does anyone know what format options I should
> be converting the file to?
>
> Thanks!
>

Shelah,

This list is able to help people using Django to build websites, but you
need help using a website built with Django.

Unfortunately neither you, nor us have enough information to solve your
problem. You should contact whoever is developing/maintaining the site. That
person should know enough details to either make it work or ask specific
questions here.

Best Regards,

Ariel.

--~--~-~--~~~---~--~~
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: Django critter helps us code at the speed of light.

2009-03-17 Thread Ariel Mauricio Nunez Gomez
I already have my critter magic wallpaper on 3 out of my 4 desktops.

He is truly a helpful little fellow.

Ariel.

--~--~-~--~~~---~--~~
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: Creating KML files for use in Google Maps

2009-03-15 Thread Ariel Mauricio Nunez Gomez
>
> > view
> > 
> > def generateKml(request):
> >
> > locations = Location.objects.all().values('name','lat','longt')
> >
> > result= render_to_response('locations.kml',{
> > 'locations': locations
> > })
> >
> > return HttpResponse(result,mimetype='Content-Type:application/
> > vnd.google-earth.kml+xml')
>


Remember also you could do:

view
===
from django.contrib.gis.shortcuts import render_to_kml

def generateKml(request):
locations = Location.objects.all().values('name','lat','longt')
return render_to_kml('locations.kml', {'locations':locations})

--~--~-~--~~~---~--~~
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: Upload ZIP-File into Database

2009-02-09 Thread Ariel Mauricio Nunez Gomez

I did that once and had no problem customizing GalleryUpload for my needs.

Try start writing some code and get back to us if it fails.

http://code.google.com/p/django-photologue/source/browse/trunk/photologue/models.py#194

Ariel.

--~--~-~--~~~---~--~~
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: Geodjango polygon object

2009-01-26 Thread Ariel Mauricio Nunez Gomez
>
> 

This is because that is the string representation of the geometry field. {{
gemetry}}

>
>
> The truth is that i would rather have a numeric format...How could i
> parse my polygon objects and extract the coordinates?
>
> for example i have:
>
> fromDB = polygons.objects.all()
> coordArray = list(e.geometry for e in fromDB)
>

You have to call the different methods on the geometry field not on your
model.
coordArray = list(e.geometry.wkt for e in polygons.objects.all())
coordArray = list(e.geometry.kml for e in polygons.objects.all())

Ariel

--~--~-~--~~~---~--~~
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: Favorite Front-End Dev Environment?

2009-01-26 Thread Ariel Mauricio Nunez Gomez
Joshua, take a look at pinaxproject.com it may suit your needs.
Ariel.

--~--~-~--~~~---~--~~
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: Geodjango POST and WKT

2009-01-23 Thread Ariel Mauricio Nunez Gomez
Adonis:

>geometria = GEOSGeometry('POLYGON(('%s))' % coords)


Have you tried this?

Ariel.

--~--~-~--~~~---~--~~
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: Deployment of apps with 3rd party code

2009-01-19 Thread Ariel Mauricio Nunez Gomez
>
> What approaches have been popular for deploying projects and applications
> with 3rd party python modules (code usually found in site-packages).  Should
> the packages always be installed when possible or is it acceptable within
> the community to have a "lib" directory within a application or project that
> will contain 3rd party libraries.
>
> e.g. from myapp.lib.boto.s3 import Connection
>
I think it would be better to do from 'boto.s3 import Connection'


> This would have the benefit of maintaining a specific version of the
> library across servers and decrease requirements during deployment, but I
> not aware of what downsides there might be.
>

I would consider this a good reference:
http://svn.pinaxproject.com/pinax/trunk/

Take a special look at the modifications done to manage.py

Ariel.

--~--~-~--~~~---~--~~
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: how/where to constrain the relationships in a model?

2009-01-14 Thread Ariel Mauricio Nunez Gomez
Margie,

My best bet would be to override the model's save method and do your
validation there.

http://docs.djangoproject.com/en/dev/ref/models/instances/?from=olddocs#overriding-default-model-methods

Ariel


On Wed, Jan 14, 2009 at 3:37 PM, Margie  wrote:

>
> Supose I want to model the following: A Task is owned by a family but
> may additionally have specific owners that are within that family.
> The model would look like this:
>
> class Family(models.Model):
>   surName=models.CharField()
>
> class Task(models.Model):
>   ownerFamily=models.ForeignKey(Family)
>   owners = models.ManyToManyField(Person, blank=True, null=True)
>
> class Person(models.Model):
>   family = models.ForeignKey(Family)
>
> I want to enforce that the if a Task has owners, that each owner be in
> the Family specified by that task's ownerFamily.
>
> Could someone tell me where is the appropriate location in the code to
> enforce this?  I'm not sure if there is a way to enforce this within
> the model itself.  If not, then is the appropriate thing to do to just
> check it in my public interface when I, for example, add an owner to a
> task?
>
> Thanks!
>
> Margie
> Margie
> >
>

--~--~-~--~~~---~--~~
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: GeoDjango: Extract Latitude and Longitude from PointField

2009-01-14 Thread Ariel Mauricio Nunez Gomez
...
point = models.PointField()...
Longitude: {{point.x}}
Latitude: {{point.y}}

--~--~-~--~~~---~--~~
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: ForeignKey

2009-01-12 Thread Ariel Mauricio Nunez Gomez
Miguel,
Puedes tratar de reescribir tu pregunta, preferiblemente en ingles ya que
esta es una lista angloparlante.

Creo que quieres decir:
Como hago para actualizar automaticamente la lista de opciones en en campo
'grupo_pregunta' de la clase Pregunta basado en el valor del campo 'script'
en la interfaz de administracion de Django para agregar o editar el modelo
Pregunta.

La respuesta corta es: 'No hay una forma sencilla', la larga es: 'Debes
agregar un poco de javascript en el ModelAdmin para Pregunta'. [1]

--
How do I auto populate the grupo_pregunta field based on the value of the
script field in the 'Pregunta' admin edit interface.?
Short answer: There is no simple way. Long answer: Read carefully [1]
--

Miguel, si de veras quieres seguir haciendo preguntas en espanol, te
recomiendo que mejor uses django-es tal como te lo recomendaron en
django-developers.

Ariel.

[1]
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#modeladmin-media-definitions

--~--~-~--~~~---~--~~
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: Related articles based on keywords.

2009-01-09 Thread Ariel Mauricio Nunez Gomez
>
> In the view for a single article, I would like to be able to pull up
>> related articles based on shared keywords. Just pulling up all the
>> articles that share at least one keyword would be to imprecise. What
>> I'd like to do is use some sort of weighting algorithm, so that if
>> there are articles that share 5 keywords they get pulled up while ones
>> that only share 1 do not. I've been thinking over ways to do this, but
>> they all seem to be fairly slow and processor intensive.
>
>
Also, if you are looking for performance, you may want to find a way to use
the SQL aggregation operations (Like Count, Avg, StdDev) to help you with
your problem.

That feature is scheduled for Django 1.1 and 'may' be merged into trunk
soon, for now you can use Russell's git repo by doing:

git clone 
http://github.com/freakboy3742/django/tree/aggregation
git checkout -b --track aggregation origin/aggregation

Let us know how that goes.

Ariel.

--~--~-~--~~~---~--~~
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: Related articles based on keywords.

2009-01-09 Thread Ariel Mauricio Nunez Gomez
If I were you I would start by writing down the description, pros and cons
of the approaches you've thought about. Then you'll be closer to solving
your problem and it'll be more likely that someone steps up and helps you.
Ariel.

On Fri, Jan 9, 2009 at 3:09 PM, Rodrigo Culagovski wrote:

>
> I am developing a site for an academic publication that contains a few
> thousand articles. Each Article has a ManyToMany relationship with one
> or more Keywords from a controlled vocabulary.
>
> In the view for a single article, I would like to be able to pull up
> related articles based on shared keywords. Just pulling up all the
> articles that share at least one keyword would be to imprecise. What
> I'd like to do is use some sort of weighting algorithm, so that if
> there are articles that share 5 keywords they get pulled up while ones
> that only share 1 do not. I've been thinking over ways to do this, but
> they all seem to be fairly slow and processor intensive.
>
> Using trunk and MySQL (I'd be willing to change to PostgreSQL if there
> was an advantage, however I've never used it before).
>
> Any suggestions or experience is much appreciated.
> >
>

--~--~-~--~~~---~--~~
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: best way to do tabs?

2009-01-08 Thread Ariel Mauricio Nunez Gomez
Since I think you are not (yet) using AJAX, all the logic you need should be
available to the template already.
Your main issue sems to be not having to rewrite any css files but only
change the html item 'class' attribute. The last link and code snippet on my
previous mail address that issue(Using an 'active' class on the selected
item, you can dynamically set it on your template).

Take some time to play with it and let us know how it goes.

Frameworks like jquery can also create and change css styles on the fly,
like I said I see it as an overkill for such a simple task, but it is your
bikeshed and you get to paint it any color you may want :)

Ariel.
On Thu, Jan 8, 2009 at 12:30 PM, Margie  wrote:

>
> I think the issue I have is that I seem to need to maintain "state".
> Let me use a contrived example.
>
> Suppose I have three tabs:  books-tab, music-tab, and video-tab.  When
> I click on books-tab, I get a subnav bar with three subnav tabs:
> "books about animals", "books about video", "books about places".  And
> similarly, when I click on music-tab I get 3 different subnav tabs:
> music-1, music-2, music-3.  When I click on books-tab, I want books-
> tab to darken.  When I then clock on "books about video", I want books-
> tab to stay dark and books about video"  to also darken.  It seems
> that when I use css, when I go to the "books about video" html page, I
> must "remember" to set a special id that makes books-tab darken.   It
> seems that the html for "books about video" has to know it is being
> called on behalf of the books tab, which seems inflexible. For
> example, say I wanted to create a "books about video" under video-tab,
> the html for "books about video" needs to now set a different id in
> order to darken the video tab instead of the books tab.  Basically,
> the html for "books about video" needs to know which tab it is being
> invoked by - this seems bad.
>
> I haven't had a chance to look at your links below in any detail, but
> do you think they address this?  Does javascript or jquery or yui
> address this issue in a way that is significantly different from css?
> I know I have to start looking into those tools so I at least
> understand what they provide.
>
> And secondly, what about creating dynamic tabs?  Ie, if the usr is
> going to click on something that ends up creating a new tab, how can
> css address this at all?  I mean, in the css one needs to up front
> have knowledge of the ids that cause the tabs to darken.  If each tab
> has its own id and you are creating them dynamically, it seems like
> the static nature of css just can't deal with this.
>
>
> On Jan 8, 8:29 am, "Ariel Mauricio Nunez Gomez"
>  wrote:
> > Margie, I agree the current metod for adding new tabs in Pinax is kind of
> > cumbersome.
> >
> > I also think ther is no need for javascript for that kind of simle stuff
> > (i.e. This would be an overkillhttp://
> blog.evaria.com/wp-content/themes/blogvaria/jquery/index-multi...)
> > Perhaps you may want to search for more 'css menu' examples, I think you
> can
> > getaway with just using two classes 'selected' and 'normal'
> >
> > Like this guys do:
> http://www.3point7designs.com/blog/2007/12/22/advanced-css-menu-trick/http://www.3point7designs.com/keyword-optimization/michigan-seo.html
> >
> >
> >
> >
> >
> > >   
> > > > > title="Home Page">Home Page
> > >About Us
> > > title="Web
> > > Design and Development">Web Design
> > >Graphic Designs
> > >Search Engine
> > > Optimization SEO
> > > > > title="Contact Us">Contact Us
> > >
> >
> > Ariel.- Hide quoted text -
> >
> > - Show quoted text -
> >
>

--~--~-~--~~~---~--~~
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: best way to do tabs?

2009-01-08 Thread Ariel Mauricio Nunez Gomez
Margie, I agree the current metod for adding new tabs in Pinax is kind of
cumbersome.

I also think ther is no need for javascript for that kind of simle stuff
(i.e. This would be an overkill
http://blog.evaria.com/wp-content/themes/blogvaria/jquery/index-multi.php)
Perhaps you may want to search for more 'css menu' examples, I think you can
getaway with just using two classes 'selected' and 'normal'

Like this guys do:
http://www.3point7designs.com/blog/2007/12/22/advanced-css-menu-trick/
http://www.3point7designs.com/keyword-optimization/michigan-seo.html

>   
> title="Home Page">Home Page
>About Us
>Web Design
>Graphic Designs
>Search Engine
> Optimization SEO
> title="Contact Us">Contact Us
>
>

Ariel.

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



FormWizard: Setting up a ChoiceField.choices based on previous forms,

2008-12-30 Thread Ariel Mauricio Nunez Gomez
Hello list,
Today I started using FormWizard and could not find a clean way to populate
a choices field based on previously submitted forms, I ended up overriding
the render method like this(The only changed line is the one highlited):
{{{
class CountryForm(forms.Form):
country = forms.ModelChoiceField(queryset=Country.objects.all())

class StaterForm(forms.Form):
state = forms.ChoiceField()

class LocationFormWizard(forms.Form):
  def process_step(self, request, form, step):
if step == 0 and form.is_valid():
self.state_choices= states_from_country(form.data['0-country'])

def prepare_form(self, request, form, step):
if step == 1:
form.fields['state'].choices = self.state_choices
return form

def render(self, form, request, step, context=None):
"Renders the given Form object, returning an HttpResponse."
old_data = request.POST
prev_fields = []
form = self.prepare_form(request,form, step)
if old_data:
hidden = forms.HiddenInput()
# Collect all data from previous steps and render it as HTML
hidden fields.
for i in range(step):
old_form = self.get_form(i, old_data)
hash_name = 'hash_%s' % i
prev_fields.extend([bf.as_hidden() for bf in old_form])
prev_fields.append(hidden.render(hash_name,
old_data.get(hash_name, self.security_hash(request, old_form
return self.render_template(request, form, ''.join(prev_fields),
step, context)
}}}

Is there a hook missing to do what I needed or am I missing something?

Ariel

--~--~-~--~~~---~--~~
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: Django newbie observation

2008-12-17 Thread Ariel Mauricio Nunez Gomez
> Hello Ariel,
>
> I will check this out. However the point of the starter site that I
> was thinking of is something ships with Django releases that uses up
> to date best practices(performance, security, etc...), syntax, etc...
> Is pinax project always in sync with the latest Django release?
>

 Yes

--~--~-~--~~~---~--~~
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: Django newbie observation

2008-12-15 Thread Ariel Mauricio Nunez Gomez
I think pinax basic_site is pretty much what you want/need for a
sample_website.
I would be +1 for a link to Pinax project at the end of the tutorials.

Ayayalar:
pinax-0.5.0.tar.gz 
Once the download is complete, uncompress it and you should be able to cd
intoprojects/complete_project/ or projects/basic_project/ and run
./manage.py syncdband ./manage.py runserver to get running immediately.

Should you need more information, checkout:
http://pinaxproject.com/docs/trunk/install.html

--~--~-~--~~~---~--~~
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: Amazon EC2 and Django experience

2008-12-12 Thread Ariel Mauricio Nunez Gomez
>
> I would like to know if someone may explain his experience with Amazon
> EC2 and Django:
>   * About architecture choice

mod_wsgi, apache, nginx, postgresql, cmemcache

>
>   * OS choice

ubuntu 8.04 -> alestic.com

>   * How many instances to begin to be able scale easily

Only a single instance for now.

>   * Tool used to manage it

elastic fox (plugin for firefox) + putty.exe or good old ssh on *nix.

>   * Cost to experiment with this techno before to use it with a real web
> site

~ 70 USD per month, so, ~2 dollars for 20 hours of playing.

>   * Problem or management django with EC2...

Some ubuntu-django problems and some ubuntu-ec2 problems but not django-ec2
problems ;)

>
> I would like to use EC2 with a personal web site, and I am afraid
> about cost of it (probably not a rational reason !)

There are surely cheaper alternatives. YMMV

Ariel.

--~--~-~--~~~---~--~~
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: Django revision for ORM aggregation patch

2008-11-30 Thread Ariel Mauricio Nunez Gomez
> I should be in a position to publish a git repository with my work in
> progress in the next day or so, which will remove the need for anyone
> to apply the patch manually. When I push the repository, I'll announce
> on the ticket and on django-developers. Watch this space.


That'd be great, thanks a lot.

>
> > I tried unsuccesfully with django 1.0rc, 1.0 and 1.0.2, everytime
> different
> > rejections, and when I try to fix them by hand I always get a 'SELECT
> FROM
> > ...' invalid clause error.
>
> This error isn't one I can recall seeing during my work, so I'd need
> to see more detail to help out here. The only error I am aware of with
> the patch as published is that one of the test cases causes problems
> with MySQL due to a quoting problem with a column name with a space in
> it. This arises as a ProgrammingError during the test suite, not an
> invalid clause error.
>

I also contacted Nicolas off list and he said he was gonna try to update the
patch to work against trunk in the next days or so.

So I think I would better wait a week or so and see what happens, I already
read all the docs on the patch, this certainly looks great.

Ariel.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Django revision for ORM aggregation patch

2008-11-30 Thread Ariel Mauricio Nunez Gomez
Does anybody know which revision of django works with the latest patch in
the ticket #3566
http://code.djangoproject.com/ticket/3566

I tried unsuccesfully with django 1.0rc, 1.0 and 1.0.2, everytime different
rejections, and when I try to fix them by hand I always get a 'SELECT FROM
...' invalid clause error.

-Ariel.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Help with GeoDjango and Google Maps, please...

2008-11-21 Thread Ariel Mauricio Nunez Gomez
ChrisK,

I use:
*
from django.contrib.gis.geos import fromstr

gpoly=GPolygon(fromstr(poly.wkt, srid=4326))*

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: geodjango importing existing data - pointfields

2008-11-17 Thread Ariel Mauricio Nunez Gomez
>
> 1,1,'Edinburgh Castle','Edinburgh','Lothian','EH1 2NG','POINT
> (-3.20277400 55.95415500)'
>
> I've tried multiple variations on the POINT syntax (GeomFromText
> etc...) but no joy.
>
> What am I doing wrong!!?
>
> Thanks in advance


Have you tried the following EWKT?
'SRID=32632;POINT(-3.20277400 55.95415500);'

>
>
>
>
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: GeoDjango - Difficulty placing vector marker from DB

2008-10-21 Thread Ariel Mauricio Nunez Gomez
There are many ways to fix the projection issue, this is one (probably not
the best)

On your view code:
sites_list=sites_list.transform(900913)

Best,
Ariel.

On Tue, Oct 21, 2008 at 1:57 PM, Alfonso <[EMAIL PROTECTED]> wrote:

>
> Hey,
>
> Having great trouble getting geodjango/openlayers to display vector
> markers propery - everything I try positions the sample point off the
> coast of Africa (no matter if I change the vector position in
> geoadmin).  Here's what I'm working with - any help appreciated!:
>
> var lon = -2.900;
> var lat = 54.160;
> var zoom = 6;
> var map, baselayer;
> var wkt_f = new OpenLayers.Format.WKT();
> var v_markers = [{% for site in sites_list
> %}wkt_f.read('{{ site.point.wkt }}'){% if not forloop.last %},{% endif
> %}{% endfor %}];
> var marker_style = {'strokeColor' : 'green', 'fillColor' : 'green',
> 'fillOpacity' : 0.9, 'pointRadius' : 6}
> for (var i = 0; i < campsite_markers.length; i++){v_markers[i].style =
> marker_style;}
>
> function init(){
>var options = {
>'projection' : new OpenLayers.Projection("EPSG:900913"),
>'units': "m",
>'maxResolution': 156543.0339,
>'maxExtent': new
> OpenLayers.Bounds(-20037508,-20037508,20037508,20037508),
> 'controls':[new OpenLayers.Control.Navigation(), new
> OpenLayers.Control.ZoomPanel()],
>'numZoomLevels' : 20,
>};
>// base map
>map = new OpenLayers.Map('map', options);
>
>// - MS Virtual Earth Layer
> baselayer = new OpenLayers.Layer.VirtualEarth("Virtual Earth",
> { 'type': VEMapStyle.Street, "sphericalMercator": true});
>map.addLayer(baselayer);
>
>// Controls for the map
> map.addControl(new OpenLayers.Control.LayerSwitcher());
> map.addControl(new OpenLayers.Control.MousePosition());
>
>var layermarkers = new OpenLayers.Layer.Vector("markers");
>layermarkers.addFeatures(v_markers);
>
>// Vector Layers for the sites
>var LonLat = new OpenLayers.LonLat(lon, lat).transform(new
> OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
>
>map.addLayer(layermarkers);
>map.setCenter(LonLat, zoom);
>
> }
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Multiple ManyToMany relations with the same class

2008-10-07 Thread Ariel Mauricio Nunez Gomez
Por cierto, cuando ya este la base de datos llena de actuaciones nos invitas
a escuchar a los samberos.

Ariel.


On Tue, Oct 7, 2008 at 12:05 PM, Pablo Catalina <[EMAIL PROTECTED]>wrote:

> # python manage.py validate
> Error: One or more models did not validate:
> concerts.concert: Accessor for m2m field 'musicans' clashes with related
> m2m field 'person.concert_set'. Add a related_name argument to the
> definition for 'musicans'.
> concerts.concert: Accessor for m2m field 'coches' clashes with related m2m
> field 'person.concert_set'. Add a related_name argument to the definition
> for 'coches'.
>
> OK.
>
> The problems is with the order of the fields, I solve It:
>
> Now, the problem:
>
> models:
> from django.db import models
> from django.contrib.auth.models import User, UserManager
>
>
> class instrumentos(models.Model):
> nombre = models.CharField(max_length=10)
> numero = models.PositiveSmallIntegerField(blank=True, null=True)
> def __unicode__(self):
> return self.nombre
>
> class samberos(User):
> objects = UserManager()
> dni = models.CharField(max_length=10, blank=True, null=True)
> phone = models.CharField(max_length=9, blank=True, null=True)
> movil = models.CharField(max_length=9, blank=True, null=True)
>
> class contactos(models.Model):
> name = models.CharField(max_length=30)
> phone = models.CharField(max_length=9, blank=True, null=True)
> movil = models.CharField(max_length=9, blank=True, null=True)
> mail = models.CharField(max_length=30, blank=True, null=True)
> def __unicode__(self):
> return self.name
>
> class relaciones(models.Model):
> sambero = models.ForeignKey(samberos)
> instrumento =  models.ForeignKey(instrumentos)
> def __unicode__(self):
> return '%s => %s' % (self.sambero, self.instrumento)
>
> class actuaciones(models.Model):
> titulo = models.CharField(max_length=80)
> fecha = models.DateTimeField()
> descripcion = models.TextField()
> lugar = models.CharField(max_length=200)
> organizador = models.ManyToManyField(samberos)
> samberos = models.ManyToManyField(relaciones, blank=True, null=True)
> confirmada = models.BooleanField(default=False)
> contacto = models.ManyToManyField(contactos)
> coches = models.ManyToManyField(samberos, blank=True, null=True,
> related_name='actuaciones_coches')
> def __unicode__(self):
> return self.titulo
>
> And the solution is to change the order of the fields:
>
> class actuaciones(models.Model):
> titulo = models.CharField(max_length=80)
> fecha = models.DateTimeField()
> descripcion = models.TextField()
> lugar = models.CharField(max_length=200)
> organizador = models.ManyToManyField(samberos)
> coches = models.ManyToManyField(samberos, blank=True, null=True,
> related_name='actuaciones_coches')
> samberos = models.ManyToManyField(relaciones, blank=True, null=True)
> confirmada = models.BooleanField(default=False)
> contacto = models.ManyToManyField(contactos)
> def __unicode__(self):
> return self.titulo
>
>
> Thank you very much!!!
>
> 2008/10/7 Malcolm Tredinnick <[EMAIL PROTECTED]>
>
>
>>
>> On Mon, 2008-10-06 at 13:52 -0700, xkill wrote:
>> > Hello,
>> >
>> > I tried to add multiple manytomany fields to a class, that pointing to
>> > the same class.
>> >
>> > For example:
>> >
>> > class person(models.Model):
>> > name = models.CharField(max_length=30)
>> > phone = models.CharField(max_length=9, blank=True, null=True)
>> > def __unicode__(self):
>> > return self.name
>> >
>> > class concert(models.Model):
>> > title = models.CharField(max_length=80)
>> > musicans = models.ManyToManyField(person)
>> > coches = models.ManyToManyField(person, blank=True, null=True)
>> > def __unicode__(self):
>> > return self.title
>> >
>> >
>> > But it doesn't work, how can I do it?
>>
>> "It doesn't work" is not very specific. It could mean anything from "an
>> error was reported" to "it failed silently" all the way up to "my
>> computer burst into flames".
>>
>> So what actually happened?
>>
>> As James hinted at, I suspect you will actually see an error messages
>> when you run "manage.py validate" saying that you need to add a related
>> name to one of the ManyToManyFields (the validation will complain about
>> both fields, but you need to fix at least one of them).
>>
>> If that is the case, then the problem is that since the reverse relation
>> name for a ManyToManyField is, by default, created from the name of the
>> model it is contained in, both of those fields will end up with the same
>> default reverse name (used when you are filtering from a Person back to
>> a Concert). So you need to set the related_name attribute on one of the
>> fields (or on both of them).
>>
>> Regards,
>> Malcolm
>>
>>
>>
>>
>>
>
>
> --
> Pablo Catalina <[EMAIL PROTECTED]>
>
> >
>

--~--~-~--~~~---~--~~
You r

Re: newforms-admin branch has been merged into trunk

2008-07-18 Thread Ariel Mauricio Nunez Gomez
Thanks a lot!!

BTW: Bryan, you've gotta redo the commits visualization[1] for another big
explosion!!

[1] http://oebfare.com/blog/2008/jun/24/django-code_swarm/

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django as front-end for php- and zope2-based apps?

2008-06-29 Thread Ariel Mauricio Nunez Gomez
I have 'integrated' django and moodle in the past. For authentication I
would suggest using a single source (In my case is imap auth using google
apps for your domain) and both moodle and django validate credentials
against it.
It is very easy to write django models to get access to moodle functions.
However I wouldn't recommend the django-app as proxy approach you suggest,
better to write some matching  moodle themes and css for django apps and use
something like nginx to do the routing.

Best,
Ariel.

On Sun, Jun 29, 2008 at 11:31 AM, spacetaxi <[EMAIL PROTECTED]> wrote:

>
> Hello djangonauts,
>
> maybe someone of you has a good solution for the following scenario:
>
> We have several rather complex web applications (partly php-based,
> partly zope2-based) and I'd like to integrate them into one django-
> based front-end. New apps will be implemented with django, but we
> definitely need these "legacy" (php/zope2) apps to be available to the
> user within *one* front-end. Ideally the different apps should look
> like they actually were *one* app. (By the way, one of the php-based
> apps is Moodle (www.moodle.org).)
>
> This is my vision: After an user has logged into the (to-be-developed)
> django site, he get's some kind of "menu bar" (based on yahoo's yui)
> on the top of the screen. Every menu item selects a different web
> application, which may be django-based, php-based or zope2-based. The
> selected application will be shown below the menu bar, so the user can
> use the menu-bar to switch between the different web apps.
>
> Do you have an idea, how this could be implemented?
>
> Currently, I'm thinking about implementing some kind of http-proxy
> within my django-app, so django would forward the incoming requests
> (get/post) to the particular application. When receiving the response,
> django could modify the html source so the content gets embedded into
> my common page template (with the menu bar at the top of the page).
> Additionally I'd implement a "authentication bridge" between the
> different apps to share the login information with django.
>
> Is this a reasonable way to do it? Or do you have a better approach?
> Thank in advance for any hint!
>
> -Stephan
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Thanks!!!!!!!!!!!!!!!!!

2008-06-21 Thread Ariel Mauricio Nunez Gomez
+1

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: click download, click install, go! no....

2008-06-01 Thread Ariel Mauricio Nunez Gomez
http://s3.amazonaws.com/instant.django/django.exe

(No I am not a spambot and no, it is not a fake
)

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Installing GeoDjango help

2008-05-22 Thread Ariel Mauricio Nunez Gomez
BTW, you still have to follow the postgis database and user creation parts.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Installing GeoDjango help

2008-05-22 Thread Ariel Mauricio Nunez Gomez
If you have ubuntu you can:

sudo apt-get install mercurial
hg clone http://geodjango.org/hg/where2.0/
cd where2.0/ubuntu
more ubuntu_install.txt
(Follow the instructions from step 5)

Regards,
Ariel.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django learning management application

2008-05-14 Thread Ariel Mauricio Nunez Gomez
Moodle and Django can coexist happily (Using same database and writing
django models for some of the tables), That way you can take advantage of
all the moodle functionality (Quizzes, lessons, forums) and have some
business related code on django (Class scheduling, CRM, Billing).

If you like the idea, I can post some details, I did it once.

Moodle quizz module is _very_ complete, I wish we had something similar
written by django.

BTW, there was a django_quizz app post like 8 months ago on this list,
search the archives.

Regards,
Ariel.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



[nf-admin] Accessing field initial values on change_form.html

2008-04-27 Thread Ariel Mauricio Nunez Gomez
Hi everyone,

I am trying to access the fields values on then
admin/includes/fieldset.htmltemplate.

I know I can access the verbose label name with {{ field.label_tag }} and
the plain field name with {{ field.field.name }}, but I want to have access
to the initial value of each field.
I tried {{ field.field.initial }}, {{ field.initial }} and {{ field.data }}
{{ field.field.data }} without any luck.

I have found a workaround using {{ original }} but it requires me to know
the field names ahead of time.

Thanks in advance,
Ariel.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Multi DB question

2008-04-17 Thread Ariel Mauricio Nunez Gomez
On Thu, Apr 17, 2008 at 6:00 AM, shabda <[EMAIL PROTECTED]> wrote:

>
> I have a forum(non-Django) and a Django app both are in different
> databases.


Can you install django on the forum database? It would probably make your
life a lot easier as you could write custom django models to use the forum
app tables and handle them via the admin or scripts.

Regards,
Ariel.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django en Dreahost

2008-04-16 Thread Ariel Mauricio Nunez Gomez
> :( Is the one I have hired a time ago and I can't move easily. Is there
> a free hosting where I can try my django applications (not for
> production sites).
>
Go with alwaysdata http://djangofriendly.com/hosts/alwaysdata/
Since you understand spanish and english, I'd think you won't have much
trouble getting around the french based docs and config options. (It was my
case)

Regards,
Ariel.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: django.newforms and AJAX

2008-03-28 Thread Ariel Mauricio Nunez Gomez
David,

Good luck on what you are trying to achieve.

Jump in, I think your list is just enough for a proof of concept.

We are waiting eagerly to try what you come up with.

Dive in.

Regards,
Ariel

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: "Presales" questions

2008-02-17 Thread Ariel Mauricio Nunez Gomez
Phoenix,

I suggest you take a look at Jeff Croft's post [1], it is supposed to be for
non-programmers, but I guess it also applies to "I don't want to learn
another language"-progammer.

That said, I am pretty sure you'll start loving python once you go start
walking the django path.


[1] http://jeffcroft.com/blog/2006/may/02/django-non-programmers/

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: transaction.commit_manually

2008-02-13 Thread Ariel Mauricio Nunez Gomez
I hit the same wall when writing a loaddata variant to load json on
geodjango.
I couldn't find a solution either. :(

I hope someone can give us light in this regard.

Ariel.


On Feb 12, 2008 5:34 PM, Jeremy Dunck <[EMAIL PROTECTED]> wrote:

>
> Are people using the transaction.commit_manually decorator?
>
> I thought I understood it, but just learned that I don't.
>
> I'm using the transaction middleware and that's good for most of my
> purposes.
>
> I have another function called from lots of different views, and
> within that function, I wanted to isolate the general transaction
> condition from the connection/queries I need to run from that
> function.
>
> The goal here is to have a function that can run successfully when the
> calling view (or anything else in the request cycle) had a SQL error.
> Or vice versa, if an error occurs in this function, I'd like to
> isolate it from the calling view's functionality.
>
> Anyway, I thought commit_manually set up a nested transaction, but
> apparently it doesn't.
>
> So, if you're using it, can you explain how it's been useful to you?
> I'd like to use it correctly.  :)
>
>  -Jeremy
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Loading fixtures from views

2008-01-22 Thread Ariel Mauricio Nunez Gomez
Russ,

Thanks for the solution you suggested, I am about to implement it, but
something came to my mind: how would I know if the fixture loading was
successful or failed? I know it writes to the standard error output the
result if I set verbosity higher, but it would be nicer if an exception was
raised.

Ariel.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: setting up a new django site (mod_python)

2008-01-14 Thread Ariel Mauricio Nunez Gomez
>
> the path to the actual project itself is located at /home/www/
> django..com/htdocs/mysite/


There it is. It is generally not a good idea to put your project's files on
a public folder (htdocs , www) for security reasons.
The short advice, without knowing all the other details on your server
setup, is to add the following line before the  tag.

PyhtonPath "['/home/www/django..com/htdocs']+sys.path"

Assuming your project is named "mysite". (Hint: check if there exists the
/home/www/django.XXX.com/htdocs/mysite/settings.py file )

Regards,
Ariel.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: setting up a new django site (mod_python)

2008-01-14 Thread Ariel Mauricio Nunez Gomez
comike01,

1. Please post the whole django-related config you have on apache.
2. Tell us what's the name of your project and where it is located on your
filesystem.

I really don't think the problem is related to the settings value, instead
it must be a path configuration problem as Karen suggests.

Ariel.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: loaddata without pk

2007-10-22 Thread Ariel Mauricio Nunez Gomez
>I think you're misunderstanding. There's no bug or issue here, at least
>as far as you've explained it. Django's loaddata simply isn't designed
>for data that isn't fully specified, which includes the pk value.
>Instead, it's designed to handle the stuff written out by dumpdata.

The issue I was describing was the need to load "pk-less" data in bulk(Like
getting a csv file into a table). But you're right: it isn't a django core
issue.

>It really sounds like subclassing the deserializer for whichever format
>you're using would be the "correct" place to solve this.

I totally forgot about the serializers.
Thanks for your advice,
It's time to start coding my simpleload.py

Regards,
Ariel.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: loaddata without pk

2007-10-22 Thread Ariel Mauricio Nunez Gomez
Thanks for your comments Russell,

I was refering to my own django install, I agree that it's not by any chance
a solution for the general problem.

Do you think it would be adequate to report the issue in trac?

Regards,
Ariel.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: RESTful Geodjango

2007-10-20 Thread Ariel Mauricio Nunez Gomez
That restapi is as easy to configure as promised.

The address /xml/mymodel  now presents an xml list  that looks like:


XX-83-297
2007-07-27 14:59:18
POINT (31.00892404 -
82.71686560)
71
1
3


That NoField type, is it ok?

Ariel
PS: Thanks Andreas, and thanks to the geodjango team for your excelent work.

On 10/20/07, Ariel Mauricio Nunez Gomez <[EMAIL PROTECTED]> wrote:
>
> Thanks Justin,
>
> I'll try later and let you know.
>
> Ariel.
>
> On 10/20/07, Justin Bronn <[EMAIL PROTECTED] > wrote:
> >
> >
> > I quickly glanced at the django-rest-interface code and I don't see
> > any reason why it shouldn't work.  There are no plans to combine yet,
> > though it would be nice to have GeoJSON serializers for the GEOS/OGR
> > geometry objects.  The best way to confirm compatibility is experiment
> > yourself!
> >
> > -Justin
> >
> > On Oct 20, 8:57 am, "Ariel Mauricio Nunez Gomez"
> > <[EMAIL PROTECTED]> wrote:
> > > Is it possible/planned to use django-rest-api
> > > [1]<http://code.google.com/p/django-rest-interface/>in geodjango
> > > [2] <http://code.djangoproject.com/wiki/GeoDjango > ?
> > >
> > > Ariel
> > >
> > > [1]http://code.google.com/p/django-rest-interface/
> > > [2]http://code.djangoproject.com/wiki/GeoDjango
> >
> >
> > > >
> >

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: RESTful Geodjango

2007-10-20 Thread Ariel Mauricio Nunez Gomez
Thanks Justin,

I'll try later and let you know.

Ariel.

On 10/20/07, Justin Bronn <[EMAIL PROTECTED]> wrote:
>
>
> I quickly glanced at the django-rest-interface code and I don't see
> any reason why it shouldn't work.  There are no plans to combine yet,
> though it would be nice to have GeoJSON serializers for the GEOS/OGR
> geometry objects.  The best way to confirm compatibility is experiment
> yourself!
>
> -Justin
>
> On Oct 20, 8:57 am, "Ariel Mauricio Nunez Gomez"
> <[EMAIL PROTECTED]> wrote:
> > Is it possible/planned to use django-rest-api
> > [1]<http://code.google.com/p/django-rest-interface/>in geodjango
> > [2] <http://code.djangoproject.com/wiki/GeoDjango> ?
> >
> > Ariel
> >
> > [1]http://code.google.com/p/django-rest-interface/
> > [2]http://code.djangoproject.com/wiki/GeoDjango
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: loaddata without pk

2007-10-20 Thread Ariel Mauricio Nunez Gomez
Thanks Malcolm,

I just use it to load data for a single model that does not have any
relation to others.

I generate the data.json with a script but I don't (know)/(want to set) the
pk keys in advance.

Should I modify loaddata to look for the last pk at the start and fill the
gaps?

Ariel.

On 10/20/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
>
> On Sat, 2007-10-20 at 10:15 -0500, Ariel Mauricio Nunez Gomez wrote:
> > Is it possible to use loaddata without a pk field and let database set
> > the proper value?
>
> No. The difficulty here is that you wouldn't ever be able to have
> relations between models, since they refer to each other using the
> primary key values (almost always).
>
> Regards,
> Malcolm
>
> --
> The early bird may get the worm, but the second mouse gets the cheese.
> http://www.pointy-stick.com/blog/
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



loaddata without pk

2007-10-20 Thread Ariel Mauricio Nunez Gomez
Is it possible to use loaddata without a pk field and let database set the
proper value?

Ariel

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



[gis] RESTful Geodjango

2007-10-20 Thread Ariel Mauricio Nunez Gomez
Is it possible/planned to use django-rest-api
[1]in geodjango
[2]  ?

Ariel

[1] http://code.google.com/p/django-rest-interface/
[2] http://code.djangoproject.com/wiki/GeoDjango

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: can't install...

2007-10-15 Thread Ariel Mauricio Nunez Gomez
Phwaxmon, the painless way to get django working is to follow cjl advice:
1. Uninstall python
2. http://www.instantdjango.com/

Note: After you have played a little, you are going to have to go again and
try to install django with postgres, apache and all the crew, but hopefully
you'll have more knowledge and time.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: disguising a django app as php?

2007-09-28 Thread Ariel Mauricio Nunez Gomez
Web 2.8: About what would omat have decided?

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: GeoDjango : Error in admin site with geom fields

2007-09-16 Thread Ariel Mauricio Nunez Gomez
Did you have a previous geos installation??
Maybe you have some old .so's that are being linked instead of the new ones.

Ariel

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django deployment à lá Capistrano

2007-09-11 Thread Ariel Mauricio Nunez Gomez
Just some names:

There is a genre called Jazz Fusion (
http://en.wikipedia.org/wiki/Jazz_fusion)

Here's a very long list of names that belong to that category:
http://en.wikipedia.org/wiki/List_of_jazz_fusion_artists

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Debugging ?e=1 on admin search

2007-09-09 Thread Ariel Mauricio Nunez Gomez
Hi, recently i have been having problems with django-admin search on some
models.

(Searching in a django.contrib model like auth.User works flawlessly. But
when I try other models (Integer and Charfields with some foreign keys)
nothing happes after i click the search button, and the error "?e=1" shows
up in the url.

What's the best way to debug that kind of errors?

Thanks in advance,

Ariel.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django-countries

2007-09-01 Thread Ariel Mauricio Nunez Gomez
Project owners:   zodizz   Project
members:
 neojjj 
Have you tried [EMAIL PROTECTED] ?

On 9/1/07, Chris Moffitt <[EMAIL PROTECTED]> wrote:
>
> By any chance, is the author of django-countries (
> http://code.google.com/p/django-countries/ ) on the list?  I stumbled upon
> this app and wanted to touch base with the developer about a couple of
> things.  If you're the developer (or know who is), would you mind sending me
> a note off-list with your email?
>
> Thanks,
> Chris
>
> >
>


-- 
Ariel Mauricio Núñez Gómez

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: admin site and parent/child relationship

2007-08-31 Thread Ariel Mauricio Nunez Gomez
Have you looked at the admin filter option, it's not exactly waht you're
asking for, but could do the job?
In the admin view (change_list for call ) if you append:   ?client=MyClient
to the url, the data get's filtered.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Admin search does not work in my models

2007-08-29 Thread Ariel Mauricio Nunez Gomez
Hello people,

Summary:
Django admin search returns all results in my models. (in auth.user, search
works ok)

Context:
I'm using revision 6023 from trunk, using Postgresql 8.2 with psycopg2 on an
Ubuntu Feisty 7.04 Box.

Model:
Using a simple model:

from django.db import models

# Create your models here.
class Business(models.Model):
business_name = models.CharField(max_length=50)
employees = models.IntegerField()
text = models.TextField()
def __unicode__(self):
return "%s %s %s" % (self.business_name, self.employees, self.text)
class Admin:
list_display = ('business_name', 'employees', 'text',)
search_fields = ('business_name')
list_filter = ('business_name',)

Observations:
I looked at the generated ur, when I search in my model:
http://localhost/admin/test/business/?e=1
and when I search in user:
http://moteserver/admin/auth/user/?q=ariel

If I apply a query in the url, like this:
http://localhost/admin/test/business/?q=testing
It displays everythin and changes to,
http://localhost/admin/test/business/?e=1

Does anybody know what can be happening?

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Newbie: How to create different person models that share a profile model?

2007-08-27 Thread Ariel Mauricio Nunez Gomez
Thanks a lot for pointing that out. My apologies.

So, for other readers of the thread:
class UserProfile(models.Model):
user = models.ForeignKey(User, unique=True, edit_inline=models.TABULAR,
num_in_admin=1,min_num_in_admin=1, max_num_in_admin=1,num_extra_on_change=0)

: Makes the profile show up in admin but fields DO NOT GET SAVED.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Newbie: How to create different person models that share a profile model?

2007-08-26 Thread Ariel Mauricio Nunez Gomez
I can't think of any "clean solutions" right now.

Dirty one's include adding a Role class, or applying the constraints on the
database.

If you come up with something, please let me know.

Ariel.

On 8/25/07, Ed Hagen <[EMAIL PROTECTED]> wrote:
>
>
>
> That will work -- assigning roles to Users makes sense. But, using
> your setup, is there any way to enforce a single role per User? As it
> is now, a single User could be assigned both a student and teacher
> role.
>
> Many thanks for your help.
>
> Ed.
>
>
> >
>


-- 
Ariel Mauricio Núñez Gómez

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Newbie: How to create different person models that share a profile model?

2007-08-24 Thread Ariel Mauricio Nunez Gomez
Hi Ed.

I recommend you link all your people roles to a User (It already has Full
name and e-mail fields)
--
from django.contrib.auth.models import User

class Student(models.Model):
user = models.ForeignKey(User, unique=True)

class Teacher(models.Model):
user = models.ForeignKey(User, unique=True)

class UserProfile(models.Model):
   first_name = models.CharField()
   last_name = models.CharField()
   home_address= models.TextField()
   phone = models.PhoneNumberField()
   user = models.ForeignKey(User, unique=True, edit_inline=models.TABULAR,
num_in_admin=1,min_num_in_admin=1, max_num_in_admin=1,num_extra_on_change=0)
--
if you want the user profile to replace the standar user profile on the
admin, add also:
AUTH_PROFILE_MODULE = 'myapp.UserProfile'
to your settings.py

Note: The user profile part was taken from this useful blog entry on James
Bennet site:
http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user-model

I link the models the way I want to with a unique ForeignKey (or at
> least I think I do), but the inline editing is backwards and illogical
> (and doesn't work anyway). That is, for each of the person types, I
> want to edit the fields of a Profile instance inline, not the other
> way around.
>
> Does that make sense? If so, any suggestions on how to do what I want,
> or how to rethink the problem?


Yes, it is intendend to work that way.

I hope this helps you.
Ariel.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---