Re: django using wrong python???

2010-12-30 Thread Alvaro Mouriño
2010/12/30 ozgur yilmaz <yelb...@gmail.com>:
> I have Centos, and it comes with python2.4(sorry, not 2.5). I installed
> python2.6 and django is under:

I work with CentOS too but installing different python versions in
parallel seemed like a lot of unnecessary work to maintain. So I
developed python-schizoid [0], a script that installs a virtual
environment with python 2.7, django trunk and many other useful
software.

It tries to install as much software inside the virtual environment as
possible to avoid depending on the (old) software installed on the
system. The only thing it does not install is the database engine.

Working like this makes packaging and deploying *a lot* easier because
your whole project and its dependencies (and even the python binaries)
are inside one directory. You also have the script bin/activate that
sets some useful environment variables that help working inside the
environment.

I know this doesn't actually answers your question but I thought you
may find it useful.

Regards,

[0] https://github.com/tooxie/python-schizoid

-- 
Alvaro Mouriño
http://askani.net/

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

2010-11-21 Thread Alvaro Mouriño
2010/11/21 Joseph (Driftwood Cove Designs) <powderfl...@gmail.com>:
> Alvaro -
> this is a nifty idea - will save time and improve consistency.
>
> Opens up model proto-typing to non-Django, non-Python, maybe even non-
> programmer?  Could be used for collaboration during model design -
> especially if it presents an ER'ish diagram as you build the data
> model.
>
> look forward to seeing this progress - nice work.

Hi Joseph.

I thought about generating not-only-python, but it was easier for me
to get it up and running concentrating just on django. It's on my
mind, yes, but it's not easy. The first option was obviously rails,
but I never coded a line of ruby, so I'm going to need help with that.

Regarding collaboration, one of the goals is to allow concurrent
edition of a project, with a sort-of-chat-room on the side so the
users can communicate. Always trying to avoid the need of a web server
as much as possible.

Thanks for taking the time to try it.

-- 
Alvaro Mouriño
http://askani.net/

-- 
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: [RFC] Askani

2010-11-20 Thread Alvaro Mouriño
2010/11/21 Huy Ton That <huyslo...@gmail.com>:
> Behaves the same way with Opera 10 and chrome.
> click new model
> typed in 'testmodel'
> in testmodel added 'testfield'. doubleclicked on charfield testfield
> clicked on model fields docs link
> opens 9 tabs in background, hm, in chrome it was just 2...

I could reproduce it following those steps. Thanks, I'm working on
this strange bug.

-- 
Alvaro Mouriño
http://askani.net/

-- 
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: [RFC] Askani

2010-11-20 Thread Alvaro Mouriño
2010/11/20 Huy Ton That <huyslo...@gmail.com>:
> From a visualizing data standpoint, I think it is very good. Model help on
> the web opens three tabs though. For what it is intended for, I think it is
> superior to a CLI.

Hi. I couldn't reproduce the bugs you mention. Which link are you
clicking on? There are two links to django docs, in metadata options
and field edition. I just tried both and work fine. Which browser are
you using?

Thanks for the feedback.

-- 
Alvaro Mouriño
http://askani.net/

-- 
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: [RFC] Askani

2010-11-20 Thread Alvaro Mouriño
2010/11/20 RadicalEd <willian.radica...@gmail.com>:
> Is awesome, I will start an app tomorrow and I'll use it to make me the life
> easier, I'm thinking in combox with the different types of data (CharField,
> DateField, etc)

When you create a field you can edit it by double-clicking it. In the
edition dialog the system autocompletes the field as you type. I
thought that it was faster than choosing from a combo because you
usually know which field you need. In case you don't the whole list
appears when you type "field" (or just "fi" actually)

Methods are also editable the same way but you don't get completion.
On the other hand, the system validates the arguments. For example,
you can't have any more arguments after a keyword argument (**) and so
on.

How could I make field and method edition more "obvious"? Thanks for
the feedback!

-- 
Alvaro Mouriño
http://askani.net/

-- 
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: [RFC] Askani

2010-11-20 Thread Alvaro Mouriño
2010/11/20 rafael.nu...@gmail.com <rafael.nu...@gmail.com>:
> Didn't you consider a command-line tool to do that, like Rails scaffold?
> Would be nice.

Hi Rafael.

Sorry but I never used Rails, I thought scaffolds were something
different. Could you please explain your idea a little?

Anyway, I think a graphical interface helps you see the relevant
information clearly and hide the bits you don't need. It also helps
you sketch ideas quickly. I'm very used to CLI (I use debian and coded
askani in vim) but I believe that a GUI really makes a difference.

Regards,

-- 
Alvaro Mouriño
http://askani.net/

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



[RFC] Askani

2010-11-20 Thread Alvaro Mouriño
Hi.

I'd like to introduce to you this idea I've been working on for the
last month, a django models generator: http://askani.net/

Field options definition it's repetitive. Writing meta options leads
to inconsistent use due to the variety available. "Inspired" by the
repetitiveness of coding django models and the required memory load of
defining meta options I decided to create a graphical interface that
would guide the user in the creation of models.

Askani.net is the result of scratching those itches. It represents
models, fields, attributes and meta options in a UML-and-MER-ish way
(but doesn't follow it strictly). It displays all the possible
information for a model so the user only has to fill in the blanks the
desired options, not remember all of them.

The python code that outputs it's far from perfect, I know, this is
just a barely-usable system to prove the concept, a prototype.

The reason for this email is to request comments, suggestions and
critics on the idea and specially on the usability. Clone the source,
read the README file and play with it. Have fun =)

Regards,

-- 
Alvaro Mouriño
http://askani.net/

-- 
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: Checking download completed

2009-10-09 Thread Alvaro Mouriño

On Fri, Oct 9, 2009 at 1:57 PM, Christophe Pettus <x...@thebuild.com> wrote:
> On Oct 8, 2009, at 10:41 AM, Alvaro Mouriño wrote:
>> I was asked to keep track of how many times each edition
>> is downloaded, but I want to make a difference between completed
>> downloads and uncompleted.
>
> Unfortunately, this is a really messy problem, since the user can
> cancel downloads, do partial downloads, etc., etc.   The only way I
> have found to do it is to parse the web server logs (ick).

Asking many people about this a friend told me that when he had to do
this the only way was using a CGI script to serve the file. In my case
I would process the request, if the user can download the file I save
it in the database BUT as incomplete, then redirect to a CGI script.
That script would load the file, serve it and when it finishes updates
the database to unmark the download as incomplete. If it doesn't
finish, the record never gets updated.

That's the idea, sounds good but I haven't implemented it, I don't
know the risks of this. I would not load django in the script because
it would consume too much RAM, so the script would blindly update the
record using raw SQL. I'm not too sure about this, but I don't see it
as a big security issue.

Thanks for your idea Christophe.

> --
> -- Christophe Pettus
>    ...@thebuild.com

-- 
AlvAro

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



Checking download completed

2009-10-08 Thread Alvaro Mouriño

Hi list,

I'm developing a website for a local newspaper which is distributed as
PDF as well. I was asked to keep track of how many times each edition
is downloaded, but I want to make a difference between completed
downloads and uncompleted.

Now I'm serving the file through the HttpResponse object [0] but I
have no control once the view returns it. Is there a way to know
whether the file was successfully downloaded?

Regards,

[0] 
http://docs.djangoproject.com/en/dev/ref/request-response/#telling-the-browser-to-treat-the-response-as-a-file-attachment

-- 
AlvAro

--~--~-~--~~~---~--~~
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: Limiting queryset on ModelAdmin based on date field

2009-09-24 Thread Alvaro Mouriño

On Thu, Sep 24, 2009 at 2:52 AM, Brian McKeever  wrote:
>
> I'm not too familiar with customizing the admin, but you want to use
> the range field lookup.
>
> http://docs.djangoproject.com/en/dev/ref/models/querysets/#range

Thanks McKeever, but that's actually the problem: I don't know the
date the instance was created, so I don't know which range to ask for.

-- 
AlvAro

--~--~-~--~~~---~--~~
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: Limiting queryset on ModelAdmin based on date field

2009-09-24 Thread Alvaro Mouriño

On Thu, Sep 24, 2009 at 6:19 AM, Daniel Roseman <dan...@roseman.org.uk> wrote:
>
> On Sep 24, 6:07 am, Alvaro Mouriño <alvaro.stev...@gmail.com> wrote:
>> Hi list.
>>
>> I'm developing a news application that handles articles, about 10 new
>> articles each day. The site administrator every morning selects from a
>> drop-down-list the ones that hit the front page. As time goes by this
>> list grows bigger and bigger, and what's worst, old articles doesn't
>> even matter at all.
>>
>> I could sort by creation date and limit the queryset with the
>> ModelAdmin.formfield_for_foreignkey method. I do both, but it's not
>> perfect.
>>
>> Nowadays I limit the list of articles to only the ones published today
>> and yesterday. The problem with this is that when editing an instance,
>> if old enough (more than two days) no articles will show up, not even
>> the selected one, which as you could imagine makes editing old
>> instances impossible.
>>
>> I'd like to know if there's a way to access an attribute of the
>> instance in the formfield_for_foreignkey method so I can tell django
>> to display a list of articles based on the creation date (only the
>> articles created that day and the day before.)
>>
>> (I could use a raw_id_field but it would be a usability problem to not
>> see the article's title in the same page.)
>>
>> Regards,
>>
>> --
>> AlvAro
>
> This is probably outside the scope of what can be achieved via
> formfield_for_foreignkey. However it would be possible by defining a
> custom form and overriding the __init__ method. After calling super(),
> you can then modify the queryset of the FK field - you would have
> access to the current instance via self.instance.

I'll take a look at that. Thanks!

-- 
AlvAro

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



Limiting queryset on ModelAdmin based on date field

2009-09-23 Thread Alvaro Mouriño

Hi list.

I'm developing a news application that handles articles, about 10 new
articles each day. The site administrator every morning selects from a
drop-down-list the ones that hit the front page. As time goes by this
list grows bigger and bigger, and what's worst, old articles doesn't
even matter at all.

I could sort by creation date and limit the queryset with the
ModelAdmin.formfield_for_foreignkey method. I do both, but it's not
perfect.

Nowadays I limit the list of articles to only the ones published today
and yesterday. The problem with this is that when editing an instance,
if old enough (more than two days) no articles will show up, not even
the selected one, which as you could imagine makes editing old
instances impossible.

I'd like to know if there's a way to access an attribute of the
instance in the formfield_for_foreignkey method so I can tell django
to display a list of articles based on the creation date (only the
articles created that day and the day before.)

(I could use a raw_id_field but it would be a usability problem to not
see the article's title in the same page.)

Regards,

-- 
AlvAro

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

2009-09-23 Thread Alvaro Mouriño

On Thu, Sep 24, 2009 at 12:39 AM, Brian McKeever <kee...@gmail.com> wrote:
>
> That's a little different.
>
> If you want your desktop apps to all directly connect to your server
> database, I'm not sure what security issues you'd be exposing yourself
> to. I figured you wanted a local database where it wouldn't matter if
> the user messed it up.
>
> I mean, I'm not saying it can't be done. I just think it might require
> changing django internals (which is probably more complicated than you
> want). Although, I don't know enough about that aspect of django to
> say for sure.

Maybe I'm missing something but I don't see why should django
internals be changed. I'm not saying it's easy, but he would have to
implement (or find a module [0] that does) the browser's capabilities
for cookie management [1] or secure connections [2] (like certificate
verification.) I would treat it like an AJAX application in the sense
that he only needs to access the data, not the markup.

Gustavo, if you achieve this please tell us about your experience.
I've thought about doing this before but never found a really good
reason to get into it. You can find useful information on the net [3].

Good luck.

[0] http://docs.python.org/library/webbrowser.html
[1] http://docs.python.org/library/cookielib.html
[2] http://docs.python.org/library/httplib.html
[3] http://www.google.com.uy/search?q=django+desktop

-- 
Alvaro Mouriño

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



News sitemaps

2009-07-13 Thread Alvaro Mouriño

Hi list,

I'd like to know if there are any plans to patch [0] the sitemaps
framework to add news sitemaps support in the near future.

Regards,

[0] http://code.djangoproject.com/ticket/10907

-- 
AlvAro

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

2009-04-22 Thread Alvaro Mouriño

On Wed, Apr 22, 2009 at 8:56 PM, Chris Moffitt  wrote:
> It looks like django-accounts is a bit stalled. You could try taking a look
> at Satchmo  (http://www.satchmoproject.com )
>
> It's more of a full fledged ecomerce app but it does support a subscription
> model and multiple payment gateways.
>
Thanks Chris. I'll take a look at it.

> -Chris
>

-- 
AlvAro

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



Subscriptions software

2009-04-22 Thread Alvaro Mouriño

Hi all,

I'm working at a newspaper which requires readers to subscribe and
choose from many different pay plans, from monthly to yearly. The
subscriptions software was built on django 0.91, it's becoming a
headache to maintain so we are planning to develop it from scratch on
1.0.

Is there anything like this already?

So far I've found django-accounts [0] which I haven't tested, but
seems to be similar. Has anyone had this requirement? What are your
experiences?

Thanks!

[0] http://code.google.com/p/django-accounts/

-- 
AlvAro

--~--~-~--~~~---~--~~
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: Context processors not executing

2009-02-06 Thread Alvaro Mouriño

On Fri, Feb 6, 2009 at 5:47 PM, Alex Gaynor <alex.gay...@gmail.com> wrote:
> On Fri, Feb 6, 2009 at 2:45 PM, Alvaro Mouriño <alvaro.stev...@gmail.com>
> wrote:
>>
>> Hi list,
>>
>> None of the context processors are being executed, not only my own,
>> django's context processors aren't either. I've been developing with
>> django for about a year now and this is the first time something like
>> this happens to me. I'm really lost here, any help o keyword to google
>> for will be much appreciated.
>>
>> Thanks!
>>
>> --
>> AlvAro
>>
>>
>
> How are you rendering your template, specifically are you remembering to use
> RequestContext?
>
No, I wasn't. I have always used a decorator [0] to render the
template, but this time I decided to not use it. Instead I was
(mis)using render_to_response and had forgotten that.

> Alex
>
Thanks Alex.

[0] http://www.djangosnippets.org/snippets/133/

-- 
AlvAro

--~--~-~--~~~---~--~~
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: POST still occurs after HttpResponseRedirect

2009-01-12 Thread Alvaro Mouriño

On Mon, Jan 12, 2009 at 10:54 PM, Malcolm Tredinnick
 wrote:
>
> On Sun, 2009-01-11 at 19:27 -0800, stryderjzw wrote:
>> Hi,
>>
>> Here's part of my code:
>>
>> class NewAssignmentFormPreview(FormPreview):
>>
>> def done(self, request, form):
>> assignment = form.save(commit=False)
>> assignment.save()
>>
>> ...
>>
>> return HttpResponseRedirect(assignment.get_absolute_url())
>>
>>
>> I do an HttpResponseRedirect to go to the assignment page after it's
>> been created.
>>
>> However, when I do a refresh on that page, it still asks me if I want
>> to submit POST data and an additional assignment is created. I thought
>> HttpResponseRedirect is suppose to prevent that.
>
> Then either your browser is broken or you're not really hitting that
> line of code. You could verify the latter case by inserting a syntax
> error in the line (e.g. misspell "get_absolute_url") and make sure the
> line is executed.
>
I discovered pdb some time ago and changed my life.

Insert, instead of the typo, this:
import pdb
pdb.set_trace()

And hit refresh. Then go check in the development server, the
execution of the script should have been frozen when hitting that
line, and a prompt must be waiting for commands. For info type help.

> Also, check this using the development server (or by looking at your web
> server logs) and check that a request really is being sent to the server
> from the browser after the redirect response is sent back.
>
> Regards,
> Malcolm
>
>>
>> Any ideas?
>>
>> Thanks!
>> Justin
>> >
>>

Regards,
-- 
AlvAro

--~--~-~--~~~---~--~~
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: Shouldn't get_profile() create the profile object?

2009-01-09 Thread Alvaro Mouriño

On Thu, Jan 8, 2009 at 12:26 AM, Malcolm Tredinnick
<malc...@pointy-stick.com> wrote:
>
> On Wed, 2009-01-07 at 22:50 -0200, Alvaro Mouriño wrote:
>> I find myself checking for the existence of the profile object for the
>> user everytime I call the get_profile function or making sure that it
>> gets created with every user.
>>
>> Is there a reason for this? Shouldn't the framework assure me that I
>> will get a profile whenever I call get_profile()? Even if it means
>> creating one?
>
> The function is called get_profile, not get_or_create_profile.
>
> Some people would like it to create automatically, others prefer it to
> be explicit. I'm in the latter camp: if a user should have a profile, I
> should create it properly when creating the user (e.g. using a signal),
> not have some magical transparency happen behind the curtain that hides
> the bug of me forgetting to do so. After all, if you're creating a
> profile, you might well need to initialise it in some particular default
> way. So now get_profile() needs to be like get_or_create() and accept a
> bunch of default arguments. Much more complicated.
>
Even if I don't share your point of view, I totally understand it.
Thanks for the explanation.

> It's a moot point, though. Changing it would introduce the sort of
> backwards incompatibility we try to avoid.
>
> Regards,
> Malcolm
>
Regards,

-- 
AlvAro

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



Shouldn't get_profile() create the profile object?

2009-01-07 Thread Alvaro Mouriño

I find myself checking for the existence of the profile object for the
user everytime I call the get_profile function or making sure that it
gets created with every user.

Is there a reason for this? Shouldn't the framework assure me that I
will get a profile whenever I call get_profile()? Even if it means
creating one?

Thanks!

-- 
AlvAro

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



Did r7798 break comments?

2008-07-09 Thread Alvaro Mouriño

Hi list,

I'm using the comments engine [0] provided by the framework, but after
updating to the revision 7798 [1] or later I get the error:
u'get_comment_count' tag has invalid content-type. As you can tell by
the error message, the exception is raised at the get_comment_count
[2] function, but actually it's the same for every comment's method.

According to the changeset: "exact" lookups in MySQL are now
case-sensitive. How does this affect comments? Is it me doing things
wrong?

Thanks!

[0] http://code.djangoproject.com/wiki/UsingFreeComment
[1] http://code.djangoproject.com/changeset/7798
[2] 
http://code.djangoproject.com/wiki/UsingFreeComment#AddingCommentstoDetailPages
-- 
AlvAro
http://tuxie.debianuruguay.org/?page_id=110

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

2008-05-13 Thread Alvaro Mouriño

On Tue, May 13, 2008 at 11:23 PM, David Cramer <[EMAIL PROTECTED]> wrote:
>
>  I'm building a new pluggable ratings app (django-voting doesn't come
>  close to covering what my specs are). It's built around a similar
>  architecture to what we used on Curse. What I'm looking for right now
>  is feedback on my proposed API and usage: 
> http://code.google.com/p/django-ratings/
>
Did you try django-rating [0]?

[0] http://django-rating.googlecode.com/
-- 
AlvAro
http://tuxie.debianuruguay.org/?page_id=110

--~--~-~--~~~---~--~~
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: OT: Django logo

2008-03-25 Thread Alvaro Mouriño

On Tue, Mar 25, 2008 at 10:02 PM, Justin Lilly <[EMAIL PROTECTED]> wrote:
> whatthefont.com couldn't find a good match.
>
I didn't know that site. I checked and matched 5 fonts, but none of
them was exactly it, but still does a great job recognizing the
letters!
-- 
AlvAro

http://es.wikipedia.org/wiki/Software_Libre
http://en.wikipedia.org/wiki/Free_Software
http://tuxie.debianuruguay.org/

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



Re: OT: Django logo

2008-03-25 Thread Alvaro Mouriño

On Wed, Feb 28, 2007 at 9:35 PM, Jacob Kaplan-Moss
<[EMAIL PROTECTED]> wrote:
>  On 2/28/07, cjl <[EMAIL PROTECTED]> wrote:
>  > Way off topic...anyone know which font is used for the django logo?
>
>  It's DTL Prokyon (http://www.dutchtypelibrary.nl/Prokyon_rdrct.html --
>  terrible HTML alert).
>
Sorry for bringing back to life this old topic, but I'd like to know
which font the "for perfectionists..." is in.

Thanks!
-- 
AlvAro

http://es.wikipedia.org/wiki/Software_Libre
http://en.wikipedia.org/wiki/Free_Software
http://tuxie.debianuruguay.org/

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



Re: IDE

2008-03-07 Thread Alvaro Mouriño

On Fri, Mar 7, 2008 at 6:40 AM, jason <[EMAIL PROTECTED]> wrote:
>
>  1 vote for SPE, aka Stanis Python Editor.
So far many editors/IDEs have been put on the table here, let me remind you:

Free as in freedom:
* OpenKomodo
* UliPad
* PIDA
* Eric
* Boa Constructor
* Eclipse + Pydev
* Kate
* Geany
* SPE
* Vim
* PyPE

Non-free:
* Komodo
* Textmate (mac only)
* Coda (mac only)
* Aptana Studio (What about the eclipse plugin? Has anyone tried it?
Is it good?)
* Wingware

Netbeans was also mentioned, but not really suggested, that's why
didn't make it in this list. I think the best rated so far is
Eclipse+Pydev.

But (as I see it) the question is, what should we expect from a
"django-capable" IDE? What does "django support" mean? What is not
(entirely) supported by any IDE so far?

It seems that every nice IDE out there supports code completion and
syntax highlighting, but it would be nice to have some other features.
What comes to my mind is something like loading the framework and the
settings.py if I tell the IDE to run the file I'm editing. I see that
there are a world of different feelings about excellent pieces of
software, but in my opinion we should discuss which makes a difference
when it comes to django. At the end is up to the developer, if it
doesn't "feel right", he/she won't use it no matter the features.

I hope no one finds this email offensive, I'm just trying to get a
conclusion from this "hot" topic that's been coming up frecuently
between django developers.

Cheers! =)

AlvAro

"You can't change the world, but you can change your mind."
Software Libre: El conocimiento no puede tener dueño.

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



menuse

2007-09-24 Thread Alvaro Mouriño

Hi List,

I've just developed a (very simple) app to create menus with links to
flatpages or URIs and I'd like to share it with you.

From http://code.google.com/p/django-menuse/

This app lets you create and administer menus from flatpages in 5 easy steps:

   1. Create your flatpages.
   2. Create a menu.
   3. Generate links based on a flatpage or URI.
   4. Select the links corresponding to that menu.
   5. Place the menu in your HTML.

Features

* No need to create new flatpages or modify it's code.
* Can link to existing flatpages.
* Can link to a flatpage or URI.
* Possibility of having multiple menus.
* Menus can share links.

TODOs

* Allow subitems.

What other feature should it support? Do you find it useful? Is there
anything like this done already?

Thanks for the feedback!

AlvAro

"You can't change the world, but you can change your mind."
Software Libre: El conocimiento no puede tener dueño.

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



Re: Django deployment à lá Capistrano

2007-09-11 Thread Alvaro Mouriño

On 9/11/07, Chris Hoeppner <[EMAIL PROTECTED]> wrote:
>
> I'll be creating a google code page as soon as we settle down on a name.
> I like Djangostrano. Sounds nice. But I'm not sure about anyone crying
> out something about "ripping other people's ideas".
>
I don't think I can help with development, but I least I could help
with the name.

Capistrano is:
* A saint: http://en.wikipedia.org/wiki/Giovanni_da_Capistrano
* An Italian city: http://en.wikipedia.org/wiki/Capistrano_%28VV%29
* A city in California:
http://en.wikipedia.org/wiki/San_Juan_Capistrano%2C_California
* A city in Brazil: http://pt.wikipedia.org/wiki/Capistrano

Maybe we could play with that and choose a different name, not a
variation of Capistrano. I mean like:
* Giovanni: First name of the saint
* Calabria: Name of the region where Capistrano is located. (I like this.)
* Allevato: The name of the mayor. (I don't like this one.)
* Ceara: The state where Capistrano is located.

Just a few ideas...

Cheers!

AlvAro

"You can't change the world, but you can change your mind."
Software Libre: El conocimiento no puede tener dueño.

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

2007-08-30 Thread Alvaro Mouriño

On 8/30/07, John Shaffer <[EMAIL PROTECTED]> wrote:
>
> On 8/28/07, Alvaro Mouriño <[EMAIL PROTECTED]> wrote:
> > I have been running django under python 2.4 but now I'm considering
> > switching to 2.5. Are there any known compatibility issues? Or is it
> > just straightforward?
>
> Django itself should work fine. Usually your apps and projects will
> work without any changes, but you should always check the docs:
> http://docs.python.org/whatsnew/porting.html
>
Thanks everyone! I was a bit afraid of switching, but I guess that
would be easier to fix what stops working than downgrade 3rd party
apps to 2.4.

AlvAro

"You can't change the world, but you can change your mind."
Software Libre: El conocimiento no puede tener dueño.

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

2007-08-28 Thread Alvaro Mouriño

Hi list,

I have been running django under python 2.4 but now I'm considering
switching to 2.5. Are there any known compatibility issues? Or is it
just straightforward?

Thanks,

AlvAro

"You can't change the world, but you can change your mind."
Software Libre: El conocimiento no puede tener dueño.

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

2007-08-18 Thread Alvaro Mouriño

On 8/18/07, Doug B <[EMAIL PROTECTED]> wrote:
>
> > [PYTHON]
> > class Order(models.Model):
> > def count_items(self):
> > items = 0
> > for item in self.orderitem_set.filter(order=self):
> > items += item.quantity
> > return items
> > count = property(count_items)
> > [/PYTHON]
>
>
> For the instance.othermodel_set objects, the 'order=self' is already
> implied, you shouldn't supply it as a filter argument. I have a
> feeling the error is from specifying the same column twice.  Try
> self.orderitem_set.all().
>
I tried that, but I get the same error, the traceback displays that
line as the "buggy" one: for item in self.orderitem_set.all():

> You might also consider dropping to sql for stuff like this if you've
> got performance issues. Probably overkill here, but since I had to
> spend some time figuring it out on a similar problem today, maybe it
> will help you.
> from django.db import connection
> c=connection.cursor()
> q="select SUM(quantity) as item_count from %s where order=%s" %
> (self.orderitem_set.model._meta.db_table,self._get_pk_val())
> c.execute(q)
> count =  c.fetchone()[0] # grab the first and only row
>
Thanks for the tip. I did something like that but then found a snippet
[0] doing what I wanted in a more django-like way. I still don't know
if use my own sql sentences for this cases or stick to the django api.
I guess it's a decision based on performance, the problem is that I
don't know which is more performant.

Each cart won't have many items, so I guess counting them is not going
to be a demanding process, right?

AlvAro

"You can't change the world, but you can change your mind."
Software Libre: El conocimiento no puede tener dueño.

--~--~-~--~~~---~--~~
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: Make Operating System Faster !!

2007-08-18 Thread Alvaro Mouriño

On 8/18/07, John Travolta <[EMAIL PROTECTED]> wrote:
> Tune up your system and make it faster
This list gets lots of spam, doesn't it? Is there a way to prevent it
from hitting the mailboxes of the list subscribers?

AlvAro

"You can't change the world, but you can change your mind."
Software Libre: El conocimiento no puede tener dueño.

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



OperationalError

2007-08-18 Thread Alvaro Mouriño

Hi list,

I'm developing a (yet another) shopping cart and I'm having a problem
when counting the items in the cart.

In my model I have an "Order" class which is the cart and a
"OrderItem" class which are the items in the cart. In the Order class
I have this code:

[PYTHON]
class Order(models.Model):
def count_items(self):
items = 0
for item in self.orderitem_set.filter(order=self):
items += item.quantity
return items
count = property(count_items)
[/PYTHON]

When I run the application I get the error:
[ERROR]
OperationalError at /
(1241, 'Operand should contain 1 column(s)')
Request Method: GET
Request URL:http://localhost:8000/
Exception Type: OperationalError
Exception Value:(1241, 'Operand should contain 1 column(s)')
Exception Location:
/var/lib/python-support/python2.4/MySQLdb/connections.py in
defaulterrorhandler, line 35
Python Executable:  /usr/bin/python
Python Version: 2.4.4
[/ERROR]

Something strange is that the exception is thrown while rendering the template:
[ERROR]
Caught an exception while rendering: (1241, 'Operand should contain 1
column(s)')
73  
74  {{ cart.count }} item{{ cart.count|pluralize }}
75  
[/ERROR]

Any idea? Thanks in advance,

AlvAro

"You can't change the world, but you can change your mind."
Software Libre: El conocimiento no puede tener dueño.

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