Re: os.path.exists(UNC) returns False in Apache, while True in manage.py runserver

2008-10-02 Thread Andre
Problem solved: running Apache as a service did not have same permission as my UID. Restarted service running under my user (configured Windows service) and got access to those files. A On Oct 2, 3:06 pm, Andre <[EMAIL PROTECTED]> wrote: > Regards to all, > > I have complete

os.path.exists(UNC) returns False in Apache, while True in manage.py runserver

2008-10-02 Thread Andre
n W2000. I suspect it's something to do with apache configuration, security, etc. I even tried if os.path.exists("\\file_server01\myproject\mydir".replace('\\', '/')) Any ideas anyone? Is this the right forum to discuss? TIA, Andre --~--~-~--~~--

Help with Querying Related Models, Please!

2009-05-07 Thread andre
""" Background: As described on the "User Authentication in Django" manual, I am using an additional model to store extra information about users. This additional model (J2User) model uses a ForeignKey to the User model and is specified below. Problems (all related): 1) Accessing the J2User mod

Users select tag in Admin

2007-12-04 Thread Andre
Hey there. I've created a model, which is related to the Admin Users model, like this: user = models.ForeignKey(User) Now, when I open a page to add/edit a record of my model class, a select tag with all the users of my site is displayed. That's good. What is not, is that in that select I see t

Django ORM - better handling of connections

2018-05-14 Thread andre
Hello. For the last 6 years I've been using gevent's greenlets to serve Django requests, instead of tying up a thread or a process, and this has served me well for web applications that deal with slow streaming clients, or have to call some slow external services mid-request, or are just IO-bou

Re: Django ORM - better handling of connections

2018-05-14 Thread andre
Hello Simon. On Monday, May 14, 2018 at 6:15:50 PM UTC+1, Simon Charette wrote: > > > Is there a way to force Django to close the DB connection after each > operation (unless we're in an atomic block)? > > The only way I can think of achieving that is by bundling your own > database backend subc

Re: Best IDE for Django and python?

2008-11-26 Thread Andre Meyer
On Wed, Nov 26, 2008 at 4:20 PM, Steve Phillips <[EMAIL PROTECTED]> wrote: > I personally use Komodo Edit along with IDLE. Also instead of using > "manage.py shell" I use IDLE. I am so spoiled by the autocompletions. I am also using Komodo IDE and like it a lot. You may also want to check out

documentation offline, which CSS?

2008-07-15 Thread Andre Meyer
hi all like other people, i tried to get an offline copy of the django docs. so, running rst2html from docutils works fine, but there is a problem with the links (directing to the site instead of the local docs) and it looks a lot less appealing. when using the original CSS from the site it looks

Re: documentation offline, which CSS?

2008-07-15 Thread Andre Meyer
hi David that looks nice, thanks. hope you can make it work again. thanks André On Tue, Jul 15, 2008 at 6:59 PM, David Larlet <[EMAIL PROTECTED]> wrote: > > > Le 15 juil. 08 à 11:58, Andre Meyer a écrit : > > > hi all > > > > like other people, i tried

how to access foreignkey field (related_name) in newforms-admin list view?

2008-07-17 Thread Andre Meyer
hi all imagine you have a first model class and a second model class with a ForeignKey referring to the first one. for example, a Post model (taken from the tutorial blog app) and a Comment model. of course, a post can have multiple comments, so the Post model gets an attribute 'comments' (specifi

Re: how to access foreignkey field (related_name) in newforms-admin list view?

2008-07-17 Thread Andre Meyer
for %} or {{ post.comments.all|length }} looks inconsistent to me. thanks & cheers André On Thu, Jul 17, 2008 at 4:14 PM, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > > > > On Jul 17, 8:32 am, "Andre Meyer" <[EMAIL PROTECTED]> wrote: > > hi all > > > > im

Re: how to access foreignkey field (related_name) in newforms-admin list view?

2008-07-17 Thread Andre Meyer
hi Rajesh On Thu, Jul 17, 2008 at 6:55 PM, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > > Hi, > > > still, it's not exactly clear to me why the admin does not work the same > as > > other templates. > > The Admin is not a template. So, I don't know what you mean by that. admin is not using templa

Re: how to access foreignkey field (related_name) in newforms-admin list view?

2008-07-18 Thread Andre Meyer
hi Rajesh so, implemented it as you told and it works very well. thanks for your patience and all the explanations. cheers André On Thu, Jul 17, 2008 at 7:22 PM, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > > > > > > still, it's not exactly clear to me why the admin does not work the > same > >

Re: Model Inheritance in new-forms admin

2008-07-18 Thread Andre Meyer
hi i had (and still have) the same problem . really hope this gets fixed (be)for(e) 1.0; patches seem to be available, so it can't be long... ;-)

filter on a method

2008-07-20 Thread Andre Meyer
hi all it does not seem to be possible to filter on the return value of a model's method, or is it? are there alternative ways to achieve this? my situation is as follows: there is a model with several child models (via model inheritance). i want to retrieve in a single query set all instances (f

propagation of modification in children to parents

2008-07-20 Thread Andre Meyer
hi all i have a model with a modifed field modified = models.DateTimeField(auto_now=True) and a parent field parent = models.ForeignKey('self', related_name='children', null=True, blank=True) in order to allow for creating a tree of items. what is the best way to propagate a modification in a

Re: How to have both newforms-admin and previous version on the same machine?

2008-07-20 Thread Andre Meyer
hi all newforms-admin has been merged, so you can go back to trunk. anyway, maybe you can do the same as i do: put a django.pth file in site-packages which includes all the paths to the branches you want to use. just uncomment the one you want to use at a given moment. you can add more paths to t

Re: filter on a method

2008-07-20 Thread Andre Meyer
hi Malcolm thanks a lot for your explanations. i am much more fluent with Python than SQL, anyway ;-) do you happen to have a good link for a merge-sort-style technique at hand? btw: wrt. merging query sets, i tried this ModelA.objects.filter(parent=None) | ModelB.objects.filter(item=None) bu

Re: propagation of modification in children to parents

2008-07-20 Thread Andre Meyer
t; > ModelA(models.Model): >modified = models.DateTimeField() > parent = models.ForeignKey('self', related_name='children', > null=True, > blank=True) > > def save(def): >self.modified = datetime.now() >if self.parent: >

Re: propagation of modification in children to parents

2008-07-21 Thread Andre Meyer
add_now>still being worked on? class Foo(models.Model): created = models.DateTimeField(auto_now_add=True) modified = models.DateTimeField(auto_now=True) thanks André On Mon, Jul 21, 2008 at 8:18 AM, Andre Meyer <[EMAIL PROTECTED]> wrote: > hi Julien > > that makes per

Re: propagation of modification in children to parents

2008-07-21 Thread Andre Meyer
n < [EMAIL PROTECTED]> wrote: > > On Jul 21, 7:52 pm, "Andre Meyer" <[EMAIL PROTECTED]> wrote: > > hi again > > > > so, auto_now is deprecated and can be replaced by overriding the > > save()method. but what about > > auto_now_add? > >

ticket #6755 closed: Model Inheritance doesn't work in the admin.

2008-07-22 Thread Andre Meyer
hi all wow, ticket #6755 is closed! so, just tried it out and got an error, oh my dear! is it me or is there still a problem? here is the code (simplified) *model.py* class Item(models.Model): pass class Note(models.Model): text = models.Te

Re: Which IDE do you choose with django?

2008-10-13 Thread Andre Meyer
you might also want to take a look at the django-komodo-kit: http://code.google.com/p/django-komodo-kit/ cheers apm On Sun, Oct 12, 2008 at 11:13 PM, Anders Bergh <[EMAIL PROTECTED]> wrote: > > On Sun, Oct 12, 2008 at 6:19 PM, zjffdu <[EMAIL PROTECTED]> wrote: > > > > I am a newbie of django, a

Re: If logged in show X, if not Y

2010-11-28 Thread Andre Terra
s authenticated" part to the view: if is authenticated: render logged_in.html else: render not_logged_in.html Regards, Andre Terra On Sun, Nov 28, 2010 at 22:50, robos85 wrote: > Hi, > I've read about {% if user.is_authenticated %} and m template is going > to have the s

Re: Django admin photo upload

2010-11-29 Thread Andre Terra
For anyone else who's interested, I've heard great things about sorl-thumbnail too, haven't used it myself. I hope all is fine with easy_thumbnail. Regards, Andre Terra On Mon, Nov 29, 2010 at 10:39, Sithembewena Lloyd Dube wrote: > @Kenneth, thanks again. easy_thumbnail

Re: django to php

2010-11-30 Thread Andre Terra
Because he can't drive stick. Regards, Andre Terra On Tue, Nov 30, 2010 at 16:53, CLIFFORD ILKAY wrote: > On 11/30/2010 02:26 AM, Akash Mukherjee wrote: > >> Hello, >> >> I have a webapp created in django. Now I want to convert the entire >> code int

Re: missing object in object_list generic view

2010-11-30 Thread Andre Terra
Start by reading http://www.b-list.org/weblog/2006/nov/16/django-tips-get-most-out-generic-views/ and finish by writing one (or many!) wrapper function(s) as suggested. It will make your code 1) readable, 2) easier to debug, 3) extensible, 4) powerful, and 5) DRY. Cheers, Andre Terra On Tue

Re: Error in ajax request

2010-11-30 Thread Andre Terra
Noob question here: why would it need limit=5 if the funcion has default values? Best regards, Andre Terra On Mon, Nov 29, 2010 at 20:17, Daniel Roseman wrote: > On Nov 29, 8:28 pm, James Matthews wrote: > > Hi, > > > > When I use this rate limiterhttp:// > www.levig

Re: Unresolved import in Eclipse

2010-12-01 Thread Andre Terra
he standalone version. Sincerely, Andre Terra On Wed, Dec 1, 2010 at 21:51, cootetom wrote: > I take it you're using PyDev with eclipse? My experience is that > eclipse often says that it can't resolve an import but is wrong. Just > remember an import will work if it is on you

Re: Error in ajax request

2010-12-02 Thread Andre Terra
Ah, gotcha. What was I thinking? It's pretty obvious now :P On Thu, Dec 2, 2010 at 21:37, pjrhar...@gmail.com wrote: > On Dec 1, 2:43 am, Andre Terra wrote: > > Noob question here: why would it need limit=5 if the funcion has default > > values? > > Even if it has

Re: Pre-filled user info in Django Comments?

2010-12-10 Thread Andre Terra
>From my experience, adapting to http://code.google.com/p/django-threadedcomments/ pays off. You said "the site I'm *building*", and we all know it's definitely easier to explore other possibilities early on. Best regards, Andre Terra (airstrike) On Fri, Dec 10, 201

serving static content on Windows

2008-04-16 Thread Andre Meyer
hi all i am new to Django and trying to figure out a few things. so far, everything looks very nice. but now, i am stuck at something very simple: i cannot manage to serve static content (images, css, dojo, ...) from Django itself. i have done what is described at http://www.djangoproject.com/doc

custom form on admin interface page

2008-04-18 Thread Andre Meyer
hi all so, here is my plan: i want to add a simple form on one of the admin pages. this should allow the admin to import data (read a file, parse and fill the database). the problem is now that it is unclear to me where to add this form. which admin template to use? how to figure out whether the

Fwd: custom form on admin interface page

2008-04-21 Thread Andre Meyer
y and customize the copy. > Looking at the above resources it looks like one would use the same > directory scheme for either admin: > > path/to/project//admin///change_list.html > > using your template snippet from above, and the tutorial polls app, as an > example if your p

Re: Changing admin index

2008-04-22 Thread Andre Meyer
try this: http://www.djangoproject.com/documentation/tutorial02/#customize-the-admin-index-page http://www.djangobook.com/en/1.0/chapter17/ cheers André On Tue, Apr 22, 2008 at 8:48 PM, Matthias Kestenholz <[EMAIL PROTECTED]> wrote: > > Hi, > > On Tue, 2008-04-22 at 11:37 -0700, dimrub wrote: >

Re: Suggestions on UI (client side web) framework to complement Django

2008-04-29 Thread Andre Meyer
On Tue, Apr 29, 2008 at 9:00 PM, Szaijan <[EMAIL PROTECTED]> wrote: > > In searching for a JS toolkit for my first JS app, I found YUI and > Dojo to be of equal power and utility, but YUI is MUCH better > documented. bad documentation for Dojo is a myth - nowadays. Dojo 1.1 is well documented an

Re: where can i download newformsadmin

2008-05-14 Thread Andre Meyer
hi all there was a post a year ago saying that newforms-admin would be merged to the trunk "soon" (or the 1.0 release, respectively). obviously, this did not happen, yet. any idea when this might be done? does the newforms-admin branch inc

Re: Django and Linux distros

2008-05-16 Thread Andre Meyer
hi Jon ubuntu certainly works like a charm and you may want to use eclipse with pydev, just like on windows. i use it on both platforms (even on the same machine using a shared partition). cheers André On Fri, May 16, 2008 at 12:24 PM, JonSidnell <[EMAIL PROTECTED]> wrote: > > Hi everyone > >

This field is required. NO!

2008-05-16 Thread Andre Meyer
hi all now, this is driving me crazy. this problem persists even after switching from 0.96.1 to the newforms-admin branch. after declaring a model class with an attribute that may be null (pn) the admin site still tells me to fill in that field, because "This field is required.", but it isn't. i

Re: This field is required. NO!

2008-05-16 Thread Andre Meyer
oh dear, this seems to be a well-known thing. thanks so much for this, it works! still need to figure out why ;-) thanks to you all André On Fri, May 16, 2008 at 1:10 PM, Ben Ford <[EMAIL PROTECTED]> wrote: > > Andre, > > You also need blank=True here: >

Re: Does anyone use Eric to edit templates

2008-05-25 Thread Andre Meyer
On Sun, May 25, 2008 at 12:13 PM, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > > On 25-May-08, at 10:37 AM, Gene Campbell wrote: > > > If there's something better than > > Eric for templates, can you recommend? > Komodo Edit (or IDE) http://www.activestate.com/Products/komodo_ide/komodo_edit

model inheritance and admin (qs-rf & nf-a)

2008-05-28 Thread Andre Meyer
hi all working with the newforms-admin branch i tried to build a model using model inheritance: e.g. Task is a subclass of Item, fine. but in the admin interface (this is probably true for old and newforms versions) there is something funny happening. when trying to add a Task instance there is a

Re: model inheritance and admin (qs-rf & nf-a)

2008-05-28 Thread Andre Meyer
hi Karen thanks a lot, will check out the patch On Wed, May 28, 2008 at 2:15 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Wed, May 28, 2008 at 7:27 AM, Andre Meyer <[EMAIL PROTECTED]> > wrote: > >> hi all >> >> working with the newforms-admin branch

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

2008-06-02 Thread Andre Meyer
hi all i had the same experience the first time i wanted to try out django. the need to set up apache and mysql before you can even do anything is quite troublesome for first-time users. but this is absolutely not necessary. you can go strated almost instantly with the built-in server and sqlite.

serving root from static

2008-06-05 Thread Andre Meyer
hi all is it possible to serve static files from the root of a domain name? these files would either be served by apache or runserver from the static directory as defined in the settings. my goal is to use some static files for the main entrance to a web site and have several django apps, all wit

"more than 1 ForeignKey" error in newforms-admin

2008-06-09 Thread Andre Meyer
hi all just a quick question to be sure: is it on purpose that newforms-admin does not allow more than one ForeignKey? or is it a not yet supported feature? i have a model with a class that has a foreign key and a subclass that has another. this works well for creating the database, but the admi

Re: "more than 1 ForeignKey" error in newforms-admin

2008-06-09 Thread Andre Meyer
On Mon, Jun 9, 2008 at 9:21 PM, James Bennett <[EMAIL PROTECTED]> wrote: > > On Mon, Jun 9, 2008 at 2:08 PM, Andre Meyer <[EMAIL PROTECTED]> > wrote: > > i have a model with a class that has a foreign key and a subclass that > has > > another. this works wel

Re: serving root from static

2008-06-09 Thread Andre Meyer
= patterns('myproject.views', (r'^$', 'home') views.py def home(request): return render_to_response('static/index.html') maybe use something like return HttpResponse('/static/index.html') but how? On Thu, Jun 5, 2008 at 6:07 PM, J

raise AlreadyRegistered

2008-06-09 Thread Andre Meyer
hi all i was trying to write a little script to populate my database with test data after i have rebuilt it due to model changes. it seems to work (set the path and imports appropriately), but i get this infamous django.contrib.admin.sites.AlreadyRegistered error when running the script. is there

Re: raise AlreadyRegistered

2008-06-09 Thread Andre Meyer
On Tue, Jun 10, 2008 at 12:32 AM, Andre Meyer <[EMAIL PROTECTED]> wrote: > hi all > > i was trying to write a little script to populate my database with test > data after i have rebuilt it due to model changes. it seems to work (set the > path and imports appropriately), bu

Re: serving root from static

2008-06-09 Thread Andre Meyer
tml file from the static directory. thanks again André On Tue, Jun 10, 2008 at 1:34 AM, Colin Bean <[EMAIL PROTECTED]> wrote: > > On Mon, Jun 9, 2008 at 3:25 PM, Andre Meyer <[EMAIL PROTECTED]> > wrote: > > thanks Jeff > > > > yes, i had found this method of

Re: serving root from static

2008-06-11 Thread Andre Meyer
oh yes, this is it! great stuff! thanks a lot André On Wed, Jun 11, 2008 at 9:46 AM, Daniel Hepper <[EMAIL PROTECTED]> wrote: > > > (r'^$', 'django.views.static.serve', {'document_root': > '/path/to/static','path':'index.html'}), > --~--~-~--~~~---~--~~ You recei

Re: Django HTML Editor

2008-06-14 Thread Andre Meyer
Hi You might wanna take a look at Komodo Edit.It supports Django templates. It's not WYSIWYG, though. cheers André On Sat, Jun 14, 2008 at 8:36 AM, Ngu Soon Hui <[EMAIL PROTECTED]> wrote: > > Forgot to mention, it would be defin

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

2008-06-22 Thread Andre Meyer
me too: django is the best in design, features, documentation and community just awesome! --~--~-~--~~~---~--~~ 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@googl

Re: Do you code django with Komodo?

2008-06-24 Thread Andre Meyer
hi i am using Komodo IDE 4.4 (out today) and like it a lot (switched from eclipse/pydev). Komodo works very well and has a lot of very nice features. the syntax checking of Python and DTL are very nice, just like the autocomplete and code browser. of course, editors and IDEs are a very personal c

Re: Do you code django with Komodo?

2008-06-25 Thread Andre Meyer
On Wed, Jun 25, 2008 at 9:21 AM, Ben Ford <[EMAIL PROTECTED]> wrote: > > BTW: would anybody be interested in contributing to a Komodo-Django >> extension with shortcuts to manage.py etc., modeling wizards and so on? > > > Hell yeah, is it relatively straightforward or very involved? I know python

Re: Do you code django with Komodo?

2008-06-25 Thread Andre Meyer
On Wed, Jun 25, 2008 at 9:55 AM, ristretto. rb <[EMAIL PROTECTED]> wrote: > Has anyone used Komodo and Wing and can recommend one over the other? > Or are they about the same in general? i have indeed used them both and chosen Komodo IDE. used Komodo Edit, too, but prefer the added features of t

Re: Do you code django with Komodo?

2008-06-25 Thread Andre Meyer
this might be of interest: http://community.activestate.com/forum-topic/django-lexer-incomplete?destination=node%2F2497 cheers André On Wed, Jun 25, 2008 at 11:54 AM, Alaa Salman <[EMAIL PROTECTED]> wrote: > > On Jun 25, 11:23 am, "Andre Meyer" <[EMAIL PROTECTED]&g

ForeignKey adds no backwards relations

2008-07-06 Thread Andre Meyer
hi all so, i am trying to add notes to tasks in this simple model (using newforms-admin 7844): class SimpleItem(models.Model): title = models.CharField(max_length=512) class SimpleTask(SimpleItem): done = models.BooleanField() due = models.DateTimeField(null=True, blank=True) class

Re: ForeignKey adds no backwards relations

2008-07-06 Thread Andre Meyer
wrong? thanks André On Sun, Jul 6, 2008 at 1:36 PM, Andre Meyer <[EMAIL PROTECTED]> wrote: > hi all > > so, i am trying to add notes to tasks in this simple model (using > newforms-admin 7844): > > class SimpleItem(models.Model): > title = models.CharFiel

Re: ForeignKey adds no backwards relations

2008-07-06 Thread Andre Meyer
oh yes, that makes sense! moved t.save() to just after its intialisation for better overview. thanks a lot, Malcolm On Sun, Jul 6, 2008 at 2:01 PM, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > > On Sun, 2008-07-06 at 13:36 +0200, Andre Meyer wrote: > [...] >

determining model subclass

2008-07-07 Thread Andre Meyer
hi all is it possible to determine the subclass of a model instance? what i mean is this: if you have a (n abstract) model class and two subclasses, like class Item(models.Model): pass class Task(Item): pass class Event(Item): pass and you retrieve items = Item.objects.all() how

Re: determining model subclass

2008-07-12 Thread Andre Meyer
ut according to the docs it should work.... You > should also fill in the correct exception. I just don't know what it > is. > > Hope it helps. > > Dave. > > > > > > > On Jul 8, 2:12 am, "Andre Meyer" <[EMAIL PROTECTED]> wrote: > > h

Django + Apache2 and mod_python on FreeBSD 5.4

2005-08-02 Thread Andre Posumentov
Hi, I'm posting this in case anyone else is having trouble persuading the current FreeBSD 5.4 'port' installations of mod_python / Apache2, and Django to play together nicely. Trivial mod_python examples work fine, but attempts to run Django result in Apache crashing with: Fatal erro

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

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

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

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

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

  1   2   3   4   5   6   >