How to ordered comments by date ???

2010-04-16 Thread Ariel
Hi everybody:

I have a little question that is simple but I haven't found it in the
documentation.
How could I order the comments by date ???
This is when I show them in the template:
{% load comments %}

{% get_comment_list for object as comment_list %}

{% for comment in comment_list %}
{{ comment.submit_date|time:"H:i"}}

{{ comment.user_name}}
{{ comment.comment}}
{% endfor %}

How could I order the comments ???
Thanks in advance.
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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to ordered comments by date ???

2010-04-16 Thread Ariel
Thank you very much for yours answers.

On Fri, Apr 16, 2010 at 12:24 PM, Owen Nelson  wrote:

> The comments are already ordered... by pk I assume, which would mean
> they are also ordered by date (unless you're messing with the comment
> id's or the dates themselves).
> If you simply want to switch the order from ascending to descending,
> maybe try the "reversed" parameter for the "for" tag:
> http://docs.djangoproject.com/en/dev/ref/templates/builtins/#for
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



I have a problem with the pagination with haystack and apache solr

2010-04-19 Thread Ariel
Hi everybody:
I have a big problem with pagination using apache solr and haystack, this is
what it is happening: I have a site where the news are being indexing with
haystack and solr, but the problem is that when a I make the search the
pagination is showing me more match results that what really exists even
more results that total news in my database, for example I have only 20 news
in the database but when I make a search the pagination said 40 matching
results are found then when I navigate with the "next" link to see the other
results any result is showed.

I hope I have made a good explanation of my problem.
Could you help me please ???
I don't know why it is happening that 
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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I have a problem with the pagination with haystack and apache solr

2010-04-22 Thread Ariel
I don't know how to know that because I don't know the name of the fields in
the index.
How could I know it ???
Regards
Ariel

On Wed, Apr 21, 2010 at 4:40 AM, Ray McBride  wrote:

> How many results are returned when you search using the solr admin
> interface?
>
> Are you using the code that I posted for you previously?
>
> Ray
>
> On Apr 19, 6:29 pm, Ariel  wrote:
> > Hi everybody:
> > I have a big problem with pagination using apache solr and haystack, this
> is
> > what it is happening: I have a site where the news are being indexing
> with
> > haystack and solr, but the problem is that when a I make the search the
> > pagination is showing me more match results that what really exists even
> > more results that total news in my database, for example I have only 20
> news
> > in the database but when I make a search the pagination said 40 matching
> > results are found then when I navigate with the "next" link to see the
> other
> > results any result is showed.
> >
> > I hope I have made a good explanation of my problem.
> > Could you help me please ???
> > I don't know why it is happening that 
> > 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-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> > For more options, visit this group athttp://
> groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



Re: I have a problem with the pagination with haystack and apache solr

2010-04-23 Thread Ariel
What I do here in search_indexes.py is this:

from haystack import site
from atl_cms.content_type.models import News, Document

site.register(News)
site.register(Document)




On Fri, Apr 23, 2010 at 4:18 AM, Ray McBride  wrote:

> You should have defined the fields yourself in you search_indexes.py
> file in your app
>
> http://docs.haystacksearch.org/dev/searchindex_api.html#quick-start
>
> Solr knows about these because you copy your generated schema.xml file
> into the conf folder
>
> Ray
>
> On Apr 22, 6:46 pm, Ariel  wrote:
> > I don't know how to know that because I don't know the name of the fields
> in
> > the index.
> > How could I know it ???
> > Regards
> > Ariel
> >
> >
> >
> >
> >
> > On Wed, Apr 21, 2010 at 4:40 AM, Ray McBride 
> wrote:
> > > How many results are returned when you search using the solr admin
> > > interface?
> >
> > > Are you using the code that I posted for you previously?
> >
> > > Ray
> >
> > > On Apr 19, 6:29 pm, Ariel  wrote:
> > > > Hi everybody:
> > > > I have a big problem with pagination using apache solr and haystack,
> this
> > > is
> > > > what it is happening: I have a site where the news are being indexing
> > > with
> > > > haystack and solr, but the problem is that when a I make the search
> the
> > > > pagination is showing me more match results that what really exists
> even
> > > > more results that total news in my database, for example I have only
> 20
> > > news
> > > > in the database but when I make a search the pagination said 40
> matching
> > > > results are found then when I navigate with the "next" link to see
> the
> > > other
> > > > results any result is showed.
> >
> > > > I hope I have made a good explanation of my problem.
> > > > Could you help me please ???
> > > > I don't know why it is happening that 
> > > > 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-us...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > django-users+unsubscr...@googlegroups.com
> 
> > > .
> > > > For more options, visit this group athttp://
> > > groups.google.com/group/django-users?hl=en.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Django users" group.
> > > To post to this group, send email to django-us...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > django-users+unsubscr...@googlegroups.com
> 
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/django-users?hl=en.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> > For more options, visit this group athttp://
> groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



Re: I have a problem with the pagination with haystack and apache solr

2010-04-23 Thread Ariel
Where does the apache solr save the index ???

On Fri, Apr 23, 2010 at 1:23 PM, Ariel  wrote:

> What I do here in search_indexes.py is this:
>
> from haystack import site
> from atl_cms.content_type.models import News, Document
>
> site.register(News)
> site.register(Document)
>
>
>
>
>
> On Fri, Apr 23, 2010 at 4:18 AM, Ray McBride wrote:
>
>> You should have defined the fields yourself in you search_indexes.py
>> file in your app
>>
>> http://docs.haystacksearch.org/dev/searchindex_api.html#quick-start
>>
>> Solr knows about these because you copy your generated schema.xml file
>> into the conf folder
>>
>> Ray
>>
>> On Apr 22, 6:46 pm, Ariel  wrote:
>> > I don't know how to know that because I don't know the name of the
>> fields in
>> > the index.
>> > How could I know it ???
>> > Regards
>> > Ariel
>> >
>> >
>> >
>> >
>> >
>> > On Wed, Apr 21, 2010 at 4:40 AM, Ray McBride 
>> wrote:
>> > > How many results are returned when you search using the solr admin
>> > > interface?
>> >
>> > > Are you using the code that I posted for you previously?
>> >
>> > > Ray
>> >
>> > > On Apr 19, 6:29 pm, Ariel  wrote:
>> > > > Hi everybody:
>> > > > I have a big problem with pagination using apache solr and haystack,
>> this
>> > > is
>> > > > what it is happening: I have a site where the news are being
>> indexing
>> > > with
>> > > > haystack and solr, but the problem is that when a I make the search
>> the
>> > > > pagination is showing me more match results that what really exists
>> even
>> > > > more results that total news in my database, for example I have only
>> 20
>> > > news
>> > > > in the database but when I make a search the pagination said 40
>> matching
>> > > > results are found then when I navigate with the "next" link to see
>> the
>> > > other
>> > > > results any result is showed.
>> >
>> > > > I hope I have made a good explanation of my problem.
>> > > > Could you help me please ???
>> > > > I don't know why it is happening that 
>> > > > 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-us...@googlegroups.com.
>> > > > To unsubscribe from this group, send email to
>> > > django-users+unsubscr...@googlegroups.com
>> 
>> > > .
>> > > > For more options, visit this group athttp://
>> > > groups.google.com/group/django-users?hl=en.
>> >
>> > > --
>> > > You received this message because you are subscribed to the Google
>> Groups
>> > > "Django users" group.
>> > > To post to this group, send email to django-us...@googlegroups.com.
>> > > To unsubscribe from this group, send email to
>> > > django-users+unsubscr...@googlegroups.com
>> 
>> > > .
>> > > For more options, visit this group at
>> > >http://groups.google.com/group/django-users?hl=en.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups "Django users" group.
>> > To post to this group, send email to django-us...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com
>> .
>> > For more options, visit this group athttp://
>> groups.google.com/group/django-users?hl=en.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>

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



How do I set my default language ???

2010-06-11 Thread Ariel
Hi everybody, I write in my settings.py LANGUAGE_CODE = 'fr' to make french
the default language but it does'nt seem to work because the spanish is
still the default language, Do I need to do something else to make french
the default language ???
I need help !!!
Thanks in advanced
Regards

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



ImproperlyConfigured: Error importing middleware django.middleware.csrf: "No module named csrf" on Windows XP

2010-08-06 Thread Ariel
Hi everybody, I am working on windows XP with django 1.2, I have downloaded
a django web aplication but I continuely get a message error like this:
"ImproperlyConfigured: Error importing middleware django.middleware.csrf:
"No module named csrf" I have not idea why this is happening, could you help
please ??? How could I fix that ???
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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



How to log all the error and warning messages with apache ???

2010-11-02 Thread Ariel
Hi everybody:

This is a configuration question I am having an error in a django website
that is hosted in a debian apache mysql server, I have DEPLOY_DEBUG = True
but the error is not showed when is raised, I have searched in some logs
files like /var/log/syslog , error.log and access.log but the errors are no
record in there.

Could you help me please, how can I registered in logs files all the errors
of the django aplications with apache ???
I need help urgent.
I would thanks any help.
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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



About generated html forms with django

2010-01-22 Thread Ariel
Hi everybody:
I need to make an automatic admin interface with a behaviour similar to the
Django's default admin interface but not totally equal, then I need to know
how django generate all the html forms and views methods for any class
included in the model, how does django do that ??? Where are the classes
that control all the generated html forms and views methods ???
How could I make this ???
Could you help me ?
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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: About generated html forms with django

2010-01-22 Thread Ariel
Why is this http://github.com/bartTC/django-frontendadmin helpfull ???

Regards
Ariel

On Fri, Jan 22, 2010 at 12:00 PM, Daniel Hilton wrote:

> 2010/1/22 Ariel :
>  > Hi everybody:
> > I need to make an automatic admin interface with a behaviour similar to
> the
> > Django's default admin interface but not totally equal, then I need to
> know
> > how django generate all the html forms and views methods for any class
> > included in the model, how does django do that ??? Where are the classes
> > that control all the generated html forms and views methods ???
> > How could I make this ???
> > Could you help me ?
> > Thanks in advance
> > Ariel
>
> Django-frontendadmin may help you:
>
> http://github.com/bartTC/django-frontendadmin
>
> You'll need to read the forms documentation as well though and have an
> understanding of the basics of form processing:
> http://www.djangobook.com/en/2.0/chapter07/
>
> HTH
> Dan
>
>
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com
> .
> > For more options, visit this group at
> > http://groups.google.com/group/django-users?hl=en.
> >
>
>
>
> --
> Dan Hilton
> 
> www.twitter.com/danhilton
> www.DanHilton.co.uk <http://www.danhilton.co.uk/>
> 
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



Re: About generated html forms with django

2010-01-22 Thread Ariel
I am asking you that because I am having problems to download it.



On Fri, Jan 22, 2010 at 12:13 PM, Ariel  wrote:

> Why is this http://github.com/bartTC/django-frontendadmin helpfull ???
>
> Regards
> Ariel
>
>   On Fri, Jan 22, 2010 at 12:00 PM, Daniel Hilton  > wrote:
>
>> 2010/1/22 Ariel :
>>  > Hi everybody:
>> > I need to make an automatic admin interface with a behaviour similar to
>> the
>> > Django's default admin interface but not totally equal, then I need to
>> know
>> > how django generate all the html forms and views methods for any class
>> > included in the model, how does django do that ??? Where are the classes
>> > that control all the generated html forms and views methods ???
>> > How could I make this ???
>> > Could you help me ?
>> > Thanks in advance
>> > Ariel
>>
>> Django-frontendadmin may help you:
>>
>> http://github.com/bartTC/django-frontendadmin
>>
>> You'll need to read the forms documentation as well though and have an
>> understanding of the basics of form processing:
>> http://www.djangobook.com/en/2.0/chapter07/
>>
>> HTH
>> Dan
>>
>>
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups
>> > "Django users" group.
>> > To post to this group, send email to django-us...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > django-users+unsubscr...@googlegroups.com
>> .
>> > For more options, visit this group at
>> > http://groups.google.com/group/django-users?hl=en.
>> >
>>
>>
>>
>> --
>> Dan Hilton
>> 
>> www.twitter.com/danhilton
>> www.DanHilton.co.uk <http://www.danhilton.co.uk/>
>> 
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>

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



How to serialize objects that contain a foreign key object

2010-02-09 Thread Ariel
I need to serialize a an object that has a foreign key object for example:
I have this model:

class Town(models.Model):
name = models.CharField(max_length=50)
extension = models.IntegerPositiveField()

class Restaurant(models.Model):
hot_dogs = models.BooleanField()
town = models.ForeignKey(Town)


from django.core import serializers

json_serializer  = serializers.get_serializer("json")
data = json_serializer.serialize(Restaurant.objects.alI(),
ensure_ascii=False)

But problem is that when the list of restaurant objects are serialized only
the primary key of the town object is serialized but not the name and the
extension, this is what I get:
[ {pk : '1', hot_dogs: 'True' , town: '1'}, {pk : '2', hot_dogs: 'False' ,
town: '1'}, {pk : '3', hot_dogs: 'True' , town: '2'} ]

And I would want to get the name and the extension of the town foreign key
object too.
I hope you can help me

Thanks in advance.
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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to serialize objects that contain a foreign key object

2010-02-10 Thread Ariel
I am using version 1.1, Could I do the same with 1.1 version ???

On Wed, Feb 10, 2010 at 7:39 AM, diofeher  wrote:

> Django 1.2 comes with a parameter [1] at serializers that do this for
> you.
>
> http://docs.djangoproject.com/en/dev/topics/serialization/#natural-keys
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



How to make pagination with haystack

2010-04-08 Thread Ariel
Hi everybody:
I am relatively newbie in django, I have an application with search
functionalities that's why I am using haystack with solr, the search work
perfectly but I need to make the pagination but I have not idea how to do
it, could you give some help ??? how to do it ???
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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to make pagination with haystack

2010-04-08 Thread Ariel
That variables in the piece of code that you have given are automatically
passed by the faceted view of the haystack to the search.html template ???

On Thu, Apr 8, 2010 at 10:43 AM, Ray McBride  wrote:

> Try
>
> {% with page as page_obj %}
> {% paginate %}
> {% endwith %}
>
> Ray
>
> On Apr 8, 2:57 pm, Ariel  wrote:
> > Hi everybody:
> > I am relatively newbie in django, I have an application with search
> > functionalities that's why I am using haystack with solr, the search work
> > perfectly but I need to make the pagination but I have not idea how to do
> > it, could you give some help ??? how to do it ???
> > 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-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



Problems with comment form customization ?

2010-04-12 Thread Ariel
Hi everybody:

I am implementing comments functionalities in my web application, I am
making the documentation examples.
I have customized my comment form exaxtly like the documentation:

{% get_comment_form for document as form %}

  {{ form }}
  

  


But the thing is that a field that is suppossed to be hidden is
visible and that is what I don't want, the field name is 'honeypot'
This is a normal behavior ?
Do anyone of you know how to make that field hidden again ???
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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Problems with comment form customization ?

2010-04-13 Thread Ariel
Well that really solve the problem.
Now I have a new question: if I want to reduce de amount of columns that the
textarea has, how could I do it ? This is not as simple as the previous
issue.
Thanks in advance.
Regards
Ariel

On Mon, Apr 12, 2010 at 3:58 PM, bax...@gretschpages.com <
mail.bax...@gmail.com> wrote:

> There are several ways you can do it, but probably the most
> straightforward is how django does it in the first place:
>
> {% for field in form %}
>{% if field.is_hidden %}
>  {{ field }}
>{% else %}
>  {% if field.errors %}{{ field.errors }}{% endif %}
>  {% if field.errors %} class="error"{% endif %}
>{% ifequal field.name "honeypot" %} style="display:none;"{%
> endifequal %}>
>{{ field.label_tag }} {{ field }}
>  
>{% endif %}
>  {% endfor %}
>
> Looping through the fields, and if the field is honeypot, setting
> display:none
>
> That's all in django/contrib/comments/templates/comments/form.html
>
>
> On Apr 12, 2:35 pm, Ariel  wrote:
> > Hi everybody:
> >
> > I am implementing comments functionalities in my web application, I am
> > making the documentation examples.
> > I have customized my comment form exaxtly like the documentation:
> >
> > {% get_comment_form for document as form %}
> > 
> >   {{ form }}
> >   
> >  > value="Preview">
> >   
> > 
> >
> > But the thing is that a field that is suppossed to be hidden is
> > visible and that is what I don't want, the field name is 'honeypot'
> > This is a normal behavior ?
> > Do anyone of you know how to make that field hidden again ???
> > 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-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



Re: Problems with comment form customization ?

2010-04-13 Thread Ariel
That's the same I do, but if you don't take off the cols property and you
set a width size smaller than that amount of cols then the textarea shows an
ugly horizontal scroll, that I want to avoid.
Could anybody knows how to solve that ???


On Tue, Apr 13, 2010 at 4:13 PM, bax...@gretschpages.com <
mail.bax...@gmail.com> wrote:

> Personally, I just set the width of textareas in my CSS and call it a
> day.
>
> On Apr 13, 2:35 pm, Ariel  wrote:
> > if I want to reduce de amount of columns that the
> > textarea has, how could I do it ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



Problem sending an email in html with mime image

2012-02-01 Thread Ariel
Hi everybody I have a question, here is my problem I want to send an
email with content in html with an image embed so I converted the
image binary in mime text and then I put the mime code inside the src
attribute of the html like this:



Then I send the email, here is my code:

from django.template.loader import render_to_string
from django.core.mail.message import EmailMultiAlternatives

contextcopy = {}
message = render_to_string('bulletin.html', contextcopy)
subject = "TEST"
msg = EmailMultiAlternatives(subject, message,
from_email,['myem...@gmail.com''])
msg.attach_alternative(message, "text/html")
msg.send()

The problem is that if I don't put the image mime code inside the src
the email is sent but when I put the code then the email is not send
and I don't get any error message.

Could somebody please, help me ???
Why the email is not send when I put the mime code of the image in the html ???

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.



How do I decode a string that it is received by a filter ???

2011-04-25 Thread Ariel
I have the following problem, I have made a template filter that process a
string, but when the string that is passed to the filter has a non-ascii
character then I received that string in the filter codified, how can I
decode the string ???

For instance: in the template html I have the following code:

{{object.name|tag_process}}

But the name = "español" , the character ñ'' it is pass to the tag_process
filter as C3%B1, then the string I received in the tag_process function is
espaC3%B1ol instead of 'español', How can I solved that ???

Please I need you help.
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: How do I decode a string that it is received by a filter ???

2011-04-25 Thread Ariel
The site is deploy in an apache server, that does not help.
Do you have any other idea ???
I thought this would be very easy to solve.

I'd thanks any help.
Regards
Ariel


On Mon, Apr 25, 2011 at 6:21 PM, Oleg Lomaka  wrote:

> Not sure if it helps in your case, but try to start django in UTF-8 locale.
> For example,
>
> LANG=en_US.UTF-8 ./manage.py runserver
>
>
> On Mon, Apr 25, 2011 at 6:23 PM, Ariel  wrote:
>
>> I have the following problem, I have made a template filter that process a
>> string, but when the string that is passed to the filter has a non-ascii
>> character then I received that string in the filter codified, how can I
>> decode the string ???
>>
>> For instance: in the template html I have the following code:
>>
>> {{object.name|tag_process}}
>>
>> But the name = "español" , the character ñ'' it is pass to the tag_process
>> filter as C3%B1, then the string I received in the tag_process function is
>> espaC3%B1ol instead of 'español', How can I solved that ???
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

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



Problem uploading images and videos with filenames containing not ascii characters

2011-05-02 Thread Ariel
Hi everybody:

How Can I solve this, I have a form to upload videos and images but when a
video or image with a filename containing not ascii characters is uploaded
then I get the following error:
Django Version: 1.2.1  Exception Type: UnicodeEncodeError  Exception Value:

'ascii' codec can't encode characters in position 65-68: ordinal not
in range(128)

 Exception Location: /usr/lib/python2.5/posixpath.py in exists, line
171  Python
Executable: /usr/bin/python  Python Version: 2.5.2
How can I solve this problem ???
Any help is really appreciatte it.

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: Problem uploading images and videos with filenames containing not ascii characters

2011-05-03 Thread Ariel
In my apache enviroment settings I have already set that:

export LANG='en_US.UTF-8'
export LC_ALL='en_US.UTF-8'

But I still get the same error. Bedsides I am using wsgi no modpython.

Please, could somebody help me ???
Regards
Thanks in advance.
Ariel


On Tue, May 3, 2011 at 1:40 PM, Karen Tracey  wrote:

> You need to set up the environment/locale for your server so that Python
> will allow non-ascii characters in filenames. See:
> http://docs.djangoproject.com/en/1.3/howto/deployment/modpython/#if-you-get-a-unicodeencodeerror
>
> Karen
> --
> http://tracey.org/kmt/
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

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



Re: Problem uploading images and videos with filenames containing not ascii characters

2011-05-03 Thread Ariel
Yes, only on the production enviroment.

Regards

2011/5/3 А. Р. <4d876...@gmail.com>

> 2011/5/3 Ariel <...@gmail.com>:
> > In my apache enviroment settings I have already set that:
> >
> > export LANG='en_US.UTF-8'
> > export LC_ALL='en_US.UTF-8'
> >
> > But I still get the same error. Bedsides I am using wsgi no modpython.
> >
> > Please, could somebody help me ???
> > Regards
> > Thanks in advance.
> > Ariel
> >
>
> You're getting this on the production environment only?
> Anyway, there is not enough information.
> All I can propose is using winpdb for debug:
> http://code.djangoproject.com/wiki/DebuggingDjangoWithWinpdb
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



Re: Problem uploading images and videos with filenames containing not ascii characters

2011-05-04 Thread Ariel
I am using debian 6 in spanish.

On Wed, May 4, 2011 at 2:41 AM, Karen Tracey  wrote:

> On Tue, May 3, 2011 at 10:22 AM, Ariel  wrote:
>
>> In my apache enviroment settings I have already set that:
>>
>> export LANG='en_US.UTF-8'
>> export LC_ALL='en_US.UTF-8'
>>
>> But I still get the same error. Bedsides I am using wsgi no modpython.
>>
>
> modpython/mod_wsgi makes no difference, that note really should be in
> someplace non-specific to the deployment method. This is fundamentally a
> Python issue: Python thinks the only encoding supported by the file system
> is ascii, so it tries to convert all file names to ascii only.
>
> I've heard of times when setting the environment vars hasn't worked -- the
> problem then was that the installed locale support on the machine was
> insufficient to allow setting the locale to anything other than C. See for
> example: http://code.djangoproject.com/wiki/ExpectedTestFailures
>
> How to fix it will depend on what OS you are using; the instructions for
> Ubuntu are on that referenced page and I have no idea how to do anything
> similar on other distros. But maybe someone else could give a clue if you
> mentioned what OS you are using.
>
>
> Karen
> --
> http://tracey.org/kmt/
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-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: Odp: Re: Problem uploading images and videos with filenames containing not ascii characters

2011-05-04 Thread Ariel
And how can I change the filename of the image when it is uploaded ???

2011/5/4 urukay 

> Or try to change the name of the file when uploading the image/file.
> That's how solved it. Had couple problems with it also in development
> enviroment and now it's working ok. Haven't tested yet in production,
> but it should work too.
>
> Radovan
>
> On 3. Máj, 22:56 h., Tomasz Zieliński
>  wrote:
> > W dniu wtorek, 3 maja 2011, 21:34:28 UTC+2 użytkownik Ariel napisał:
> >
> > > Yes, only on the production enviroment.
> >
> > Try to create a file with UTF8 characters in its name, from your code.
> > Then you'll know if those Apache settings are in effect.
> >
> > --
> > Tomasz Zielinski
> > pyconsultant.eu
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



How to make comment view redirect me directly to my next field instead to preview view

2011-06-29 Thread Ariel
Hi everybody, I am using comments framework in django, but I need that when
the comment form is not valid the comment post view doens't send me to a
preview view to show me the errors in the form instead of that I need the
view send me directly to the 'next' url and show me there the form errors.
Any Idea how to solve that ?
Help it is really appreciate it.

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.



I get an error when I used urllib2.urlopen() to open a remote file in a ftp server

2011-01-06 Thread Ariel
Hi everybody:

I get an error when I used urllib2.urlopen() to open a remote file in a ftp
server, what I am trying to do is to make a view to force the browser to
download a file to disk instead of playing or displaying it. My code is the
following:

file = 'ftp:/16.168.250.14:2189/RTVE/VIDEOS/Thisisit.wmv'
mydata = urllib2.urlopen(file)
response = HttpResponse(mydata, mimetype='video/mpeg')
response['Content-Disposition'] = 'attachment; filename=video.wmv'
response['url'] = file
return response

But I get an error 'no host given':

  File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
  File "/usr/lib/python2.6/urllib2.py", line 391, in open
response = self._open(req, data)
  File "/usr/lib/python2.6/urllib2.py", line 409, in _open
'_open', req)
  File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
result = func(*args)
  File "/usr/lib/python2.6/urllib2.py", line 1316, in ftp_open
    raise URLError('ftp error: no host given')
URLError: 

Any idea how to solve this ? Could you help me please ?
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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Problem with comments framework

2011-01-13 Thread Ariel
Hi everybody, I have a problem with comments I have done everything as said
in http://docs.djangoproject.com/en/1.2/ref/contrib/comments/ but I have a
problem that I don't know how to solve when I post a comment I get this
error:

Exception Type: TemplateDoesNotExist  Exception Value:

comments/comment_user_notification.txt


Have you any idea how to solve this problem ?
I would thanks any help.
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: Problem with comments framework

2011-01-14 Thread Ariel
Thank you for your response,.

Well, I have define the template:

comments/comment_user_notification.txt

but any comment is displayed.

Regards
Ariel


On Thu, Jan 13, 2011 at 10:43 AM, Xavier Ordoquy wrote:

> Hi,
>
> You may want to have a look at:
>
> http://docs.djangoproject.com/en/1.2/ref/contrib/comments/moderation/#django.contrib.comments.moderation.CommentModerator.email_notification
>
> Or define a template name comments/comment_user_notification.txt as stated
> by the exception :)
>
> Regards,
> Xavier.
>
> Le 13 janv. 2011 à 16:30, Ariel a écrit :
>
> Hi everybody, I have a problem with comments I have done everything as said
> in http://docs.djangoproject.com/en/1.2/ref/contrib/comments/ but I have a
> problem that I don't know how to solve when I post a comment I get this
> error:
>
> Exception Type: TemplateDoesNotExist  Exception Value:
>
> comments/comment_user_notification.txt
>
>
> Have you any idea how to solve this problem ?
> I would thanks any help.
> 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.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

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



It is a good practice to use logging in the webs applications based on django ???

2011-01-26 Thread Ariel
I would want to know if it is a good practice to use the logging python
module in the web applications based on django ??? The performance is
severily affected ???


Thanks for your attention.
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.



Problem using inheritance in third level: object has not attribute content_ptr_id

2011-02-22 Thread Ariel
Hi every body:
I have a problem making a hierarchy of objects in my project. For example I
have a class Thing in the first level that inherited from model, then I have
a class Content who inherites from Thing in the second level, another class
named Book inherited from Content.
The problem is that when I am going to save a Book object in the dango admin
backend then I get an error: "object has not attribute content_ptr_id" , I
don't understand why does this happen, when I save an object Content that
does not occur. I am using django 1.2.5 but when I try when dango 1.3 beta I
get the same error.
Could you help me please ???
How can I solve this error ???

Any help would be appreciate it.

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.



How to get next and previous element in a forloop in the template

2011-03-07 Thread Ariel
Hi everybody:

I would want to know in the django template tags how to get the next and the
previous element when I am iterating in the forloop, I haven't found
something similar, for instance I would want something like this:

{% for element in list_elements %}
{{forloop.get_prev_element.title}}
{{forloop.get_next_element.title}}

-- 
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 to get next and previous element in a forloop in the template

2011-03-07 Thread Ariel
Could you give some idea ???
I am sorry about the previous message I had not finished.

Any help is appreciated.
Regards.


On Mon, Mar 7, 2011 at 3:39 PM, Ariel  wrote:

> Hi everybody:
>
> I would want to know in the django template tags how to get the next and
> the previous element when I am iterating in the forloop, I haven't found
> something similar, for instance I would want something like this:
>
> {% for element in list_elements %}
> {{forloop.get_prev_element.title}}
> {{forloop.get_next_element.title}}
>

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



A question about field forms and the widget SelectMultiple

2011-04-06 Thread Ariel
Hi everybody, I have a form with a field that uses the SelectMultiple
widget:

class DocumentForm(forms.ModelForm):
   options = forms.CharField(label='Options', max_length=100
,widget=forms.SelectMultiple(attrs={'class':'listbox'}, choices=([(aspect.id,
unicode(aspect.title)) for aspect in aspects ])) , required=False)

How you can see the field is populated automacally from a list: "choices =
([(aspect.id, unicode(aspect.title)) for aspect in aspects ]))", this works
wonderfull when I am inserting in the database the document model.

But when I want to make an update over the document object I use the same
form and I populated the form like this:

myform = DocumentForm(instance= document)

I want that the listbox displayed with all the options available an the ones
that are inserted in the database with the document mark as selected.
For instance if all the options available are A, B, C, D and the document I
want to update has only the option A and C, I want in the list box options
A, B , C ,  D but option A and C mark as selected.

Could you please help me do that ?
How would you do it ?

Thanks in advance.
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: Why why why not write a search module for Django user?

2009-06-20 Thread Ariel Nunez
>
> But a generic permissions system ought to be a solved problem* by now.*
> A search function ought (and apparently is) a solved problem *by now.
> *
>

 If you repeat that enough times there would probably be a value of 'now'
that makes those statement true.
You just gotta be patient or/and help.

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: Setting up Django, Apache and Nginx on Windows Vista

2009-06-27 Thread Ariel Nunez
On Sat, Jun 27, 2009 at 12:09 PM, Duvalfan23  wrote:

>
> Well I actually have Wubi (Ubuntu inside Windows) on my computer, but
> do not feel nearly as comfortable as Windows since Ive been using
> Windows for years. I also have all of my development tools on Windows
> that Ive purchased. I do not get as good of productivity on Linux
> since Im not as used to it. So I was hoping to do all of my
> development on Windows as I need to get this done ASAP and do not
> really have time to learn Linux as well as I need to before I need to
> get this done. Any other suggestions from anyone would be
> appreciated..
>

And why not skip Apache, Nginx and even MySQL and develop using django and
sqlite?
Really if you are on the development stage focus on that and when you are
ready to deploy you can always come back to ask here on the list or read
over many of the tutorials available.

With something like Instant Django is just download, unzip and start using
Django in Windows.
http://www.instantdjango.com/

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: List of available projects

2009-05-18 Thread Ariel Nunez
Check out Pinax [1]
[1] http://pinaxproject.com


On Mon, May 18, 2009 at 1:20 PM, Mohan Parthasarathy wrote:

> Hi,
>
> Is there an official list of django projects - the code that can be reused
> or to start with. I have done a few tutorials but don't want to start
> writing everything from scratch. I googled and found a few. But wondering
> whether there are anything within Django site iself ?
>
> thanks
> mohan
>
>
> >
>

--~--~-~--~~~---~--~~
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: Admin css being weird

2009-05-23 Thread Ariel Nunez
Please make sure there isn't another Django version being loaded.
I experienced the same situation when I had copied admin media from one
version and the Django module loaded had another one. (i.e. Django 1.0
installed systemwide and Django 1.1 on a virtualenv)

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: Admin css being weird

2009-05-24 Thread Ariel Nunez
On Sun, May 24, 2009 at 10:03 AM, simonecare...@gmail.com <
simonecare...@gmail.com> wrote:

>
> Yes I have 2 Django version installed.
> But in the django.fcgi dispatcher I call the my Django Environment.
> How can I fix this issue?


I usually use it removing the 'other' version from my python path, usually
by uninstalling it.
If uninstalling the other one is not an option for you, try to find a way to
clear your python path before loading your 'preferred' Django.

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: find all points from a database, bound by a polygon

2009-05-28 Thread Ariel Nunez
On Thu, May 28, 2009 at 4:12 PM, nbv4  wrote:

>
> I have this model:
> 
> from django.contrib.gis.db import models
>
> class Base(models.Model):
>identifier  =   models.CharField(max_length=8,
> primary_key=True)
>local   =   models.CharField(max_length=8)
>iata=   models.CharField(max_length=8)
>name=   models.CharField(max_length=96)
>location=   models.PointField()
>
> 
>

*This(or similar) may work:*

*
*

>>>from django.contrib.gis.gdal.envelope import Envelope

>>>bbox=Envelope((-104.609252, 29.763374, -95.23506, 38.971823))
*>>>Base.objects.filter(location__intersects=bbox)*

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: find all points from a database, bound by a polygon

2009-05-28 Thread Ariel Nunez
>
> >>> from django.contrib.gis.gdal.envelope import Envelope
>
>>> W = 39.9; N = -82.9; E=40.4; S=-82.2
>
 >>> bounds = Envelope((N, W, S, E, ))
> >>> Base.objects.filter(location__intersects=bounds.wkt)
>

Then try calingl the wkt methond on the Envelope object to get a proper
string repr of the polygon.

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: find all points from a database, bound by a polygon

2009-05-28 Thread Ariel Nunez
>
> > Then try calingl the wkt methond on the Envelope object to get a proper
> > string repr of the polygon.
> >
>

What is even more amazing is how many typos are in that sentence. I should
make my default font bigger so I notice them better.

Glad it works,

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: Help make matriz

2009-05-29 Thread Ariel Nunez
Carlos, all the info you need to enable the admin and customize it for your
app is on this page:

http://docs.djangoproject.com/en/dev/intro/tutorial02/

Specifically, look for 'list_display' and put there all the columns you want
to see on the admin interface for your model.

Ariel.

PS:
If you need more support, tell us more about how far have you been able to
go:
- Have you enabled the admin interface?
- Have you created and admin.py file for your app?
- Have you created a PruebaAdmin(models.ModelAdmin) class?

--~--~-~--~~~---~--~~
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 to cut and paste image into django app

2009-10-23 Thread Ariel Nunez

Hi Margie,

I found this while googling: "drag and drop upload":

http://www.radinks.com/upload/dnd.php

Seems to use a combination of Java (applet) + PHP (server) and is not  
open source.

But it seems to prove it is possible. Just perhaps not with simple  
HTML + JS.

Regards,

Ariel.

On Oct 23, 2009, at 9:28 AM, Javier Guerra wrote:

>
> On Thu, Oct 22, 2009 at 11:54 PM, Margie Roginski
>  wrote:
>>  They want to use
>> an windows app called mwsnap to basically snap images from their
>> desktop, then ctrl-v to copy the image into my django app.
>
> is there any web app that does this?  AFAICT, all use some upload
> button (maybe augmented with flash libraries, like the great one from
> http://swupload.org/)
>
> -- 
> Javier
>
> >


--~--~-~--~~~---~--~~
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: Issue with ManyToMany Relationships not updating inmediatly after save

2009-12-17 Thread Ariel Nunez
Diego,

Which version of Django are you using?

I remember a refactor of m2m landed recently as part of Alex's GSoC project.
[1]

Just my 2 Colombian Pesos.

[1] http://www.pubbs.net/django/200910/58391/

On Thu, Dec 17, 2009 at 5:51 PM, Diego Andrés Sanabria Martin (diegueus9) <
diegue...@gmail.com> wrote:

> Hi,
>
> I'ḿ having issues with ManytoMany Relationships that are not updating
> in a model when I save it (via the admin) and try to use the new value
> within a
> function attached to the post_save signal or within the save_model of
> the associated AdminModel.
> I've tried to reload the object within those functions by using the
> get function with the id.. but it still has the old values.
>
> Is this a transaction issue? Is there a signal throwed when the
> transaction ends?
>
> Thanks,
>
> --
> Diego Andrés Sanabria
> Developer at monoku.com
> about:me http://www.google.com/profiles/diegueus9
> cel 3015290609
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
>

--

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




Thanks for (Geo)Django

2009-12-23 Thread Ariel Nunez
I just saw a commit referencing the new geography column support on
Postgis and felt the urge to drop a public thank you note to Justin
and all the other folks behind GeoDjango and Django.

(Geo)Django has done a lot for me in the past 3 years, not only
becoming a source of income; but, more importantly, a source of
inspiration!

Thanks to the django core dev team (including of course the one that
has been unusually quiet in the past few months), to the bug triagers,
to the ones that come up with feature requests over and over, and even
the ones that start flame wars that do not last long thanks to the
general polite and respectful atmosphere enforced by most people here.

Thanks one more time, I hope you all enjoy a lot what's little left of
this year, and especially take enough the time away from the computers
to enjoy with your family.

Regards,

A happy django user.

--
Ariel Núñez // Geoweb Developer
Barranquilla // Colombia // South America
http://ingenieroariel.com

--

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




Re: Accessing request object in templates

2008-01-03 Thread Ariel Calzada

venkata subramanian wrote:
> Hi,
>  I had a problem recently.
>  To access the request object in all of my templates.
>  The solution I got surprised me. It involved explicitly passing on
> the request object from the views.
>  (Example, to pass a RequestContext object as a context_instance
> parameter in render_to_response method).
>
> It surprised me because since request object is available to every
> view, why should the request
> object not be accessible in all templates by default?
>
> I am just eager to understand this design decision.
>
> Thanks.
>
> >
>
>   
You can do it

in settings.py add:

TEMPLATE_CONTEXT_PROCESSORS = (
 'django.core.context_processors.auth',
'django.core.context_processors.request',
)

and in every view import:

from django.template  import RequestContext

adn finally when you make a render to response:

return render_to_response ( "TEMPLATEFILE",   {},  context_instance = 
RequestContext ( request ),  )

ARIEL ( 000PaRaDoX000 )






--~--~-~--~~~---~--~~
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: Decimal separator

2008-01-31 Thread Ariel Calzada

Mauro Sánchez wrote:
> Hello.
> How can I establish the comma ',' as the decimal separator?
> Is there any config file where I should set it up?
> Thanks.
> Mauro.
>
> >
>
>   
You should look at the locale configuration

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: Time.sleep & HttpResponse

2007-12-17 Thread Ariel Calzada

l5x wrote:
> "I propose to design and implement an API to make Comet behavior
> available to Django applications."
> http://hosted.corp.it/django/full.html
> >
>
>   
Good Idea :-)

--~--~-~--~~~---~--~~
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: [ANN] Django 1.4.2 and 1.3.4 remedy security issues

2012-10-17 Thread Ariel Calzada
How to upgrade?
El 17/10/2012 18:37, "Ross Poulton"  escribió:

> Django==1.3.4 doesn't appear to be on Pypi, is it likely to be there soon?
>
> On Thursday, 18 October 2012 09:38:49 UTC+11, James Bennett wrote:
>>
>> Django 1.4.2 and 1.3.4 have just been released in response to a
>> security issue reported to us.
>>
>> Details are here:
>>
>> https://www.djangoproject.com/**weblog/2012/oct/17/security/
>>
>> Everyone is encouraged to upgrade.
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/dGLC9Oh_V5gJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

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



Re: Theming Django with Diazo/XSLT

2012-12-18 Thread Ariel Calzada
Hi Michael!

Django doesn't use approach of DIAZO/XSLT theming by default. You can use
diazo in an indepedently way ( WSGI
http://docs.diazo.org/en/latest/quickstart.html ).

Regards,
ARIEL

2012/12/18 4 The good Life we work <4thegdl...@googlemail.com>

> Hallo Derek,
>
> thank for your reply. I was thinking about the templates.
> The admin area is fine for now, though it could be changed through
> diazo too if needed.
>
> Thanks,
> Michael
>
> On Tue 18 Dec 2012 08:28:12 AM CET, Derek wrote:
> > You do not say which part of Django you need to theme.  Assuming its
> > the admin, I suggest you look at Grappelli[1] as they have done
> > extensive work in  theming. You could either provide your own CSS and
> > override any templates as needed; or start from scratch but with their
> > approach/code as an example.
> >
> > Derek
> >
> > [1] https://django-grappelli.readthedocs.org/en/latest/index.html
> >
> > On Friday, 14 December 2012 23:55:31 UTC+2, 4 The good Life we work
> wrote:
> >
> > Hallo,
> >
> > I'm used to theme Plone with Diazo/ <http://www.diazo.org/>XSLT.
> > <http://www.diazo.org/>
> > Is there any tutorial for Django?
> >
> > Thanks,
> > Michael
> >
>
> --
> 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.
>
>


-- 
La Salvaje Esperanza

Éramos dioses y nos volvieron esclavos.
Éramos hijos del sol y nos consolaron
con medallas de lata.
Éramos poetas y nos pusieron a recitar
oraciones pordioseras.
Éramos felices y nos civilizaron.
Quién refrescará la memoria de la tribu.
Quién revivirá nuestros dioses.
Que la salvaje esperanza siempre sea tuya, querida alma inamansable.

-Gonzalo Arango-

-- 
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: Happy new year

2012-12-31 Thread Ariel Calzada
Happy new year from Colombia
El 31/12/2012 16:42,  escribió:

> Happy new year from spain to all django lovers.
> I wish you a new year with tons of django projects.
>
> Cheers
> Cingusoft
> BlackBerry de movistar, allí donde estés está tu oficin@
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



How to make a field required in admin site

2013-01-30 Thread Ariel Isaac
Hi everybody,

I have a model inherited from a third application call Video in that
model they have the thumbnail field with blank = True, this make in
the admin site that user could left in blank the thumbnail field,
that's something I don't want to happen, I want to make in the
admin.py in VideoAdmin the field thumbnail required, how is possible
that ??? anybody knows how to achieve that ???

I am working with django 1.3

Regards,
Ariel

-- 
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+unsubscr...@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: How to make a field required in admin site

2013-01-30 Thread Ariel Isaac
It is a third application I can't do that, that's why I want to do it in
the adminModel.

Could you help me please ???



On Wed, Jan 30, 2013 at 10:34 AM, Black9design.com
wrote:

> Remove the line blank=True and it will be required.
>
> On Jan 30, 2013, at 7:01 AM, Ariel Isaac  wrote:
>
> > Hi everybody,
> >
> > I have a model inherited from a third application call Video in that
> > model they have the thumbnail field with blank = True, this make in
> > the admin site that user could left in blank the thumbnail field,
> > that's something I don't want to happen, I want to make in the
> > admin.py in VideoAdmin the field thumbnail required, how is possible
> > that ??? anybody knows how to achieve that ???
> >
> > I am working with django 1.3
> >
> > Regards,
> > Ariel
> >
> > --
> > 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+unsubscr...@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+unsubscr...@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+unsubscr...@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.




MultipleFileField

2013-03-10 Thread Ariel Calzada

Hi!

I have a model Person with the fields = name, lastname, papers ( 
many2many field of the model Paper ) and a model Paper with fields = 
title, file


I want in a ModelForm of Person let user insert many papers. I've been 
trying with a django app that implements a new MultiFileField without luck.


Any suggestion or help will be appreciated.

Regards,
ARIEL

--
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+unsubscr...@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: MultipleFileField

2013-03-10 Thread Ariel Calzada
Inline formset only work with Foreign but not with Many2Many

2013/3/10 Shawn Milochik 

>
> https://docs.djangoproject.com/en/1.5/topics/forms/modelforms/#inline-formsets
>
> --
> 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+unsubscr...@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.
>
>
>


-- 
Ariel Calzada
Homepage: http://www.000paradox000.com
Blog: http://blog.000paradox000.com

"If I had asked people what they wanted, they would have said faster
horses."

 -- Henry Ford

-- 
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+unsubscr...@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: Unable to access URL's query string using request.GET['next']

2013-05-24 Thread Ariel Calzada
You can't see next variable after login because the view that process
"login form" don't return the variable in any form. You can modify this
view.

Regards,

Ariel Calzada
Homepage: http://www.000paradox000.com
Blog: http://blog.000paradox000.com

"If I had asked people what they wanted, they would have said faster
horses."

 -- Henry Ford


2013/5/25 Felipe Coelho 

> 2013/5/25 Amber Jain 
>
>> Hello,
>>
>> I can't seem to access request.GET['next'] (from a URL with a query
>> string). Here's what I'm doing:
>> localhost:8000/dashboard/ points to dashboard() view but the dashboard()
>> view uses @login_required decorator. And so, if the user isn't logged in,
>> localhost:8000/dashboard/ redirects to localhost/login/?next=/dashboard/
>> (but I can't access request.GET info after login).
>>
>> Here's my dashboard() view: http://dpaste.org/Z9dZX/ ... i.e. when
>> dashboard view is loaded after successful login (from
>> localhost/login/?next=/dashboard/), I see "You submitted an empty query
>> string.", when in fact I expect to see the request.GET data from the URL
>> query string.
>>
>> Can anyone point out the error(s) in my code? I can provide other parts
>> of my code if you want.
>
>
> I can't say exactly what you're doing *wrong*, because this is the
> behavior I would expect. The ?next query parameter is used by the default
> login view to tell Django where it should send the user after the user has
> been logged in [1]. The ?next argument is dropped from the query string
> because it has already fulfilled its purpose at that point, it wasn't an
> argument for your dashboard view. Can you tell us what do you want to
> achieve with this?
>
> [1]
> https://github.com/django/django/blob/master/django/contrib/auth/views.py#L48
>
> --
> 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+unsubscr...@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+unsubscr...@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: Template variables in translation blocks

2013-08-24 Thread Ariel Calzada
you have to append strings first

http://stackoverflow.com/questions/4386168/how-to-concatenate-strings-in-django-templates

and then call trans



2013/8/24 Some Developer 

> I have a title and a header block which normally contain static text but
> for some pages I need to display some dynamic information contained in a
> template variable.
>
> So I might have the template variable: {{ app.name }}
>
> and the block code:
>
> {% block title %}
> {% trans "{{ app.name }} Information" %}
> {% endblock %}
>
> Obviously this doesn't work. What is the correct way to solve this issue?
> I've done it in the past but I can't for the life of me remember how.
>
> --
> 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<http://groups.google.com/group/django-users>
> .
> For more options, visit 
> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
> .
>



-- 
Ariel Calzada
Homepage: http://www.000paradox000.com
Blog: http://blog.000paradox000.com

"If I had asked people what they wanted, they would have said faster
horses."

 -- Henry Ford

-- 
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+unsubscr...@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.
For more options, visit https://groups.google.com/groups/opt_out.


check form field class

2013-09-12 Thread Ariel Calzada
hi all.

I'm parsing a form in a template with {% for field in form %} .. {%
endfor %} i want to ask if field is a FileField instance any idea?

-- 
Ariel Calzada
Homepage: http://www.000paradox000.com
Blog: http://blog.000paradox000.com

"If I had asked people what they wanted, they would have said faster
horses."

 -- Henry Ford

-- 
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+unsubscr...@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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: django developer needed

2013-11-17 Thread Ariel Calzada
Hi Simon!

I'm django developer. Currently i'm working as freelancer for some
companies public and private. I'm from Colombia.

You can see some of my project:
http://www.acienciacierta.gov.co
http://www.ideasparaelcambio.gov.co

Regards,
Ariel Calzada



2013/11/17 simon waigo 

> Hi,
>
> I am looking for a django developer to come on board a startup and help
> drive development forward.
>
> As we are in start-up mode am open to any one who might find such a
> request interesting and are will to have some fun with a startup.
>
> The idea is still in concept mode but soon looking to start dev, hence the
> post.
>
> If interested please drop me a line or post your interest or any questions
> you have for  more details.
>
> Thanks for your time.
> God bless
>
> Simon
>
> --
> 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+unsubscr...@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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/9f31aef9-280c-402d-b5fc-5afdef4d275e%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Ariel Calzada
Homepage: http://www.000paradox000.com
Blog: http://blog.000paradox000.com

"If I had asked people what they wanted, they would have said faster
horses."

 -- Henry Ford

-- 
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+unsubscr...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACVFg4vGdE5D_2v3zSay2ePKxkqeVY_QxbzptP%3D%2BrUPbU2-CGQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django vs ExtJS

2014-12-30 Thread Ariel Calzada
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/django-users/CAOs3Lp6byk7q5KDTTRPEOLUGDGxXQ
>> HpvqoKMQYY4XCVU09DHfQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAOs3Lp6byk7q5KDTTRPEOLUGDGxXQHpvqoKMQYY4XCVU09DHfQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>>  --
>> 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+unsubscr...@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.
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/django-users/54A2667B.9030105%40gmail.com
>> <https://groups.google.com/d/msgid/django-users/54A2667B.9030105%40gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>  --
> 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+unsubscr...@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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAOs3Lp5rA49SikYDxDydNvhkwvQdyXZXDfeBvOA%3D%2BiNyNgHeng%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAOs3Lp5rA49SikYDxDydNvhkwvQdyXZXDfeBvOA%3D%2BiNyNgHeng%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Ariel Calzada
Homepage: http://www.000paradox000.co
Blog: http://blog.000paradox000.co

-- 
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+unsubscr...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACVFg4vmBmGW1M0bxJkArfEzWmodO8f6i5UHJfk184Vf%3DZH1KA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


MultiValueDictKeyError editing inlineformset

2013-11-26 Thread Ariel Calzada
hi i'm getting MultiValueDictKeyError while editing InlineFormset any idea?

Regards,

-- 
Ariel Calzada
Homepage: http://www.000paradox000.com
Blog: http://blog.000paradox000.com

"If I had asked people what they wanted, they would have said faster
horses."

 -- Henry Ford

-- 
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+unsubscr...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACVFg4tohTNo_%3DKhe0udvdh_JAofMH%3Dfu%2BjBBiTgarPafLMLwg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Multiple forms of the same model

2013-12-18 Thread Ariel Calzada
Hi!

I have two models named Factory and Budget

I made a formset in which users create many Factories

Now I have to make many forms as Factories exist in which users must fill
some info for each Factory, I want to have some ideas of what is the best
way to create this kind of forms

Regards,

-- 
Ariel Calzada
Homepage: http://www.000paradox000.com
Blog: http://blog.000paradox000.com

"If I had asked people what they wanted, they would have said faster
horses."

 -- Henry Ford

-- 
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+unsubscr...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACVFg4u%2BuW%3DKx-9ZYY-NCDB3zdu5B5k9otUy0zpXoiZofGh7bA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


syntax usage for the Database name ??

2014-05-14 Thread Eran Ariel


Hi,

 

I am uncertain as to the proper syntax usage for the Database name.

I have a MYSQL database called "test". Does the subsequent script 
automatically point to the folder where mysql databases reside on my Ubuntu 
machine? 

 

os.path.join(BASE_DIR, 'db.test ')

 

Furthermore, the instructions as per the Django site are to provide the 
full path where the database resides… However, I am again uncertain whether 
that refers specifically to all databases and how to apply it in proper 
syntax

 

Can someone provide me with a configuration example?

 

 

Thanks in advance

 

Eran Ariel

-- 
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+unsubscr...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5e9f7b94-bf02-4d00-8d56-710ad3f0dfd5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


ASP .NET web service and Django

2014-05-24 Thread Ariel Calzada
hi

.net -> django you should look tastypie

django -> asp you should use python library named request

regards fron colombia

El sábado, 24 de mayo de 2014, shar100101
>
escribió:

> Hi,
>
> How to create and send HTTP request from ASP .NET web service with POST
> data in it, to Django, and get HTTP responce from Django to web service ?
> Does anyone have a simple example of this?
>
> Regards,
> Dušan
>
> --
> 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+unsubscr...@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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/a1c1aaf2-6dd9-4cf8-9131-b454d8dcf548%40googlegroups.com<https://groups.google.com/d/msgid/django-users/a1c1aaf2-6dd9-4cf8-9131-b454d8dcf548%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Ariel Calzada
Homepage: http://www.000paradox000.co
Blog: http://blog.000paradox000.co

La Salvaje Esperanza

Éramos dioses y nos volvieron esclavos.
Éramos hijos del sol y nos consolaron
con medallas de lata.
Éramos poetas y nos pusieron a recitar
oraciones pordioseras.
Éramos felices y nos civilizaron.
Quién refrescará la memoria de la tribu.
Quién revivirá nuestros dioses.
Que la salvaje esperanza siempre sea tuya, querida alma inamansable.

-Gonzalo Arango-

-- 
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+unsubscr...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACVFg4vgj1jqLUKdqqjwnA3At8DS-KkEptu2ceZMufjpRhuyXA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Using Django as a framework to deploy python script on a website:

2014-06-14 Thread Eran Ariel


Hi, I am interested in Django as a platform to deploy applications using 
mod_wsgi, accordingly, whether existing Django libraries such as the forms 
library could be applied for this purpose as user initiated POST requests – 
to pass the variables.  I can place my scripts within the models.py file, 
accordingly, the script runs at the shell upon running "python manage.py 
runserver" command, however, I cannot see any output at 
http://localhost/8000 (at least for now).

How do I get my python application "browser enabled"? 

 

-- 
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+unsubscr...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c5a8935a-ab5b-4c14-bac5-c4159ff72e2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: syntax usage for the Database name ??

2014-06-14 Thread Eran Ariel
Ramiro,

Thank you so much for your reply... apologies for the late response

On Wednesday, May 14, 2014 3:43:32 PM UTC+3, Ramiro Morales wrote:
>
> On Wed, May 14, 2014 at 8:38 AM, Eran Ariel  > wrote: 
> > Hi, 
> > 
> > 
> > 
> > I am uncertain as to the proper syntax usage for the Database name. 
> > 
> > I have a MYSQL database called "test". Does the subsequent script 
> > automatically point to the folder where mysql databases reside on my 
> Ubuntu 
> > machine? 
> > 
> > 
> > 
> > os.path.join(BASE_DIR, 'db.test ') 
> > 
> > 
> > 
> > Furthermore, the instructions as per the Django site are to provide the 
> full 
> > path where the database resides… However, I am again uncertain whether 
> that 
> > refers specifically to all databases and how to apply it in proper 
> syntax 
> > 
> > 
> > 
> > Can someone provide me with a configuration example? 
>
> If you are using a RDBMS like mysql, or any of them different from 
> sqlite3 then in the NAME value you should simply specify the name of 
> the database in which you want Django creates the tables for the apps 
> of your project. 
>
> Per 
> https://docs.djangoproject.com/en/1.6/topics/install/#get-your-database-running
>  
> and https://docs.djangoproject.com/en/1.6/intro/tutorial01/#database-setup, 
>
> that database should have been created previously using the MySQL 
> administrative tools and the user you plan to use should have the 
> right permissions on it. 
>
> sqlite3 is special in the sense that it is a embeddable library (as 
> opposed to a RDBMS). That's why you need to specify the file system 
> path to the file the library will create the first time. No need to 
> provide USER/PASASWORD credentials because that's another feature it 
> doesn't provide. 
>
> With a RDBMS you connect to it possibly through the network and use 
> SQL to handle tables. It is in charge of handling low level details 
> like which files(s) it is using to store your data. 
>
> An example DATABASES setting value (for postgres):: 
>
> DATABASES = { 
> 'default': { 
> 'ENGINE': 'django.db.backends.postgresql_psycopg2', 
> 'HOST': '', 
> 'NAME': 'django_test_suite', 
> 'USER': 'ramiro', 
> 'PASSWORD': '123', 
> }, 
> 'other': { 
> 'ENGINE': 'django.db.backends.postgresql_psycopg2', 
> 'HOST': '', 
> 'NAME': 'other', 
> 'USER': 'ramiro', 
> 'PASSWORD': '123', 
> } 
> } 
>
> HTH 
>
> -- 
> Ramiro Morales 
> @ramiromorales 
>

-- 
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+unsubscr...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0aeb7f85-bda0-4bf9-9e59-c71c8ce92a0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


getting raw_input('something') instantiated from browser

2014-06-15 Thread Eran Ariel


I have developed a python application to which I am interested in allowing 
users to access it via web browser.  I am new to implementation.  I need to 
"call" the raw_input('your calculation')  from the browser and return the 
results to the browser – GET or POST. 

I have added the python script into the views.py file (in any case, it 
would run if I added it in the models.py file) 

It makes sense to create an auxillery folder to contain my python 
application and communicate with it accordingly.

Any suggestions?

-- 
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+unsubscr...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/53c24d20-afbf-4133-ae60-78576a65ed81%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Recurring question. Automate manage.py syncdb

2014-06-20 Thread Ariel Calzada
I hope this helps you

http://pastebin.com/umGv3br9

Greetings from Colombia
ARIEL


2014-06-20 11:31 GMT-05:00 Rubén Ortiz :

> Hi
>
> I have to automate a kind of django setup in linux ubuntu box. The project
> runs under virtualenv. Then my main problem is when I have to execute the
> famous:
>
> $ python $VIRTUAL_ENV/opt/graphite/webapp/graphite/manage.py syncdb 
> --pythonpath=$VIRTUAL_ENV/opt/graphite/webapp -v 2
>
>
> I am very noob with python but I don't want to maintain dumps or
> workarounds with expect. I have found some info in stackoverflow but I
> don't know how to apply it.
>
> http://stackoverflow.com/questions/10326277/django-automate-syncdb
>
> Does anybody knows what I have to do? Goal is run manage.py syncb and in
> some way automate the send of user,password and email to python script.
>
> 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+unsubscr...@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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/ac7cdcba-52cc-4e1d-842a-cd440bc0167a%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/ac7cdcba-52cc-4e1d-842a-cd440bc0167a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Ariel Calzada
Homepage: http://www.000paradox000.co
Blog: http://blog.000paradox000.co

No sabré desatarme los zapatos y dejar que la ciudad me muerda los pies
no me emborracharé bajo los puentes, no cometeré faltas de estilo.
Acepto este destino de camisas planchadas,
llego a tiempo a los cines, cedo mi asiento a las señoras.
El largo desarreglo de los sentidos me va mal. Opto
por el dentífrico y las toallas. Me vacuno.
Mira qué pobre amante, incapaz de meterse en una fuente
para traerte un pescadito rojo
bajo la rabia de gendarmes y niñeras.

-- EL NIÑO BUENO / Julio Cortazar --

-- 
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+unsubscr...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACVFg4sX0GD5HCYqLSrpd77JBBK7iCWW_7WMzPfGUEPZxp0KRA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


num2words - help

2018-01-28 Thread Ariel Matysiak
Hello :)

It's my first post in here.

I've made simple model and simple app.

I want to use num2words library and I want to see my "cash" i words.

I don't know how to do it/

Can you help me ???

Please edit code for me.


---
models.py

class Payment(models.Model):
name = models.CharField(max_length=20)
cash = models.IntegerField()

def __str__(self):
return self.name

views.py

class PaymentListView(ListView):
model = Payment

-
template.html

{% for payment in payment_list %}
{{ payment.name }}: {{ payment.cash }}
{% endfor %}

---
forms.py

class PaymentForm(forms.ModelForm):

class Meta:
model = Payment
fields = ('name','cash')


THANK YOU VERY MUCH
Ariel

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cb776a3e-f89e-4244-bcd5-6839d053e80e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Crear web apis con Django 1.6

2017-03-27 Thread ariel gavegno
Cuál es la forma más eficiente de crear un web api con Django 1.6. Qué 
librerías existen o qué metodología podría utilizar ?

Es imprescindible que migre mi framework a la versión 1.7 para utitlizar la 
libreria rest_framework ?

Gracias por su ayuda.


-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4bc13b94-c6c8-4424-9d9d-8fef4eb6dfdd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Configurar Supervisor + Gunicorn + Nginx

2017-05-02 Thread Ariel Gavegno
Buenas, necesito saber como configurar Supervisor en un servidor Ubuntu, de 
un proyecto Django 1.11.
Un ejemplo sería de mucha ayuda.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/811ff4e4-5a44-47e4-bc39-e9d7d23bfdc3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How send data to UpdateView from javascript. (Django 1.5)

2013-06-06 Thread Ariel V. R.
Hello:

Hello:

I need to send data from html using javascript to UpdateView. Django sends 
me an error:  "Generic detail view MatterUpdateView must be called with 
either an object pk or a slug."

I think that the problem exists because the method as_view() does not 
receive the correct data.

-- 
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+unsubscr...@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: How send data to UpdateView from javascript. (Django 1.5)

2013-06-06 Thread Ariel V. R.
Code: 

HTML

  

 

JS
$('.icon-edit').click( function() {
$object_id = $(this).parents().eq(0).attr('id');
$('#form-edit #input-pk').attr('value', $object_id);
$('#form-edit').submit();
}) 

URL.PY

...
url(r'^manage_p1/update/', MatterUpdateView.as_view()),  
...



El jueves, 6 de junio de 2013 23:45:59 UTC-5, Ariel V. R. escribió:
>
> Hello:
>
> I need to send data from html using javascript to UpdateView. Django sends 
> me an error:  "Generic detail view MatterUpdateView must be called with 
> either an object pk or a slug."
>
> I think that the problem exists because the method as_view() does not 
> receive the correct data.
>
>

-- 
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+unsubscr...@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: How send data to UpdateView from javascript. (Django 1.5)

2013-06-09 Thread Ariel V. R.
I know the solution, this appear in the django documentation, but no resolv 
my problem.  I redefine "dispatch" function in Django 1.4.X, 

class MatterUpdateView( UpdateView ):
template_name = 'object_add.html'
success_url = '/manage_p1/list/'
model = Matter
form_class = MatterForm

def dispatch( self, request, *args, **kwargs ):
if not kwargs :
kwargs['pk'] = request.GET.get('pk', '')
if not bool( kwargs['pk'] ):
kwargs['pk'] = request.POST.get('pk', '')


This code resolve the problem, but dose not in Django 1.5, I not know what 
to change in this version.



El viernes, 7 de junio de 2013 13:02:54 UTC-5, Nikolas Stevenson-Molnar 
escribió:
>
>  I assume that MatterUpdateView is a subclass of the generic UpdateView 
> class. If so, that class expects an object pk (id) or slug to be included 
> as part of the URL pattern, and yours doesn't include either. Your URL 
> pattern should look something more like: r"^manage/(?P\d+)/update/"
>
> _Nik
>
> On 6/6/2013 10:16 PM, Ariel V. R. wrote:
>  
> Code: 
>
> HTML
> 
>   
> 
>  
>
> JS
> $('.icon-edit').click( function() {
> $object_id = $(this).parents().eq(0).attr('id');
> $('#form-edit #input-pk').attr('value', $object_id);
> $('#form-edit').submit();
> }) 
>
> URL.PY
>
> ...
> url(r'^manage_p1/update/', MatterUpdateView.as_view()),  
> ...
>
>
>
> El jueves, 6 de junio de 2013 23:45:59 UTC-5, Ariel V. R. escribió: 
>>
>> Hello:
>>
>> I need to send data from html using javascript to UpdateView. Django 
>> sends me an error:  "Generic detail view MatterUpdateView must be called 
>> with either an object pk or a slug."
>>
>> I think that the problem exists because the method as_view() does not 
>> receive the correct data.
>>
>>  -- 
> 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.
>  
>  
>
>
> 

-- 
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+unsubscr...@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: Introducing myself and my first question

2014-07-20 Thread Ariel E. Isidro
Hi Martin,

I myself am new in Django, here's one tutorial I believe is worth visiting
when setting up your environment:

http://www.jeffknupp.com/blog/2013/12/18/starting-a-django-16-project-the-right-way/

Good luck


On Sun, Jul 20, 2014 at 6:09 AM, Martin Torre Castro 
wrote:

> Hello,
>
> my name is Martin and I'm a computer engineer from Spain. I'm going to
> start a new project with a colleague and I decided to use Django because we
> searched for free opensource tools and I'm in love with Python.
>
> We have made a couple of tutorials (the official one and "Tango with
> django"). I've also bought the book "Two scoops of Django" for the 1.6
> Django edition. We're starting the project soon as well as we finish the
> design, but I'm concerned about setting up the new environment. We're
> thinking of using:
>
>
>- postgresql
>- Python/Django [ of course ;-) ]
>- Eclipse/Pydev
>- Git
>- jQuery
>
> I've been reading the Greenfield/Roy book and some web sites and I want to
> set up the environment with good practices by using virtualenvwrapper,
> virtualenv, pip, the requirements.txt files and so on.
> I have made some mix for all this, but I would be grateful if someone
> could confirm us if we are on the right way, give us some advice or maybe
> tell us where on the internet we can find a good way of doing all this.
>
> My preview for the whole setting up is next:
>
>
>1. We should start the installations by installing "sudo apt-get
>install virtualenvwrapper" . If I understand correctly, this installs
>virtualenv as well as an embedded pip.
>2. The virtualenv must be created ("virtualenv env") in the parent
>directory of the Eclipse workspace, I suppose. This is one point of
>confusion to me. I don't know either if I have to activate this every time
>I come back for developing resuming the work from days before. I completely
>understand that later from Eclipse I will give the python path inside the
>virtualenv, but don't know if must activate the virtualenv every time.
>3. Next step would be to install all the things we need (django,
>pillow, psycopg2) using a requirements.txt file. "pip install -r
>requirements.txt"
>4. We should create the new django project with a python
>django-admin.py startproject 
>5. Now I don't know if we should link the project to an already
>installed version of Eclipse or run the "git init" first. I understand
>that Eclipse and Git don't need to be installed inside the virtualenv. In
>fact, I've been reading and it seems that Eclipse can work OK just by being
>given the path inside the virtualenv where the python executable is
>located. I've also read that some people used to make different workspaces,
>but configuring the paths should be enough
>http://stackoverflow.com/questions/1145374/virtualenv-with-eclipse-galileo
>
> From here I would just upload to github or bitbucket, maybe doing the
> whole thing from Eclipse would be easier. But the integration with Eclipse
> when we made tangowithdjango tutorial was the difficult point, because
> there is no option for importing a django project from Eclipse (Kepler
> version last time). We found easier to create the project from Eclipse, but
> we were not using a virtualenv for the tutorial.
>
> I haven't used virtualenv before, so it's our second main obstacle, but I
> expect it will be easy when we get used to it (^_^) .
>
> Please could someone help with some piece of advice, pros and cons of
> every option. Just don't want to do something now I will regret in future.
>
> Thank you veeery much in advance.
>
> PS: Some links visited:
> http://www.dabapps.com/blog/introduction-to-pip-and-virtualenv-python/
> http://www.tangowithdjango.com/book/chapters/setup.html
> https://virtualenv.pypa.io/en/latest/virtualenv.html
>
> --
> 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+unsubscr...@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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f7332cab-26a7-45fe-a9f5-26831da6bdf4%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/f7332cab-26a7-45fe-a9f5-26831da6bdf4%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https:

Re: moving from sqlite3 to mysql

2014-01-28 Thread Ariel E. Isidro
"Or can I create the database, (presumably directly in the shell), and then
empty it, as these instructions say, and that will take care of it? I
frankly didn't understand why I would need to 'empty' a new and empty
database, but that's what it says. "

With sql lite, everything will be created for you.
While with MySQL,  you should create the database directly in the shell,
and this should give you an empty database.  The Django tables will be
created after configuring your settings, and running  syncdb.




On Wed, Jan 29, 2014 at 1:17 AM, Malik Rumi  wrote:

> This is somewhat like the question in "need help moving to production
> server" but I think the right procedure is to start a new thread. So I
> think I have done well for just starting out. With your help I've gotten
> Django running on Windows, and I completed a tutorial and got my site
> working locally with the admin. thank you.
>
> So I thought I was ready to move up to MySQL for some heavy lifting. I
> followed the instructions I got here
> http://matthewwittering.com/blog/how-to-migrating-the-database-engine-for-django.html.
> I did not know what to do with the NAME part, so I put in 'django-1', and
> promptly got the error message 'unknown database 'django-1'. I thought that
> made sense because I hadn't created this database in mysql already, but I
> was just blindly following along. Having to CREATE DATABASE doesn't make
> sense, I thought, because it defeats the purpose of Django abstraction in
> the first place. Besides, when I syncdb, it should take whatever name I
> gave it when I was using sqlite3, right?
>
> Wrong. When I ran syncdb, this time with NAME: ' ', I got :   File
> "C:\Python27\lib\site-packages\MySQLdb\connections.py", line 36, in default
> terror handlerraise errorclass, errorvalue
> django.db.utils.OperationalError: (1046, 'No database selected').
>
> So, what am I missing here? There almost certainly is an easy solution I'm
> not seeing. Do I need to create a database in mysql? If so, must it have
> the same name as it had in sqlite3? I know that name was made from putting
> the model name together with something else, but I don't actually remember
> what it was, and it seems like a lot of extra work to install an sqlite
> browser just to get that name right. If that's what I need to do, maybe I
> can just open that file with notepad?
>
> Or can I create the database, (presumably directly in the shell), and then
> empty it, as these instructions say, and that will take care of it? I
> frankly didn't understand why I would need to 'empty' a new and empty
> database, but that's what it says.
>
> Any and all helpful advise welcome and appreciated.
>
>   --
> 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+unsubscr...@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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f4a6d446-7cf8-498a-8ba5-04e339dd80b9%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
*Ariel E. Isidro*
Backup your important files, click here  <http://db.tt/7cLLR7V/>

DISCLAIMER: This message is for the designated recipient only and may
contain confidential and/or privileged information. If you have received it
in error, please delete it and advise the sender immediately. You should
not copy or use it for any other purpose, nor disclose its contents to any
other person.

-- 
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+unsubscr...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAECOjiZL2Jx0M%2BYVdpX45TQDfQBGNgzMGGmOo6XiGb6JtwVkgQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: moving from sqlite3 to mysql

2014-02-05 Thread Ariel E. Isidro
1. before exiting mysql, you should grant permission to a user,i.e.
grant all privileges on django_1.* to username@'localhost' identified by
'userpassword'
replace username, userpassword with your own
2. exit mysql console
3. modify settings.py to add your username, password, host (localhost), and
port (3306)
4. run python manage.py syncdb


On Thu, Feb 6, 2014 at 7:52 AM, Drew Ferguson wrote:

> Hi
>
> Just like SQLlite, you tell Django where the MySQL database is in
> settings.py
>
> At the top you should have something like
>
> DATABASES = {
>  'default': {
>   'ENGINE': 'django.db.backends.mysql',
>   'NAME': 'django_1', # Or path to database file if using sqlite3.
> #  'USER': '',
> #  'PASSWORD': '',
> #  'HOST': '', # Empty for localhost
> #  'PORT': '', # Set to empty string for default.
>  }
> }
>
>
> On Wed, 5 Feb 2014 16:38:59 -0600
> Malik Rumi  wrote:
>
> > mysql>  CREATE DATABASE django_1;
> >
> > Query OK, 1 row affected (0.24 sec)
> >
> > mysql> SHOW DATABASES;
> >
> > ++
> >
> > | Database   |
> >
> > ++
> >
> > | information_schema |
> >
> > | django_1   |
> >
> > | mysql  |
> >
> > | performance_schema |
> >
> > | test   |
> >
> > ++
> >
> > 5 rows in set (0.31 sec)
> --
> Drew Ferguson
> AFC Commercial
> http://www.afccommercial.co.uk
>
> --
> 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+unsubscr...@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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/20140205235235.53a238b1%40blacktav.fergiesontour.org
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
*Ariel E. Isidro*
Backup your important files, click here  <http://db.tt/7cLLR7V/>

DISCLAIMER: This message is for the designated recipient only and may
contain confidential and/or privileged information. If you have received it
in error, please delete it and advise the sender immediately. You should
not copy or use it for any other purpose, nor disclose its contents to any
other person.

-- 
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+unsubscr...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAECOjiaW4jswaift33tcdTJc5DBwFYJhRKyZPmhn7FToC8QUvw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: two apps against one table (admin)

2014-02-06 Thread Ariel E. Isidro
What if you define your views to use only the fields that you need?
On Feb 7, 2014 2:24 AM, "fborell"  wrote:

> All,
>
> I need to create a second application in the admin section that ports to
> the first applications model. The second application's admin.py would
> contain only 5 of the 15 fields and be set for read-only.
> My goal was to allow certain users the ability to do a simple search and
> not see some of the other data that they weren't authorized for.
>
> Any thoughts on how to proceed?
>
> Thank,
>
> -f
>
> --
> 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+unsubscr...@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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d1ed61d4-16d9-4a51-a537-d46a1f334d3a%40googlegroups.com
> .
> 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+unsubscr...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAECOjia6C34LOi28TBK%2Bs_Fqpy_c0nXkpq8FOmpk71_-Hwaqdw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Deployment in Django

2014-03-22 Thread Ariel E. Isidro
After git, pythonanywhere is a simple way to deploy and publish.
On Mar 22, 2014 9:02 PM, "Kamal Kaur"  wrote:

> On Sat, Mar 22, 2014 at 2:50 PM, Aryak Sengupta 
> wrote:
> > But what is the simplest and the easiest way to go about deployment?
> >
> > P.S. I am new to Django.
>
> Starting with a small app, following a good tutorial is not a bad
> idea! And the simplest, it lets you start from basics. Make sure you
> use git right from the first step. Will be beneficial. First try
> exploring about it.
>
> Something I just found:
>
> http://stackoverflow.com/questions/5467916/what-is-a-good-tutorial-for-django-other-than-the-django-documentation
>
> --
> Kamaljeet Kaur
>
> kamalkaur188.wordpress.com
> facebook.com/kaur.188
>
> --
> 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+unsubscr...@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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAP8Q%2BxgcW0x%2BkfTdhN67cJuD5Fw12W5ACieY2ZMpPRuLO8md-w%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAECOjiaefgAy44qv5B0%3DtFXpGuJDhammFnCzHu_3qsDCLaB7%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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



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



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



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



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

  1   2   >