Re: Download a file on Django and delete it after return

2017-11-14 Thread Juan Hernandez
well, we could see the use case to see the correct approach but, what comes to mind is using try/except/finally On Nov 14, 2017 17:56, "Ruifeng Hu" wrote: > Hi All, > > I am now writing a web service which can generate a file and download it > automatically for users,

Re: UML to Django - online generation service

2011-05-07 Thread Juan Hernandez
django-extensions does something similar On Sat, May 7, 2011 at 3:04 AM, gusheng wrote: > I'm thinking of something opposite.. > > Is it possible to draw uml base on my models? > > or, how to draw or present my model-structure-data.. > > > On May 4, 10:26 pm, jcabot

Re: Pylons vs. Django

2010-09-05 Thread Juan Hernandez
On Sun, Sep 5, 2010 at 4:49 PM, Feross wrote: > SQLAlchemy is that hard to use? I've only heard good things about it... In > any case, I'm giving Django a shot right now. I'm still curious to hear some > opinions about Pylons vs. Django. > > The main difference between

Re: Pylons vs. Django

2010-09-05 Thread Juan Hernandez
Well, just by using SQLAlchemy makes this framework worth a try On 9/5/10, Feross wrote: > Hey everyone, > > I'm a new Python user and I'm looking for a web development framework to > build a database-driven website. I've looked at the various Python web > frameworks out there

Inserting a row with x_set or select_related

2010-08-13 Thread Juan Hernandez
Hey there, Let's say that I have these models: *from django.contrib.auth.models import User* * * *class Publisher:* *name = Char(x)* * * *class Author:* *publisher = FK(Publisher)* *name = Char(x)* * * *class Book:* *user = FK(User)* *author = FK(Author)* *name = Char(x)*

request.is_ajax() good practices

2010-07-21 Thread Juan Hernandez
Hey there, I have been working a lot with request.is_ajax() to handle forms and the results have been great so fat yet, I have a question about good practices and best uses for this function. Lets say that I executed a function that returned True and instead of sending the boolean to the

Re: Django IDE

2010-07-17 Thread Juan Hernandez
google: "django ide" :) On Sun, Jul 18, 2010 at 12:39 AM, Tran Cao Thai wrote: > find them, use them and you will know the best > > > On Sun, Jul 18, 2010 at 1:53 AM, Jitendra Joshi < > joshijitendra...@gmail.com> wrote: > >> What is the best open source Django IDE ?

Re: Can't access Django Dev Server.

2010-05-29 Thread Juan Hernandez
any firewall?? On Sat, May 29, 2010 at 8:03 PM, gin tonic wrote: > My development server is running but when I attempt to access it at > the localhost 127.0.0.1:8000 I receive a page not found error while my > command shell shows no attempt to access the site. > > No

Re: Looking for a Django Developer

2010-05-21 Thread Juan Hernandez
why don't we talk about our lives in this lists? PLEASE! Tis is a technical list... use djangogigs instead!!! On Fri, May 21, 2010 at 12:16 PM, Kashif Ali wrote: > Hi, > > I am interested. I am a python django developer working from last 2 year > almost for an

Re: RV: photos sexy

2010-02-26 Thread Juan Hernandez
Lastima que esa no seas tu Gisela!! jajajaj slds desde vzla On Fri, Feb 26, 2010 at 12:40 PM, Gisela Cartaya wrote: > My apologize for all, this has been a big mistake error, this is a > technical mailing list I ask to the administrator to delete from archive > that

Re: Sick of defining urls

2009-12-03 Thread Juan Hernandez
c'mon! is regular expressions! if that bothers you, just do a regex that woud take anything and through a smart view, define everything On Thu, Dec 3, 2009 at 3:51 PM, Max Battcher wrote: > Todd Blanchard wrote: > > settings.py has a list of applications to include

even and odd numbers within a template

2009-11-24 Thread Juan Hernandez
Hey there people... I've been coloring html tables using javascript for a while and now, we need to color our tables just with html. The CSS has been made to use one color for even rows and another one for odds. How can I know if a current template loop is odd or even? I've been trying many

Re: Is there a way to integrate php to a django app?

2009-11-13 Thread Juan Hernandez
Well, technically everything is possible and I think that the proper thing to ask would be "is it worth it"? On 11/13/09, Allen wrote: > Hi, all: > > I've build a application with django, and my friends build a part of > the application with php. > now both of us are

Re: using ORM Parent->child rendering inside a template

2009-10-27 Thread Juan Hernandez
On Tue, Oct 27, 2009 at 3:39 PM, Ramiro Morales wrote: > > Have you actually tried doing so? LOL!!! somehow I didn't do it correctly!! That's the way to do it! Thanx :D --~--~-~--~~~---~--~~ You received this message because you are

using ORM Parent->child rendering inside a template

2009-10-27 Thread Juan Hernandez
Hey there people: Let's say that I have these models == class Post(models.Model): user = models.ForeignKey(User) category = models.ForeignKey(Categories) title = models.CharField(max_length=50) post = models.TextField() date = models.DateTimeField(auto_now_add=True)

Re: regex infinite loop with 100% cpu use in django.forms.fields.email_re - DOS hole?

2009-10-09 Thread Juan Hernandez
Take a look at mine: *In [41]: from django.forms.fields django.forms.fields In [41]: from django.forms.fields import email_re In [42]: email_re.match('viewx3dtextx26q...@yahoo.comx26latlngx3d15854521645943074058 ')* and this is what top shows: * PID USER PR NI VIRT RES SHR S %CPU

Re: reservation & booking system

2009-09-29 Thread Juan Hernandez
That is such a wide area of development On 9/29/09, Eesti Mate wrote: > > Hello List, > > I'm looking for some modules to realize a reservation and booking > system, preferably with a nice calendar interface. I did some research > today, but didn't found what I was

Re: Django, CMS, CSS newbie question

2009-08-11 Thread Juan Hernandez
you can start here www.djangobook.com On Tue, Aug 11, 2009 at 10:58 AM, eldonp2 wrote: > I would like to start my own website. I > figured, since I don't know much, that I would start with a CSS > template and work back. How can I use a free template and then > integrate

Re: NASA is using Django for their NEBULA project

2009-07-30 Thread Juan Hernandez
a headhunter is flying around!! BTW teksystems hates me :) On Thu, Jul 30, 2009 at 12:24 PM, mhanb...@teksystems.com < mhanb...@teksystems.com> wrote: > > Hello Django devs! > > I'm supporting NASA on their NEBULA project and they're looking for > Python / Django experts to join their team here

best approaches with render_to_response and large forms

2009-07-21 Thread Juan Hernandez
Hi there, i have two questions in my mind. 1- Let's say that I have tens of views. Do I always have to use render_to_response? I find it totally against DRY. My solution was creating a wrapper that would take as arguments the template file name and a dictionary with all the parameters for that

Re: Best distro for django

2009-07-03 Thread Juan Hernandez
It doesn't matter. All you have to consider is what kind of modules are you going to be working most of the time and evaluate how easy or hard it is to compile them or install them in that OS. I personally choose any debian based distro because apt-get/aptitude package manager is very powerfull. I

Re: Using the django orm outside a web system

2009-06-03 Thread Juan Hernandez
thanks a lot everybody for your help, I really appreciate it jhv On Thu, Jun 4, 2009 at 11:22 AM, Tom Evans <tevans...@googlemail.com> wrote: > > On Thu, 2009-06-04 at 10:44 +1930, Juan Hernandez wrote: > > Hey there people: > > > > I started developing a django

Using the django orm outside a web system

2009-06-03 Thread Juan Hernandez
Hey there people: I started developing a django application where a user takes a big text file and loads it into a database. I have been able to do pretty much everything but I've been having some problems on scheduling tasks involving the django ORM. I know that python manage.py shell loads the

Re: Help make matriz

2009-05-29 Thread Juan Hernandez
repite lo que quieres hacer en espanol On Sat, May 30, 2009 at 5:13 PM, Carlos Rocha wrote: > I need help I have a data matrix of 6x6 or more what I need is to make the > matrix within the Django admin, but not make them any ideas > example: > colunm1 | colunm2 | colunm3

Re: Expert

2009-05-23 Thread Juan Hernandez
where could I download third party django apps?? On Sun, May 24, 2009 at 8:21 PM, Tim Chase wrote: > > > I like you to plan me a timetable to learn Django from a to z > > in 3 months pleas help me. > > You don't mention your starting point: > > - Do you already

Re: How to display the recent comments

2009-04-18 Thread Juan Hernandez
please define more what you means with comments On Sun, Apr 19, 2009 at 6:10 PM, Bastien wrote: > > Hi, > > I try to find the way to display the recent comments for a given site, > regardless of app / model but the doc doesn't show much, anybody has > it already?

yet another unicode question...

2009-03-18 Thread Juan Hernandez
Hi there, This has been killing me for hours and I don't know what else to do. Is about the famous charset in django. I have this model: class Post(models.Model): user = models.ForeignKey(User) category = models.ForeignKey(Categories) title = models.CharField(max_length=50) post

Models and select

2009-03-17 Thread Juan Hernandez
Hi there: I have this model for example class Categories(models.Model): name = models.CharField(max_length=30) which holds this data on the DB ++--+ | id | name | ++--+ | 1 | Musica | | 2 | Programacion | | 3 | Libros | | 4 | Politica

Re: JOB OPPORTUNITY IN LEICESTERSHIRE, ENGLAND

2009-01-27 Thread Juan Hernandez
djangogigs.com On Tue, Jan 27, 2009 at 9:27 AM, l...@hiveonline.co.uk < l...@hiveonline.co.uk> wrote: > > We are a small, rapidly expanding, company near Loughborough in > Leicestershire and are looking for people who are experienced in using > Django to join our development team. You will need

Re: I'm moving to Oxford

2009-01-14 Thread Juan Hernandez
yes, we are going to miss you very much ;) So long london! On Wed, Jan 14, 2009 at 10:10 AM, Marc Boivin wrote: > Glad you let the whole Django community know ;) > > > On 09-01-14, at 08:52, "Will McGugan" wrote: > > Hi, > > I'm sending this out to

Re: MySpace clone using Django? Is it possible?

2008-12-19 Thread Juan Hernandez
yes! go to the bahamas ;) On Fri, Dec 19, 2008 at 2:45 PM, James Bennett wrote: > > On Fri, Dec 19, 2008 at 12:41 PM, lekvar...@gmail.com > wrote: > > Hi, I wanna know wich of the well known frameworks is the best choice > > for myspace-clone

Re: MySQL case sensitivity

2008-09-22 Thread Juan Hernandez
I've got a MySQL database running on Windows (MySQL on Windows is not > case sensitive) That does not depends on the OS, depends on the Charset established in the DB. Check the charset being used at the DB and then run syncdb again --~--~-~--~~~---~--~~ You

Re: javascript

2008-09-19 Thread Juan Hernandez
what you need here is to enable the static files module or at least, use them inside your templates On Sat, Sep 20, 2008 at 9:33 PM, yozhik <[EMAIL PROTECTED]> wrote: > > Hi all, > > I'm learning django and ran into the following problem. I have an html > file with an external javascript file.

Re: New django 1.0 website: www.astronomy2009.org

2008-09-11 Thread Juan Hernandez
nice dude :) On Fri, Sep 12, 2008 at 9:59 AM, Rock <[EMAIL PROTECTED]> wrote: > > Very interesting. Nice work. > > That scrolling calendar widget near the bottom right of the home page > needs a reset button. > Once you scroll a bit, it fills up with so many events that finding > your way back

Re: best practices editing data

2008-08-26 Thread Juan Hernandez
I solved it base_fields method in form_for_instance() Thanks jhv On Wed, Aug 27, 2008 at 12:53 PM, Juan Hernandez <[EMAIL PROTECTED]>wrote: > Hey there again. > > I have a question, lets say that I have this model: > > class Users(models.Model): > email = models.Ch

best practices editing data

2008-08-26 Thread Juan Hernandez
Hey there again. I have a question, lets say that I have this model: class Users(models.Model): email = models.CharField(primary_key=True, maxlength=240) password = models.CharField(maxlength=60) name = models.CharField(blank=True, maxlength=150) description =

Re: pagination best practices

2008-08-23 Thread Juan Hernandez
Yep, thank you very much jhv On Mon, Aug 25, 2008 at 1:09 AM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Sun, Aug 24, 2008 at 1:23 AM, Juan Hernandez <[EMAIL PROTECTED]>wrote: > >> >> So, let's say that everytime i get a page, the internat query to the db >&

Re: pagination best practices

2008-08-23 Thread Juan Hernandez
I think I get it... domains = g.objects.all() just makes the QuerySet and paginator = ObjectPaginator(domains, 10) executes the query limiting the records to the one requested... Excellent Thanks for your help jhv On Mon, Aug 25, 2008 at 12:53 AM, Juan Hernandez <[EMAIL PROTECTED]>

Re: pagination best practices

2008-08-23 Thread Juan Hernandez
> > > Using the Pagniator makes it so that when you hit the DB, the retrieved > results are limited to those relevant for the page you are displaying. You > are not reading the whole table and then tossing away everything except what > is on the page your are displaying, you are only reading from

Re: pagination best practices

2008-08-23 Thread Juan Hernandez
any suggestions?? hehehe On Sat, Aug 23, 2008 at 7:35 PM, Juan Hernandez <[EMAIL PROTECTED]>wrote: > I have this very simple and primitive pagination method being called with > this instruction in urls.py > > ### > (r'^pyisp/menu/(\d+)/$', 'mai

pagination best practices

2008-08-22 Thread Juan Hernandez
I have this very simple and primitive pagination method being called with this instruction in urls.py ### (r'^pyisp/menu/(\d+)/$', 'mail.views.menuPaginator'), ### This is the method ### def menuPaginator(request, number): domains = g.objects.all() paginator = ObjectPaginator(domains,

Re: الى من يريد مشاركتي معي في الموقع

2008-07-01 Thread Juan Hernandez
im my lil' town this is called SPM :D 2008/7/2 bhunter <[EMAIL PROTECTED]>: > > > On Jul 1, 8:30 pm, GLOBAL705 <[EMAIL PROTECTED]> wrote: > > السلام عليكم > > اما بعد اريد ان الفت انتباهكم الى انة مجموعة كلوبال705 افتتحة موقع من > > محرك

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

2008-06-20 Thread Juan Hernandez
what is the best way to contribute to the project?? It's karma! you have to return somehow what you get :) On Sat, Jun 21, 2008 at 10:18 AM, Norman Harman <[EMAIL PROTECTED]> wrote: > > Django just rocks, thanks. > > It has, > taught me some advanced Python > made me money on consulting

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

2008-06-19 Thread Juan Hernandez
me 2 :D On Fri, Jun 20, 2008 at 10:42 PM, k0001 <[EMAIL PROTECTED]> wrote: > > Can I jump into the "THANKS" bandwagon? > > Thanks. =) > > On Thu, Jun 19, 2008 at 11:41 PM, Gene Campbell <[EMAIL PROTECTED]> > wrote: > > > > Just wanted to "THANKS" for an absolutely awesome web dev

Re: Dictionaries, templates and best practices

2008-06-17 Thread Juan Hernandez
respectively? > > On Jun 17, 1:50 pm, "Juan Hernandez" <[EMAIL PROTECTED]> wrote: > > Hey there > > > > I've been practicing for a while with the template system and I have some > > questions: > > > > Lets say that I create this dictionary:

Dictionaries, templates and best practices

2008-06-17 Thread Juan Hernandez
Hey there I've been practicing for a while with the template system and I have some questions: Lets say that I create this dictionary: test = dict() test[0] = {'title': 'My First Title', 'post': 'My First Post'} test[1] = {'title': 'My Second Title', 'post': 'My Second Post'} etc... til 10 for

Re: Does django-driven Blog popular?

2008-06-12 Thread Juan Hernandez
I think that 99,9% of new framework programmers start with a blog :D It's a very easy yet powerful way to understand a framework jhv On Fri, Jun 13, 2008 at 11:32 PM, kylin <[EMAIL PROTECTED]> wrote: > > Thanks > I am looking forward to finding some samples to study.Could you give > me any

Re: SQLobject vs SQLAlchemy

2008-06-12 Thread Juan Hernandez
> > one of the installation steps for Django is to install MySQLdb or > psycopgl. > These are sqlobject. No, they are not. Those are the "connectors" used by python to connecto to either MySQL or PostrgrSQL. You need them whether you use SQLObject, SQLAlchemy or just to access the DB

Re: SQLobject vs SQLAlchemy

2008-06-12 Thread Juan Hernandez
Well, you can use both anyway On Fri, Jun 13, 2008 at 10:03 PM, Pepsi330ml <[EMAIL PROTECTED]> wrote: > > In the Django Tutorial and Django Book, all the codes example was > using SQLObject. > > Is there a specific reason for using Django with SQLObject instead of > SQLAlchemy? > > > >

DB Models best practice

2008-06-12 Thread Juan Hernandez
Hey there, I have a question concerning performance and best practices I have this piece of code in one of my views = # query execution def db(): return bp.objects.all() def title(): x = db() y = x[0].title return y def blogSubtitle(): return

Re: Trouble Running Tutorial when running syncdb first time on Mac OS X

2008-06-10 Thread Juan Hernandez
sqlite3.OperationalError: unable to open database file <<-- here is the problem, check permissions On Wed, Jun 11, 2008 at 6:00 PM, jeff <[EMAIL PROTECTED]> wrote: > > I have been trying to get Django up and running on Mac OS X (10.5.3). > I did everything in the tutorial and successfully got

Re: Models and DB api

2008-06-10 Thread Juan Hernandez
oohh, now I get it Thank you very much Daniel On Wed, Jun 11, 2008 at 2:28 PM, Daniel Roseman < [EMAIL PROTECTED]> wrote: > > On Jun 10, 5:14 pm, "Juan Hernandez" <[EMAIL PROTECTED]> wrote: > > Now, my question is: How do I treat all these values into a str

Re: Total newbie question

2008-06-10 Thread Juan Hernandez
djangobook.com is a great place to start On Wed, Jun 11, 2008 at 11:33 AM, Gonzalo Delgado < [EMAIL PROTECTED]> wrote: > El Tue, 10 Jun 2008 08:46:14 -0700 (PDT) > Pedro Cora <[EMAIL PROTECTED]> escribió: > > > > > First of all, sorry if i'm making a question that should appear a lot > > here. >

Models and DB api

2008-06-10 Thread Juan Hernandez
Hi there... I'm a long time python programer new to django. I've been playing with the DB api for a while and I have some questions: I have this model, for example: --- # Users class class Users(models.Model): name = models.CharField(maxlength=30) lastname =

Re: oracle-django problem

2008-06-09 Thread Juan Hernandez
why does it have to be that big?? what would be the problem of renaming the models?? On Tue, Jun 10, 2008 at 6:13 AM, Harish <[EMAIL PROTECTED]> wrote: > > hi friends > > i have a django application, which works on postgres as back-end. > now i want to migrate the application back-end

Re: template system and subdirs

2008-06-08 Thread Juan Hernandez
sorry, I already found out. I thought that I was able to load static content off django and I was wrong here's the answer http://www.djangoproject.com/documentation/static_files/ On Mon, Jun 9, 2008 at 5:23 PM, vjanicek <[EMAIL PROTECTED]> wrote: > hey there people... > > I'm a long time