Django, Eclipse, Autocomplete

2010-11-15 Thread xpanta
Hi, I am using eclipse Galileo (Build id: 20100218-1602) and PyDev to build a Django project. Autocompletion works fine for python language but not for django. For example in models.py I cannot get the field = models.CharField(max_length=100) to be autocompleted. I have added path\to\python26\Li

Re: django tagging app choices

2010-11-15 Thread Thomas Schreiber
check the grids on django packages: http://djangopackages.com/grids/g/tagging/ On Mon, Nov 15, 2010 at 22:22, gyanguru wrote: > Hi all, > > I am looking for django tag project. I have discovered 2 "django > tagging" and "django tagit". > Does any one has a benchmark regarding this? > or > Any adv

Re: OT: getting strange attempted gets

2010-11-15 Thread Steve Holden
On 11/15/2010 12:03 PM, Scot Hacker wrote: > On Nov 14, 11:25 am, Federico Capoano > wrote: >> > No one is attacking your server, that's just the django server telling >> > you what's going on in your app (when you perform any action the >> > server logs it). > Right, but he said he's seeing reque

Re: Set Language in the Admin

2010-11-15 Thread someLiang
just make it seems like this: MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', #'django.middleware.locale.LocaleMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.A

Re: Set Language in the Admin

2010-11-15 Thread someLiang
perhaps you need to comment the statement in your setting.py 'django.middleware.locale.LocaleMiddleware', 2010/11/15 Federico Capoano > Hi guys, > > i'm developing an app in 3 languages, en, es and it. > > My browser accepts all of them with priority to italian. > > Since I've done that the a

django tagging app choices

2010-11-15 Thread gyanguru
Hi all, I am looking for django tag project. I have discovered 2 "django tagging" and "django tagit". Does any one has a benchmark regarding this? or Any advice on which tagging app should I use. My use case requires less amount of unique tags compared to number of items to be tagged. Cheers Gya

Re: django with pinax.

2010-11-15 Thread Cancer
seems your problem was solved? 2010/11/12 sh4d0w > Hi guys just trying to get the admin section of a pinax site working > and i am getting the following error when i try and load the admin > section. > > TemplateDoesNotExist at /admin/ > admin/login.htmlRequest Method: GET > Request URL: http://

script adding FileField, no attribute chunks

2010-11-15 Thread Mitch Anderson
I'm having a problem with a command script that I want to create a object that has a FileField as part of the model. My Model Looks like this: class Files(models.Model): STATUS = ( ('unknown', 'Unknown'), ('down', 'Downloading'), ('done', 'Done'

Re: Dynamic user-filtered search

2010-11-15 Thread Ed
Ok, so I wrote some UNPROTECTED jquery/django code to pass filters to the database. Through a combination of drop down boxes and user input boxes (exactly like you would see in iTunes), I am using jquery to construct the filter. As an example, let's say the user selects in the first drop down: "Y

No get_absolute_url in Django admindocs

2010-11-15 Thread Valentin Golev
Hello, get_absolute_url() methods for any of my models do not show up in admin.docs. Is it a bug or a feature? The source of this behavior is what guard "len(inspect.getargspec(func) [0]) == 1" [1] does not work. I think it is because of some get_absolute_url() hackery in Django [2]. I'd also wa

representing a possible future object in a form?

2010-11-15 Thread Preston Holmes
This is a cart/horse pattern I run now and then, and while I can think of several sort of ugly ways to do it, I'm wondering if someone has a clean solution in Django. I'm going to use a gradebook as an example. The goal is to present a user with a grid of lets say students and assignments to ente

Re: get_object_or_404

2010-11-15 Thread Colin Bean
On Sun, Nov 14, 2010 at 9:23 PM, Akn wrote: > Hi, > I would like to use get_object to retrieve an object form the > database, but if the object does not exist I do not want to display an > error page(404). Is there any command that does that. > > ob=get_object(Table,x=y) > if not ob >     > >

Should CSRF Middleware return 403 or 500 error from AJAX call?

2010-11-15 Thread Brett Thomas
Hi there, Ran into some unexpected CSRF behavior - not sure if it's desired or a bug. An AJAX request that includes the "X-Requested-With: XMLHttpRequest" header but does not include csrf token will bypass CSRF middleware. If you hit server error (mine was a TypeError), response has error code 500

Re: Show DEBUG page to specific user group?

2010-11-15 Thread Josh
Hmm, I didnt know that, I'm still fairly new to python and django. So if I understand this right DEBUG is basically static once the server starts and will only change with a restart of the server (whatever environment that happens to be in). Thanks for the help! -Josh On Nov 15, 4:32 am, Tom Ev

how can i define a decimal_separator and a thousand_separator

2010-11-15 Thread refreegrata
Hello list, I have a question. How can i define a custom decimal_separator and a custom thousand_separator independently of the locale?. I don't want redefine this values to every "locale". To my problem, in every the template must to display the same thousand separator and the decimal separator.

Re: OT: getting strange attempted gets

2010-11-15 Thread Scot Hacker
On Nov 14, 11:25 am, Federico Capoano wrote: > No one is attacking your server, that's just the django server telling > you what's going on in your app (when you perform any action the > server logs it). Right, but he said he's seeing requests that *can't* be explained by his own requests. I see

Re: Django Dropdown List

2010-11-15 Thread Shawn Milochik
You'll need to use AJAX for this, or refresh the entire page. Be aware that you'll have to have all the states/provinces as 'choices' in the ChoiceField in the form, otherwise the form won't validate. As for examples, just do a quick Google search. The easiest way (in my opinion) is to use jQuery

Django Dropdown List

2010-11-15 Thread d
Hi Does anyone know how to update dropdown list dynamically? If I select a country, then all states in that country will pop in the list. Can any one provide a relevant example. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gr

Re: Automatically assume "models." prefix in models.py

2010-11-15 Thread Thomas Schreiber
You could configure your text editor to insert a starting model class. class Modelname(models.Model): """Modelname description""" name = models.CharField(max_length=256) def __unicode__(self): return u"%s" % (self.name,) On Mon, Nov 15, 2010 at 09:57, James wrote: > On Mon,

Re: Installing Django on Ubuntu

2010-11-15 Thread Piotr Zalewa
On 11/15/10 14:41, Flaviu Simihaian wrote: > zalun, > > I thought to get mkvirtualenv you have to install the > virtualenvwrapper shell commands: > > $ pip install virtualenvwrapper > $ export WORKON_HOME=~/VirtualEnvs > $ mkdir -p $WORKON_HOME > $ source /usr/local/bin/virtualenvwrapper.sh > >

Re: CMS for django

2010-11-15 Thread Piotr Kilczuk
> I like Merengue CMS, a Django based CMS with steroids, but some of > the steroids are non free software. > > http://www.merengueproject.org/ > Wow, looks promising. I'll have to try it out myself. Thanx :) Regards, Piotr -- You received this message because you are subscribed to the Google

Re: CMS for django

2010-11-15 Thread Manuel Pinot a.k.a. talishte.com
> I would welcome comments on what CMS is compatible with django. > I have seen much on the web regarding this topic, but I would > suspect that from this ML I am much more likely to hear directly > from someone who is deploying a CMS with django. > > thanks in advance > -- > Tim > tim at johnsons

Re: bash: django-admin.py: command not found

2010-11-15 Thread Tom Evans
On Mon, Nov 15, 2010 at 2:57 PM, Marc Aymerich wrote: > Seems that your shell doesn't know where django-admin.py is. In what > directory you have installed django? > > You can solve this problem by making a symbolic link like this: > > ln -s "$DJANGO-INSTALLED-PATH"/django/bin/django-admin.py /usr

Re: bash: django-admin.py: command not found

2010-11-15 Thread Shawn Milochik
The version of Python isn't related to this. The problem is that the django script you are calling isn't on your system's PATH. If a program is on your PATH, such as the 'ls' command, you can just type 'ls' and it will run. If you type 'which ls' you will see where the program lives. You can also

Re: bash: django-admin.py: command not found

2010-11-15 Thread Tom Evans
On Mon, Nov 15, 2010 at 1:44 PM, ErritG wrote: > Hi Everybody, > > Been struggling with the first part of the Tutorial. Even though the > 'bash: django-admin.py: command not found' has been solved by others I > can't seem to get around this error. Perhaps it's because I'm using > version 2.7 while

Re: bash: django-admin.py: command not found

2010-11-15 Thread Marc Aymerich
On Mon, Nov 15, 2010 at 2:44 PM, ErritG wrote: > Hi Everybody, > > Been struggling with the first part of the Tutorial. Even though the > 'bash: django-admin.py: command not found' has been solved by others I > can't seem to get around this error. Perhaps it's because I'm using > version 2.7 while

Re: Automatically assume "models." prefix in models.py

2010-11-15 Thread James
On Mon, Nov 15, 2010 at 7:48 AM, bruno desthuilliers wrote: > On Nov 14, 8:20 am, James wrote: >> Forgive a django newbie... >> >> Maybe I'm the laziest person in the world, but sometimes I get tired >> of typing "models.WhatEver" for every single model I have to write. Is >> there anyway a short

Re: Can't move down then up the directory tree for inserting of html files

2010-11-15 Thread Tom Evans
On Mon, Nov 15, 2010 at 2:42 PM, Brian wrote: > Tom, Thanks again. > > If so, stop trying - you cannot do -->  just to be clear: > I like to do this: > src > ├── settings.py > │ > ├── templates > │   ├── logos > │   │   ├── logo1.html > │   │   └── logo2.html > │   └── titles > │       ├── title1.

Re: Installing Django on Ubuntu

2010-11-15 Thread Flaviu Simihaian
zalun, I thought to get mkvirtualenv you have to install the virtualenvwrapper shell commands: $ pip install virtualenvwrapper $ export WORKON_HOME=~/VirtualEnvs $ mkdir -p $WORKON_HOME $ source /usr/local/bin/virtualenvwrapper.sh and then you can use it: $ mkvirtualenv django --no-site-packages

bash: django-admin.py: command not found

2010-11-15 Thread ErritG
Hi Everybody, Been struggling with the first part of the Tutorial. Even though the 'bash: django-admin.py: command not found' has been solved by others I can't seem to get around this error. Perhaps it's because I'm using version 2.7 while all the found solutions mention up to 2.6 as version? Can

Re: Can't move down then up the directory tree for inserting of html files

2010-11-15 Thread Brian
Tom, Thanks again. If so, stop trying - you cannot do --> just to be clear: I like to do this: src ├── settings.py │ ├── templates │ ├── logos │ │ ├── logo1.html │ │ └── logo2.html │ └── titles │ ├── title1.html │ └── title2.html ├── main │ ├── page.html <-- in here I li

Re: Can't move down then up the directory tree for inserting of html files

2010-11-15 Thread Tom Evans
On Mon, Nov 15, 2010 at 1:49 PM, Brian wrote: > Tom > > 1) the LOGO.html file contains the name of the directory it's in. (ex: > Logo.html in the root will display C:\ROOT) So when I run the web page > it displays all the Logo files that got included. When I run I have > multiple Logo files from u

Re: Installing Django on Ubuntu

2010-11-15 Thread octopusgrabbus
As to installing a new Django, I'd perform an upgrade and avoid cutting and pasting. On Nov 15, 3:54 am, kelp wrote: > Hello, > So I have downloaded Django and put the folder into my /home/username/ > directory, and I ran setup.py. I played with Django a little bit, but > it turns out that I hav

Re: Can't move down then up the directory tree for inserting of html files

2010-11-15 Thread Brian
Tom 1) the LOGO.html file contains the name of the directory it's in. (ex: Logo.html in the root will display C:\ROOT) So when I run the web page it displays all the Logo files that got included. When I run I have multiple Logo files from up the tree but none from down. 2) I tried multiple tuple

Re: Automatically assume "models." prefix in models.py

2010-11-15 Thread bruno desthuilliers
On Nov 14, 8:20 am, James wrote: > Forgive a django newbie... > > Maybe I'm the laziest person in the world, but sometimes I get tired > of typing "models.WhatEver" for every single model I have to write. Is > there anyway a shortcut could be added that would 'assume' the > 'models.' prefix when I

Re: Show DEBUG page to specific user group?

2010-11-15 Thread Tom Evans
On Fri, Nov 12, 2010 at 5:41 PM, Josh wrote: > I didnt look at the blog post but you could try something like this in > your settings: > > def debug_for_superuser(request): >    if request.user.is_superuser: >        return True >    else: >        return False > > DEBUG = debug_for_superuser > >

Re: Can't move down then up the directory tree for inserting of html files

2010-11-15 Thread Tom Evans
On Sun, Nov 14, 2010 at 10:34 PM, Brian wrote: > Daniel, thanks for the help!, I really appreciate it. > > Believe me, I simplified this to nothing: > > 1) I have LOGO.html in all directories with only the current directory > name in the html file (/lib = directory of LOGO.html file) How does tha

Re: Installing Django on Ubuntu

2010-11-15 Thread Piotr Zalewa
On 11/15/10 08:54, kelp wrote: > Hello, > So I have downloaded Django and put the folder into my /home/username/ > directory, and I ran setup.py. I played with Django a little bit, but > it turns out that I haven't actually been using the newest, stable > version of Django (1.2.3), but I have been

Re: How to pass template variable to tag in Django?

2010-11-15 Thread Daniel Roseman
On Nov 15, 9:00 am, DD wrote: > I try to pass a template variable to a tag as parameter, not sure how > it works. > > For instance > > in template html > >     {{ question.author_id }} > >     {% monetize_slot question.author_id "questioner" %} > > Here I can see the webpage show question.author_i

Re: Installing Django on Ubuntu

2010-11-15 Thread smallfish
http://docs.python.org/install/index.html#modifying-python-s-search-path like this url. -- blog: http://chenxiaoyu.org twitter: @nnfish psql: http://psql.info On Mon, Nov 15, 2010 at 5:09 PM, k

Re: Installing Django on Ubuntu

2010-11-15 Thread kelp
How do I do that? Will this just reroute my Django path to the one in my /home/username/ directory? On Nov 15, 12:56 am, smallfish wrote: > add your django path to sys.path variable, add first. > -- > blog:http://chenxiaoyu.org twitter: @nnfish > psql:http://psql.info

How to pass template variable to tag in Django?

2010-11-15 Thread DD
I try to pass a template variable to a tag as parameter, not sure how it works. For instance in template html {{ question.author_id }} {% monetize_slot question.author_id "questioner" %} Here I can see the webpage show question.author_id as "2", but when I try to pass it via the tag mo

Re: Installing Django on Ubuntu

2010-11-15 Thread smallfish
add your django path to sys.path variable, add first. -- blog: http://chenxiaoyu.org twitter: @nnfish psql: http://psql.info On Mon, Nov 15, 2010 at 4:54 PM, kelp wrote: > Hello, > So I have downloaded Django and put the folder into my /home/username/ > directory, a

Installing Django on Ubuntu

2010-11-15 Thread kelp
Hello, So I have downloaded Django and put the folder into my /home/username/ directory, and I ran setup.py. I played with Django a little bit, but it turns out that I haven't actually been using the newest, stable version of Django (1.2.3), but I have been using 1.1. The django I have been using a

Re: CMS for django

2010-11-15 Thread Piotr Kilczuk
> > I would welcome comments on what CMS is compatible with django. >> > > You might look at LFC: http://www.lfcproject.com Hi, Noone mentioned http://www.feinheit.ch/labs/feincms-django-cms/ yet, it might be nice and more stable than DjangoCMS. But you can live with DjangoCMS (use latest maste