Re: import django fails, what should I look at?

2014-07-25 Thread Andre Terra
On Sun, Jul 20, 2014 at 12:57 PM, Andre Terra wrote: > pip install -e git#https://github.com/django/django.git For the record, the right command is pip install -e git+ https://github.com/django/django.git#egg=django -- You received this message because you are subscribed to the Google Gro

Re: import django fails, what should I look at?

2014-07-20 Thread Andre Terra
You should use pip to install django. This is how I go about it, from a fresh install. mkdir ~/virtual mkdir ~/projects pip install virtualenv # unnecessary in python 3.3+ pip install virtualenvwrapper # use this. it will make your life much simplerecho "export WORKON_HOME=$HOME/virtual" >> ~/.ba

Re: Anyone interested in reviewing the code of a small project - BookMarker

2014-05-26 Thread Andre Terra
Why are you using the webbrowser library? I don't see how it makes sense.. Cheers, AT On Mon, May 26, 2014 at 12:32 PM, Aseem Bansal wrote: > Thanks Shmengie. I was thinking of using class based views as it was > pointed in tutorial that they are better but I was not sure which ones are > goo

Re: django output pdf problem

2014-04-24 Thread Andre Terra
Relevant Stack Overflow question/answer: http://stackoverflow.com/a/9970672/447485 In short, you can't do it over simple Ajax, but you can emulate it. Cheers, AT On Thu, Apr 24, 2014 at 8:56 AM, Tom Evans wrote: > On Thu, Apr 24, 2014 at 4:31 AM, 张永强 wrote: > > > > In my program, I want to

Re: recommended fcgi way for django 1.6 on windows? Problems with https

2014-04-14 Thread Andre Terra
I've used nginx in windows with great results. In fact, I even compiled it on cygwin with additional modules (namely, to track large file uploads) and everything worked smoothly. Cheers, AT On Mon, Apr 14, 2014 at 1:48 PM, anton wrote: > Hi > > I did a test with modwsgi on windows with apache

Re: How do I use mathematical calculations on my forloop Article/Publication list?

2013-11-23 Thread Andre Terra
Take a look at the docs for aggregation and annotation and using F expressions in them. I just skimmed over your email, but there might be something useful to learn there. https://docs.djangoproject.com/en/dev/topics/db/aggregation/ https://docs.djangoproject.com/en/dev/ref/models/queries/#f-expre

Re: Prefork vs threaded when I want to spawn my own threads

2013-09-04 Thread Andre Terra
On Wed, Sep 4, 2013 at 2:36 PM, Javier Guerra Giraldez wrote: > above that, Redis is a clean, fast and very scalable platform for > queues. if you don't have heavy buzzword dependency, i wouldn't > bother checking AMQP systems and stay with Redis. > A thousand times this. You don't need AMQP sys

Re: quick question: RE model relations

2013-09-02 Thread Andre Terra
gument to the definition for > 'GalleryId'. > events.event: Reverse query name for field 'GalleryId' clashes with > related field 'Gallery.Gallery_Id'. Add a related_name argument to the > definition for 'GalleryId'. > > > now i'm really lo

Re: quick question: RE model relations

2013-09-02 Thread Andre Terra
As per the current docs[0], you need to provide a dotted path to your model in the form app.ModelName when defining a ForeignKey. So try this instead: GalleryId = models.ForeignKey('galleryview.Gallery', verbose_name=_('Gallery Id'), related_name='Gallery_Id',blank=True, null=True, help_text=_("Y

Re: I really about to give up Django

2013-09-02 Thread Andre Terra
*Non sequitur*. Obscure variable names can happen regardless of the coder's language choice, and most definitely do not encourge the use of one's native tongue. As others have said in the thread, if you're writing *in English* to ask for help, you should probably code in English as well. It's not

Re: JSON or YAML?

2013-08-30 Thread Andre Terra
It depends on where your data is coming from. YAML has less cruft in it, so if you're writing your own serializer you can consider it to have an advantage over JSON. OTOH, many applications can already export to JSON, so you can leverage that if that's the case. Finally, If you're writing anythin

Re: syncdb issue (begginer stuff)

2013-08-26 Thread Andre Terra
On Mon, Aug 26, 2013 at 1:19 PM, Natko Perko wrote: > @laurent i guess it worked, but now i get the error no module named > wikicamp.wiki.. this is all the code i have so far.. make sure the folder containing wikicamp is inside your PATH so you don't get import errors. make sure there's an __in

Re: I really about to give up Django

2013-08-22 Thread Andre Terra
For the record, it's considered a good coding practice to keep everything in English, including classes, functions and variables. This way it's easier for people to help you. Secondly, your Filhos model should really just be Filho. Finally, don't use obscure names like Brinq. Instead, prefer the

Re: connecting to MS SQL server in addition to default MySQL

2013-08-07 Thread Andre Terra
You can use django-mssql[0] as a backend, and then either use the ORM as usual, write RAW queries with Django[1] or just use SQL directly[2]. Cheers, AT [0] http://django-mssql.readthedocs.org/en/latest/ [1] https://docs.djangoproject.com/en/dev/topics/db/sql/ [2] https://docs.djangoproject.com/

Re: Impossible? Django with NTLM SSO auth on windows?

2013-07-31 Thread Andre Terra
On Sun, Jul 7, 2013 at 5:01 PM, Yves Rausch wrote: > Hello guys, > > we had a similar issue and created a new module on apache 2.4 where you > can use ntlm authentication on a windows machine. > Here is the binary download and some information (including a link to > github repository): http://www

Re: Django Dashboard

2013-07-30 Thread Andre Terra
On Tue, Jul 30, 2013 at 3:16 PM, Charly Román wrote: > > You can try with pydashie, a python port of ruby version: > https://github.com/evolvedlight/pydashie Except that's Flask, not Django. Cheers, AT -- You received this message because you are subscribed to the Google Groups "Django us

Re: Is Celery the best option?

2013-07-19 Thread Andre Terra
I had never heard about Rq before, seems interesting indeed! Thanks for the recommendation. Cheers, AT On Fri, Jul 19, 2013 at 4:04 PM, Doug Ballance wrote: > Celery is a good option, and probably the most used. There are a couple > of other options that may be worth looking into: > > Huey

Re: rich text editor

2013-07-18 Thread Andre Terra
You're welcome! We're here to help. Glad to be of service. Cheers, AT On Thu, Jul 18, 2013 at 3:59 PM, Kakar Arunachal Service < kakararunachalserv...@gmail.com> wrote: > Thank you so much!!! I will try it for sure! Thanks again! > > > On Fri, Jul 19, 2013 at

Re: rich text editor

2013-07-18 Thread Andre Terra
else. Please explain. > Liked "Impossible is nothing™" > > > On Thu, Jul 18, 2013 at 10:44 PM, Andre Terra wrote: > >> Impossible is nothing™, but I don't see the benefits of combining rich >> text with social networking. Things like BBCode[0] usually of

Re: rich text editor

2013-07-18 Thread Andre Terra
Impossible is nothing™, but I don't see the benefits of combining rich text with social networking. Things like BBCode[0] usually offer a better trade-off between flexibility/usability/maintenance. Based on a quick google search, it seems there are solutions tailored for use with Django [1][2] [0]

Re: A PHP framework with some Django features?

2013-06-28 Thread Andre Terra
I've heard good anecdotes about http://laravel.com/... but I'd never ever leave Django... Cheers, AT On Fri, Jun 28, 2013 at 12:52 PM, Deepak Kumar wrote: > I have used symfony2 quite a bit and as very rightly said by *Tiago > Almeida *in the thread below that SonataAdminBundle (in sf2 contex

Re: Django Basics

2013-06-14 Thread Andre Terra
You really *should* use a database, even if you use SQLite just for learning. SQLite saves a .db file to your hard drive, but it's a RDBMS like many other, albeit in simpler form. Take a look at the tutorial[1] and if you have any questions, try googling, asking here or on stackoverflow[2] Cheer

Re: warnings.warn("The Databrowse contrib app is deprecated", DeprecationWarning)

2013-06-11 Thread Andre Terra
Hi, Snake The databrowse contrib app has been deprecated since 1.4, but it's still available as an external library[0]. Please read the release notes for that version to know more about that. [1] Cheers, AT [0] https://pypi.python.org/pypi/django-databrowse [1] https://docs.djangoproject.com/

Re: Django with 2 subapps with same name

2013-05-15 Thread Andre Terra
Despite possibly working with different app_labels, I believe the point still stands that if the storage and invoice apps share a lot of functionality among vendors, they should just be 'invoice' and 'storage' and allow for pluggable companies. Cheers, AT On Mon, May 13, 2013 at 12:02 PM, Tom Ev

Re: Django with 2 subapps with same name

2013-05-10 Thread Andre Terra
Granted this structure doesn't seem reasonable. Each manufacturer shouldn't be a separate app, but rather "backends" to generic storage or invoice apps. So you only need INSTALLED_APPS = ( # ... 'storage', 'invoice' ) And then work from there. The apps themselves should be able to reg

Re: Dynamic forms and related models.

2013-05-09 Thread Andre Terra
On Wed, May 8, 2013 at 6:43 PM, noodlygod wrote: > > > < > Class Level (Text field)> > Definition.objects.filter(category__label='Skill'))> field)> > Definition.objects.filter(category__label=Attribute'))>< Attribute score > (Text field)> > > I was on my way to creating a fully custom form in

Re: Admin pagination not digg-style

2013-04-24 Thread Andre Terra
Override the default template and add a for loop with {% forloop.counter %}'s from 0 to max-pages or whatever the variable is called. Assuming you're talking about the change form, please see this: http://stackoverflow.com/a/3729995/447485 Otherwise you can still probably work from the info provi

Re: Navigation Bar

2013-03-27 Thread Andre Terra
In my last project I created a template tag that would take an app name as an argument and build the links according to that user's permissions for the links in that app. This made the template easier to read at the cost of having to write the function and learning how it worked. Since I was the on

Re: Is file based cache is safe for concurrent process?

2013-03-26 Thread Andre Terra
safe or not, it is slow. why not use redis? On Tue, Mar 26, 2013 at 9:57 PM, Ivan Smirnoff wrote: > Hi all. > Can anyone tell, does django.cache locks file for writing by concurrent > process? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" gro

Re: Using values_list and extra on same queryset

2013-03-26 Thread Andre Terra
Could you provide us any examples or code at all? Cheers, AT On Tue, Mar 26, 2013 at 7:51 PM, Larry Martell wrote: > I have some existing code that calls values_list on a queryset. I need > to add something using extra to this queryset. If I call extra before > values_list the extra stuff is go

Re: What is the difference between instance.title = attrs.get('title', instance.title) vs instance.title = attrs['title'] ?

2013-03-14 Thread Andre Terra
This is a much better explanation on the use of *args and **keywordargs (**kwargs) http://www.saltycrane.com/blog/2008/01/how-to-use-args-and-kwargs-in-python/ On Thu, Mar 14, 2013 at 6:22 PM, Andre Terra wrote: > About the asterisks, please checkout this link: > > http://stackove

Re: What is the difference between instance.title = attrs.get('title', instance.title) vs instance.title = attrs['title'] ?

2013-03-14 Thread Andre Terra
About the asterisks, please checkout this link: http://stackoverflow.com/questions/4306574/python-method-function-arguments-starting-with-asterisk-and-dual-asterisk the difference between dict['key'] and dict.get('key', 'something') is that the second doesn't raise a KeyError exception when 'key'

Re: Impossible? Django with NTLM SSO auth on windows?

2013-03-04 Thread Andre Terra
FYI, I found a nginx module for Kerberos authentication too: https://github.com/fintler/nginx-mod-auth-kerb http://michaelshadle.com/2010/01/17/spnego-for-nginx-a-start-at-least It hasn't been updated in quite some time, but it is apparenlty working and perhaps one of you will feel like taking a s

Re: IntegrityError when creating a brand new model instance

2013-02-08 Thread Andre Terra
Please post traceback, settings.py, etc. On Fri, Feb 8, 2013 at 5:18 AM, Some Developer wrote: > I have a model for a Tag object with simply has two fields. A title (which > has the unique constraint) and a description. I also have a FormView based > view class which handles the creation of Tag o

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

2013-01-31 Thread Andre Terra
I don't have any experience in interviews for developer positions, but I have general job interview tips that you might like. First, get to know your resumé. This is my #1 advice. Interviewers usually want to know why you made your decisions. What was the reason behind picking this or that school?

Re: django support for ms SQL

2013-01-31 Thread Andre Terra
http://django-mssql.readthedocs.org/en/latest/ Cheers, AT On Thu, Jan 31, 2013 at 11:34 AM, wrote: > is there any support for MS SQL ? > > thanks > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop

Re: Long url parameter in GET request locks python

2013-01-30 Thread Andre Terra
I posted this answer on SO and thought I should share it here for the benefit of other and future readers: -- The accepted answer is spot on about the regex, but since we're discussing optimization, I thought I should note that

Re: django: creating tag groups

2013-01-18 Thread Andre Terra
I'd just like to emphasize that django-mptt is *the* way to go. It's one great application that make it a breeze to work with hierarchies. Cheers, AT On Fri, Jan 18, 2013 at 4:01 AM, Sammael wrote: > Amirouche, thank you very much. > jQuery solution is quite interesting but it's more complicat

Re: Return SQL calculation within queryset

2012-07-25 Thread Andre Terra
Please read the following bits of documentation: https://docs.djangoproject.com/en/dev/topics/db/sql/#performing-raw-sql-queries https://docs.djangoproject.com/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.extra Cheers, AT On Tue, Jul 24, 2012 at 9:03 PM, jondbaker wrote: > I'v

Re: Hierarchy Model

2012-07-15 Thread Andre Terra
I recommend using django-mptt. I can't link to it cause I'm writing on my phone, but it's easy to find it on Google. Also, your foreign key should target self rather than Employee, IIRC. Cheers, AT -- Sent from my phone, please excuse any typos. -- On Jul 15, 2012 11:02 AM, "Setiaman Lee" wrote

Re: Hierarchy Model

2012-07-15 Thread Andre Terra
-- Sent from my phone, please excuse any typos. -- On Jul 15, 2012 11:02 AM, "Setiaman Lee" wrote: > Hi, > > I want to implement hierarchy data model which is quite common in > Relational Data Model. > > Let's say I have Employee model which has the relation to the boss which > link to the employ

Re: from future url -- argh

2012-06-14 Thread Andre Terra
Ah, here it is: https://docs.djangoproject.com/en/dev/internals/deprecation/#id2 Cheers, AT On Thu, Jun 14, 2012 at 8:54 PM, Andre Terra wrote: > I was having the same problem, but with the development version (that is, > 1.4+, or soon to be 1.5). > > Just remove the {% load url

Re: from future url -- argh

2012-06-14 Thread Andre Terra
I was having the same problem, but with the development version (that is, 1.4+, or soon to be 1.5). Just remove the {% load url from future %} because the future is NOW! :O The old {% url %} tag has apparently been deprecated, but I can't find any notes on this change after 2 mins of googling. L

Re: Filter by today

2012-06-12 Thread Andre Terra
You're missing result in your queries because your timestamp DateTimeField includes time information (otherwise it would be a DateField). Cheers, AT -- Sent from my phone, please excuse any typos. -- On Jun 12, 2012 7:55 AM, "Simon Pickles" wrote: > Hi, if my model has a timestamp field, > > c

Re: about_dajngo

2012-06-06 Thread Andre Terra
You can also use the Google Chart Tools, if you only need low to moderate complexity charts. https://developers.google.com/chart/ Cheers, AT On Wed, Jun 6, 2012 at 4:11 AM, Pierre de LESPINAY wrote: > If you only need to draw HTML charts, I would suggest to use jQPlot > Le 6 juin 2012 09:06, "

Re: OpenSource IDE with debugger capabilities of PyCharm

2012-06-01 Thread Andre Terra
31, 2012 at 7:55 PM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > On Thu, May 31, 2012 at 6:54 PM, Andre Terra wrote: > > No IDE recommendations, please! > > > > There are many threads regarding that, so please search around, OP. > > > > As for t

Re: OpenSource IDE with debugger capabilities of PyCharm

2012-05-31 Thread Andre Terra
No IDE recommendations, please! There are many threads regarding that, so please search around, OP. As for template debugging, this is currently a limitation in Django itself AFAIK, but efforts are being made to improve the situation. Sincerely, Andre Terra -- Sent from my phone, please excuse

Re: Python IDLE

2012-05-28 Thread Andre Terra
For one thing, I don't know of anybody who uses IDLE as their editor for writing complex code like when developing a website with Django. You can always type 'python manage.py runserver' instead of just 'manage.py runserver' to make sure python is the program that's opening your .py file. It seem

Re: GeoIP install failure, advice needed

2012-05-24 Thread Andre Terra
sudo brew link geoip? Total guess, btw. Cheers, AT On Thu, May 24, 2012 at 6:39 PM, DF wrote: > Several hours of frustration here and looking to see if anyone has any > advice. > > I'm trying to install GeoIP vie Homebrew and receive the following error > just prior to the install finishing: >

Re: track change

2012-05-23 Thread Andre Terra
Google for Django Audit Log and/or Audit Trail. While some of the packages might not be under active development, they may be able to point you in the right direction. Cheers, AT -- Sent from my phone, please excuse any typos. -- On May 23, 2012 5:45 PM, "Carsten Jantzen" wrote: > Hi > > I am l

Re: Generic views create_object and prefill form data?

2012-05-23 Thread Andre Terra
For the record, you could go even further (and you may already have), and make the get_initial part of a WebsiteMixin so that you can reuse it in other views without having to repeat yourself. Cheers, AT -- Forwarded message -- From: Paul Date: Wed, May 23, 2012 at 5:09 PM Subje

Re: Getting Started-Introduction

2012-05-22 Thread Andre Terra
https://docs.djangoproject.com/en/dev/internals/contributing/ On Tue, May 22, 2012 at 11:17 AM, vishrut mehta wrote: > Thank you a lo..! But i tld u im a bit new to all this...Can u > please explain how to solve bugs and submit the patches,means the procedure > ??I am just new to this...

Re: import error: no model named .....

2012-05-17 Thread Andre Terra
Everyone, please follow these guidelines before asking other questions: https://code.djangoproject.com/wiki/UsingTheMailingList Cheers, AT On Thu, May 17, 2012 at 4:14 PM, Tanveer Ali Sha wrote: > even am getting *page not found* error > > 1.^notes/ > the current URL,didnt match any of these

Re: New Release of IBM_DB_DJANGO (1.0.4)

2012-05-16 Thread Andre Terra
I don't even use IBM databases, but I just wanted to say thank you and great job! I'm always happy to see Django being embraced all across the IT industry and to see IBM developing and maintaining an part of this great framework is always heart warming. Keep up the good work! Cheers, AT On We

Re: i need to place my django site on a server, i dont know how to do it! help!!!

2012-05-10 Thread Andre Terra
Or just deploy on heroku http://heroku.com Cheers, AT On Thu, May 10, 2012 at 11:13 AM, eihli wrote: > This won't be a complete list but it's what I can remember off the top of > my head. > Things to do: > Install Python > Install Django > Install database software (I chose Postgres. I guess

Re: 1.4 on git

2012-05-07 Thread Andre Terra
add "django==1.4" to a requirements.txt file (no quotes!) $ pip install -R requirements.txt On Mon, May 7, 2012 at 1:00 AM, Rivsen wrote: > Hi Larry, > > I cloned django and django-old from github, and I found the git index of > yours. > > It's in django-old repo, not in django. > > So you nee

Re: transaction.commit_on_success committing prematurely?

2012-04-24 Thread Andre Terra
This may actually solve one of the problems I've been having regarding slow bulk inserts. I'll look into it, thanks for the pointer!!! Cheers, AT On Tue, Apr 24, 2012 at 2:16 PM, John Begeman wrote: > My app uses multiple databases and my saves were against something > that was not the default

Re: Avoid verbose_name HTML escaping in admin

2012-04-13 Thread Andre Terra
I'm only guessing, but I think the escaping is being done at rendering time by the template itself. Take a look at the default admin templates and check the docs for an explanation on how to override them with your own. Protip: do not edit the original files! Cheers, AT -- Sent from my phone, pl

Re: Django ORM - query help

2012-04-12 Thread Andre Terra
On Thu, Apr 12, 2012 at 10:01 AM, David wrote: > Log.objects.distinct('thing__id').order_by('thing__id', > '-modified_on').select_related().filter(thing__deleted=0)[:20] > > By avoiding the use of values() I was able to then use the result as an > object and access everything I needed. > > The ab

Re: Comparing QuerySets

2012-04-05 Thread Andre Terra
Not sure if this is efficient, but you can try wrapping the values_list in a set() call. >>> set(ids1) == set(ids2) True >>> set(ids1) & set(ids2) set([1]) >>> ids3 = set([]) >>> r = set(ids1) & set(ids3) >>> r set([]) >>> len(r) 0 Cheers, AT On Thu, Apr 5, 2012 at 6:07 AM, Thomas Guet

Re: Difficult setup on Suse Linux

2012-04-05 Thread Andre Terra
There's a chance you have a logging module in your PATH that is shadowing the default package. Did you create an app or project named logging by any chance? Ideas: - From an interactive python shell, import logging and check logging.__file__ In my Ubuntu install, I get: /usr/lib/python2.7/loggin

Re: Problem using django-admin.py in a virtual environment

2012-04-04 Thread Andre Terra
When you type 'django-admin.py foo' in a command prompt, windows will use the system wide python install which is what is associated with the .py extension. In order to avoid this, you must call 'python django-admin.py foo'. If you don't like having to type 'python' before calling a script, you ca

Re: dynamically adding form fields

2012-04-03 Thread Andre Terra
Hi Matt, Search the docs for inlines, inline formsets and inline formset factories, and you'll find exactly what you need [0]. Read them carefully cause it's easy to make mistakes and debugging inlines has always been frustrating for me. Good luck and happy coding. Cheers, AT [0] https://docs.

Re: Profiling Django (WAS Django database-api)

2012-04-03 Thread Andre Terra
wish there were third party apps and tools for debugging this sort of problem. Thanks again for your input. Cheers, AT On Apr 3, 2012 3:47 PM, "Javier Guerra Giraldez" wrote: > > On Tue, Apr 3, 2012 at 8:21 AM, Andre Terra wrote: > > I have some complex and database inten

Re: Need help

2012-04-03 Thread Andre Terra
It could be a regression bug. To be honest, I don't see a reason why '' should become 'localhost' automagically. I'd much prefer if users were forced to write 'localhost' rather than having Django do it (and fail) for them. Explicit is better than implicit. If you haven't yet, please file a bug

Re: Problemas con syncdb

2012-04-03 Thread Andre Terra
I guess you could check if you're actually looking at the right file. $ python manage.py shell >>> import settings >>> print settings.__file__ Cheers, AT On Tue, Apr 3, 2012 at 10:28 AM, DIEGO CENZANO PRADO wrote: > I am trying to do the tutorial and I get an error doing 'python manage.py

Profiling Django (WAS Django database-api)

2012-04-03 Thread Andre Terra
While I know of the two methods mentioned by Anssi, I've often wondered how to profile my code from a project level. I have some complex and database intensive asynchronous tasks running under celery which take a LONG time to complete and I'd just love to be able to keep track of the queries they

Re: Looking for Django IDE

2012-04-02 Thread Andre Terra
OP, there are about a dozen threads regarding django and IDEs in the mailing list. Please search the archive before asking the same question again. Let's try not e-mail thousands of people needlessly! Sincerely, André Terra 2012/4/2 Sells, Fred > Thanks; actually I can use the nightly build f

Re: How Admin can be able to configure Model fields

2012-03-29 Thread Andre Terra
Deepak, Please read through this before posting again: https://code.djangoproject.com/wiki/UsingTheMailingList Cheers, AT On Thu, Mar 29, 2012 at 5:04 AM, Deepak RK wrote: > Admin can add another field in any model (lets say UserProfile ) and > it should start appearing in registration form.

Re: is doing text manipulations in django's template faster than doing same in views

2012-03-29 Thread Andre Terra
If you're doing a lot of operations with your data, there's a chance it should be moved to the view. The template should usually be restricted to defining *how* data gets displayed, whereas the view defines *what* your data is. Cheers, AT On Thu, Mar 29, 2012 at 7:30 AM, vijay shanker wrote: >

Re: IE9+Django,Don't respond or Socket error!!!

2012-03-28 Thread Andre Terra
On Mon, Mar 26, 2012 at 11:31 PM, br wrote: > 2) If you want to use the runserver that comes with django: > - to run runserver, use "manage.py runserver 0.0.0.0:8000" instead of > the default (which goes to localhost or 127.0.0.1) , and then figure > out your computer's IP address in your intrane

Re: ANNOUNCE: Django 1.4 released

2012-03-23 Thread Andre Terra
Hooray! Congrats to everyone involved, especially all that worked on bringing timezone support to this increasingly amazing web framework. I don't mean to nitpick but a minor detail in the release notes requires some attention: "Django does not support Python 3.x at this time. At some point befo

Re: Is there a place for new Django specialized hosting?

2012-03-22 Thread Andre Terra
Forgive me if I sound pessimistic, I'm just a hobbyist developer offering my most sincere 2 cents. There are many services that offer similar features and sometimes even more. From a business perspective, the only way to thrive in this market is by having technology that provides competitive advan

Re: using forloop.counter to access data

2012-03-21 Thread Andre Terra
You could always try writing a custom template tag or filter as someone else suggested earlier in the thread before resorting to JavaScript. Cheers, AT On Mar 21, 2012 5:41 PM, "Larry Martell" wrote: > On Wed, Mar 21, 2012 at 12:52 PM, James wrote: > > > > > > On Wednesday, March 21, 2012 10:41

Re: Preventing JOIN while checking if a self referencing FK is null

2012-03-21 Thread Andre Terra
rify? > > I'm using Django 1.3 and I get: > >>> print Blog.objects.filter(editor=None).values('id').query > SELECT `myapp_blog`.`id` FROM `myapp_blog` LEFT OUTER JOIN > `myapp_user` ON (`myapp_blog`.`editor_id` = `myapp_user`.`id`) WHERE > `myapp_user`.`id`

Re: [bump] Preventing JOIN while checking if a self referencing FK is null

2012-03-21 Thread Andre Terra
Because django offers a nice ORM that makes it easy to do most queries, especially one-liners like this one. And refactoring raw SQL is a royal PITA. Cheers, AT On Wed, Mar 21, 2012 at 3:14 PM, Python_Junkie < software.buy.des...@gmail.com> wrote: > Use straight sql. > > There are always poten

Re: Problem with Django starting up

2012-03-21 Thread Andre Terra
What I recommend is that you install pip and virtualenv, create a folder (say, C:\virtual\) where you will place different python "environments" per virtualenv, then create a folder (say, C:\projects) where you will create different django projects. This way you can always use virtualenv to "activ

Re: Having all objects defined in Models.py editable in one admin page

2012-03-21 Thread Andre Terra
Try writing your own views rather than expanding the Admin. It's well worth it in the long run! Cheers, AT On Wed, Mar 21, 2012 at 1:50 PM, Sithembewena Lloyd Dube wrote: > Hi guys, > > I am building a learning application for a client. The problem we are > experiencing is that of inlines. We h

Re: where did I install Django

2012-03-21 Thread Andre Terra
How to have a sane python setup: 1. use pip and virtualenv[1] 2. ??? 3. PROFIT! Cheers, AT [1] http://www.saltycrane.com/blog/2009/05/notes-using-pip-and-virtualenv-django/ On Tue, Mar 20, 2012 at 8:30 PM, jdw wrote: > got it! This one worked. Thanks. > > On Tuesday, March 20, 2012 3:52:

Re: [bump] Preventing JOIN while checking if a self referencing FK is null

2012-03-21 Thread Andre Terra
On Wed, Mar 21, 2012 at 5:41 AM, diafygi wrote: > >>> Blog.objects.filter(editor=None) > >>> print Blog.objects.filter(editor=None).values('id').query SELECT "myapp_blog"."id" FROM "myapp_blog" WHERE "myappblog"."editor_id" IS NULL Cheers, AT -- You received this message because you are sub

Re: "Dynamyc" modells

2012-03-13 Thread Andre Terra
This is so not what Django was built to do... I have a feeling that if you ever do manage to write it, it's going to be slower than slow and error prone... Sincerely, AT On Tue, Mar 13, 2012 at 4:59 AM, Ervin Hegedüs wrote: > hello, > > On Tue, Mar 13, 2012 at 09:38:34AM +0200, Jani Tiainen

Re: django facebook api

2012-03-12 Thread Andre Terra
Suresh, If you want to get any answers, you must first learn how to make the questions. Please follow the guidelines in this wiki article before posting to the mailing list: https://code.djangoproject.com/wiki/UsingTheMailingList Cheers, AT On Thu, Mar 8, 2012 at 9:24 AM, suresh dokania wrot

Re: Problems getting started

2012-03-07 Thread Andre Terra
Again, don't install as root, use virtualenv. This will save you headaches in the future, and unless you have an inexcusable reason to have Django run as root, you shouldn't. Sincerely, AT On Wed, Mar 7, 2012 at 6:28 PM, backdoc wrote: > I think you might need to install as root or sudo. > > F

Re: User permission

2012-03-07 Thread Andre Terra
What I do: 1) Control user rights in views, always, no matter what. 2) Pass user perms to template so that you only display accessible, permitted links. Cheers, AT On Wed, Mar 7, 2012 at 2:10 PM, Xavier Pegenaute wrote: > Hi, > > Which one is the best option? > > a- Control the user rights in

Re: Problems getting started

2012-03-07 Thread Andre Terra
On Wed, Mar 7, 2012 at 2:53 PM, Sandro Dutra wrote: > I don't know how it's works on a Linux box, but on Windows we've to put > Python/Scripts on PATH variable to use the command directly. Or you can use virtualenv like I mentioned in the other thread. Cheers, AT -- You received this messa

Using django and virtualenv on Mac OS X. (WAS: Getting Started with Mac OS X)

2012-03-07 Thread Andre Terra
You should use pip and virtualenv to create a sane development environment. This guide [1] is originally aimed at ubuntu/linux, but I think you can probably follow in mac os x as well. I've also listed a few other links with instructions that look alright, but that I haven't tested. Basically, do

Re: best resources for learning django

2012-03-02 Thread Andre Terra
First of all, welcome to Django! If you're not familiar with python (and specially managing python packages), I recommend you setup a sane development environment. Namely using virtualenv and pip, and optionally mkvirtualenv (if you're not on windows). Having to figure out import errors is usuall

Re: Error while importing URLconf 'permitprint.urls': day is out of range for month

2012-02-29 Thread Andre Terra
use something like >>> d + datetime.timedelta(days=365) http://docs.python.org/library/datetime.html#timedelta-objects Cheers, AT On Wed, Feb 29, 2012 at 12:59 PM, furby wrote: > Caught it. Haha. What a funny bug. From models.py: > > 196 d = dt.datetime.today() > 197 expires = d.replace(ye

Re: Post data Query Dict - Why not a list ?

2012-02-29 Thread Andre Terra
Excuse my brainfart moment.. sets and dicts are not ordered! On Wed, Feb 29, 2012 at 11:32 AM, Tom Evans wrote: > On Wed, Feb 29, 2012 at 1:46 PM, Andre Terra wrote: > > I may be misunderstanding something, but for one reason lists are not > > ordered, so you'd never kn

Re: Post data Query Dict - Why not a list ?

2012-02-29 Thread Andre Terra
On Wed, Feb 29, 2012 at 5:46 AM, Szabo, Patrick (LNG-VIE) < patrick.sz...@lexisnexis.at> wrote: > Should I not get lists ? > > ** ** > > i.e: > > ** ** > > [Monatsreport] > > [2,29,42] > I may be misunderstanding something, but for one reason lists are not ordered, so you'd never kn

Re: Django Contract - London - Immediate Start - £250pd - £350pd

2012-02-27 Thread Andre Terra
Meanwhile, as you wait for answers, do check http://djangopeople.me/ Perhaps you could contact some locals directly and even schedule a couple of interviews. Cheers, AT On Mon, Feb 27, 2012 at 12:22 PM, Tim Abbott wrote: > Good Afternoon all, > > Firstly, sorry to use the group like this, how

Re: Models inheritance in django: how to change PK "_ptr_id" on "id"?

2012-02-07 Thread Andre Terra
I just read your e-mail quick and somewhat carelessly, so forgive me if I'm missing something. Here's a list of things for you to check: * Have you defined your Client model with abstract = True in its Meta options?[1] * Have you syncdb'd[2]? * If you must name your pk something else, just follo

Re: High cpu usage for wsgi apache processes

2012-01-23 Thread Andre Terra
Hello, Unless you tell us what your app is supposed to be doing, there's very little chance any of us can offer any real help. Cheers, AT On Mon, Jan 23, 2012 at 5:47 PM, TINO THOMAS wrote: > Hello, > > I have a Django setup on cpanel server with python 2.7, virtual env and > mod_wsgi. I can

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-23 Thread Andre Terra
the >>> indicates you are IN a python shell, which is different from your OS prompt. Try exiting the shell first (with exit()) and then run "python manage.py runserver" from a command prompt or terminal window. Cheers, AT On Mon, Jan 23, 2012 at 4:11 PM, JJ Zolper wrote: > > >>> python manage.

Re: what is the best IDE to use for Python / Django

2012-01-19 Thread Andre Terra
*** Everyone, please DO NOT reply to this thread. *** Krondaj, feel free to search the archives for similar threads. This question has been asked an answered at least a dozen times. Cheers, André Terra On Thu, Jan 19, 2012 at 12:08 PM, Krondaj wrote: > Hi, > > I was wondering what the best ID

Re: Missing something obvious? Question about forms

2012-01-18 Thread Andre Terra
at 3:51 PM, Andre Terra wrote: > > https://docs.djangoproject.com/en/dev/ref/forms/fields/#choicefield > > > https://docs.djangoproject.com/en/dev/ref/forms/fields/#django.forms.MultipleChoiceField > > > > > > That is how I almost replied, but a MultipleChoiceFie

Re: url name to generic class-based views with parameters?

2012-01-18 Thread Andre Terra
https://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#url # template.html {% load url from future %} {% url videos pk=video.pk %} # While we're at it, consider defining a more verbose name to the url, such as 'video-detail'. I personally like t

Re: Missing something obvious? Question about forms

2012-01-18 Thread Andre Terra
https://docs.djangoproject.com/en/dev/ref/forms/fields/#choicefield https://docs.djangoproject.com/en/dev/ref/forms/fields/#django.forms.MultipleChoiceField Cheers, AT On Wed, Jan 18, 2012 at 12:42 PM, Jeff Heard wrote: > I have a largish API I have to implement from a standard, and it requires

Re: mac vs windows installation /deployment

2012-01-16 Thread Andre Terra
On Mon, Jan 16, 2012 at 2:43 PM, Python_Junkie < software.buy.des...@gmail.com> wrote: > I guess I am digging in a lot deeper into this topic that I had > intended, but your statement above > about each developer compiling their own source code seems to go > against the DRY > principle. > The DR

Re: Does anyone know any blogs that write about how to quickly install and deploy a django application on Amazon EC2?

2012-01-13 Thread Andre Terra
nginx runs on windows xp, and should run on vista/7 too. I've even managed to compile a version on cygwin with an additionally patched module that allows for file upload progress tracking. If anyone wants it, i can put it on github with a sample .conf file, but no strings attached at all. Cheer

  1   2   3   4   5   >