Django based issue tracker

2010-11-10 Thread Joakim Hove
Hello, I am setting up a bug/issue tracker - the project is quite small and I do not have complex needs. As I enjoy working with Django I was looking for a Django based solution. Can someone reccomend a Django based issue tracker? In case I fail finding something based on Django I think I will

httpresponse large data aborted with error about buffer_size

2010-11-10 Thread victor
i have a view which render a template with 200 records, i got errors as following: Traceback (most recent call last): File "C:\Python27\lib\site-packages\django-1.2.3-py2.7.egg\django \core\servers \basehttp.py", line 281, in run self.finish_response() File

Re: Please help me figure out this UnicodeEncodeError

2010-11-10 Thread Daniel Roseman
On Nov 10, 2:25 am, Eric Chamberlain wrote: > Hi, can anyone tell me how to work around this UnicodeEncodeError? > > >>> from hashlib import md5 > >>> full_jid = u'e...@example.com/Eric\u2019s iPhone 3GS' > >>> hash = md5(full_jid) > > Traceback (most recent call last): >   File "",

Re: Generic Views - do you use them?

2010-11-10 Thread derek
I have not really understood when and why they are needed; I would be interested to see an alternative also because it might improve my understanding. On Nov 9, 3:27 pm, ringemup wrote: > I don't use them either for much the same reasons, and because I often > end up using

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

2010-11-10 Thread Daniel Roseman
On Nov 10, 2:32 am, Brian wrote: > Thanks for the help. > I'm using Python 2.5 and Django Template 1.1 > > I can't seem to move down then up the directory tree for inserting of > html files using  {% include file %} statement > > Sample dir structure: > root/ >

Re: Trouble accessing development server

2010-11-10 Thread bruno desthuilliers
On 9 nov, 22:39, Shawn Milochik wrote: > Instead of the domain try 0.0.0.0 or your public IP address. > > python manage.py runserver 0.0.0.0:8000 > > or > > python manage.py runserver 82.165.105.204:8000 #this is just a sample > IP address for Host Monster > It's also

Re: Making MODEL.objects.raw() query with LIKE input%

2010-11-10 Thread Daniel Roseman
On Nov 9, 10:06 pm, xvga wrote: > Hi All, > >  my question is linked to this thread, so I post here > > I need to run sql query with LIKE and % in the end - I have tried %% > and : > CLASSNAME.objects.raw("select * from table where full_name like %s%% > ", [user_input]) >

Re: creating a combined form linked via foreign key??

2010-11-10 Thread derek
"the PhoneBook fields appear three times" Three is the default, but you can set the number of linked (inline) forms for the children: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.InlineModelAdmin.extra On Nov 8, 11:55 pm, sosurim kim wrote: >

Re: httpresponse large data aborted with error about buffer_size

2010-11-10 Thread victor
only can support 10-30 records per page when use paginator and gzip middleware.will also get above error when more than 30 records per page. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

spaces preserved

2010-11-10 Thread vikash rai
Hi, First off I have to say that I am new to django. I am trying to get a value from drop down select in HTML part. This value has spaces in it. However, when I retrieve it in the view code only the text up to the first space gets retrieved. Is there a to retrieve the whole string with all the

Re: getting a variable in a templatetag

2010-11-10 Thread Tom Evans
On Wed, Nov 10, 2010 at 11:25 AM, Kenneth Gonsalves wrote: > On Wed, 2010-11-10 at 03:21 -0800, Daniel Roseman wrote: >> On Nov 10, 11:19 am, Kenneth Gonsalves wrote: >> > hi, >> > >> > using trunk. I have line in template like this: >> > >> >     {%

Localization problems with parametric string

2010-11-10 Thread rmazzocchi
Hello everyone, I have trouble to solving a problem with the internationalization of some strings. To better explane the problem I created a simple example: The models (models.py) are as follows: --- -- #! -*- coding:

Re: getting a variable in a templatetag

2010-11-10 Thread Daniel Roseman
On Nov 10, 11:19 am, Kenneth Gonsalves wrote: > hi, > > using trunk. I have line in template like this: > >     {% get_current_language as LANGUAGE_CODE %} > I want to pass the current language to a templatetag for some > processing. So i call it like this: > > {% get_menu

Re: Making MODEL.objects.raw() query with LIKE input%

2010-11-10 Thread xvga
Daniel, thank you very much :) You are right, that was just an example query > user_input = "%s%%" % user_input did the trick. On Nov 10, 11:28 am, Daniel Roseman wrote: > On Nov 9, 10:06 pm, xvga wrote: > > > > > Hi All, > > >  my question is linked

Re: getting a variable in a templatetag

2010-11-10 Thread Kenneth Gonsalves
On Wed, 2010-11-10 at 03:21 -0800, Daniel Roseman wrote: > On Nov 10, 11:19 am, Kenneth Gonsalves wrote: > > hi, > > > > using trunk. I have line in template like this: > > > > {% get_current_language as LANGUAGE_CODE %} > > I want to pass the current language to a

getting a variable in a templatetag

2010-11-10 Thread Kenneth Gonsalves
hi, using trunk. I have line in template like this: {% get_current_language as LANGUAGE_CODE %} I want to pass the current language to a templatetag for some processing. So i call it like this: {% get_menu "LANGUAGE_CODE" %} to get the language code, I try: self.lang = Variable(lang), but

Re: Localization problems with parametric string

2010-11-10 Thread rmazzocchi
Problem solved! Thanks On Nov 10, 12:52 pm, Tom Evans wrote: > On Wed, Nov 10, 2010 at 11:51 AM, Tom Evans wrote: > > > This won't work, the msgid in the gettext catalogue is for "hello > > %(title)s", not  the interpolated version. It

Re: httpresponse large data aborted with error about buffer_size

2010-11-10 Thread victor
the problem also will occur in normal page switch. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to

django-avatar src issue in different browsers (only firefox renders avatar correctly).

2010-11-10 Thread Sithembewena Lloyd Dube
Hi all, I have a small problem that's taking way too much time to figure out. I have django-avatar installed and am experiencing the problem described below: *What steps will reproduce the problem? 1. add {% load avatar_tags %} and {% avatar user 65 %} template tags to a template 2. Go into

Re: question about involve "vncserver" command with django

2010-11-10 Thread Jirka Vejrazka
> What am I doing is want to simplify using vnc. > I'm a Linux administrator. As you know, if users want to use vnc they > must login the server with ssh to start vnc server first. > Then get the port or id number, then use vncviewer or http link to > access the vncserver. > I just want them to

Re: Localization problems with parametric string

2010-11-10 Thread Tom Evans
On Wed, Nov 10, 2010 at 11:51 AM, Tom Evans wrote: > > This won't work, the msgid in the gettext catalogue is for "hello > %(title)s", not  the interpolated version. It should be like so: > > test1 = _("hello %(title)s") % {'title': book1.title}) or rather: test1 =

Re: Localization problems with parametric string

2010-11-10 Thread Tom Evans
On Wed, Nov 10, 2010 at 8:26 AM, rmazzocchi wrote: > Hello everyone, I have trouble to solving a problem with > the internationalization of some strings. To better explane the > problem I created a simple example: > The models (models.py) are as follows: > >

Re: spaces preserved

2010-11-10 Thread Tom Evans
On Wed, Nov 10, 2010 at 7:57 AM, vikash rai wrote: > Hi, > First off I have to say that I am new to django. I am trying to get a >  value from drop down select in HTML part. This value has spaces in it. >  However, when I retrieve it in the view code only the text up to

Re: spaces preserved

2010-11-10 Thread Jirka Vejrazka
> Can someone please suggest how to get the complete string ? Passing (semi-) arbitrary strings in GET parameters can lead to all sorts of issues (probably less for english-only sites). You might be better off by passing primary key of the item model or some other unique identifier that is "web

Re: question about involve "vncserver" command with django

2010-11-10 Thread Bill
> Well, using a web server to start VNC still seems like a bad idea. How > do you stop the VNC server once a user does not need it anymore? User can close the vncserver use webserver, just like How they can start it. Any way, I know maybe there are many better ways to do this job. I really

Re: Obtaining And Caching User Context

2010-11-10 Thread octopusgrabbus
urls.py from django.conf.urls.defaults import * from django.contrib.auth.views import login from amr.views import current_datetime from amr.views import display_meta from amr.views import collect_reads from amr.read_snap.views import rsf from amr.read_snap.views import after_rs from

Re: Obtaining And Caching User Context

2010-11-10 Thread Tom Evans
In your template, you refer to 'user'. This context variable isn't magically generated from pixie dust, it must be added to the context by something. The typical way is to ensure that it is added is to: Ensure "django.core.context_processors.auth" is in TEMPLATE_CONTEXT_PROCESSORS. Ensure that

Re: Generic Views - do you use them?

2010-11-10 Thread SivaTumma
Every Framework is so difficult to understand that it is better to "code by own" the functionality provided by them. We would have better control + peace of mind. Frameworks unnecessarily bring hassle, irritation for a programmer. -- You received this message because you are subscribed to the

Re: Django based issue tracker

2010-11-10 Thread shacker
On Nov 10, 12:12 am, Joakim Hove wrote: > Hello, > > I am setting up a bug/issue tracker - the project is quite small and I > do not have complex needs. As I enjoy working with Django I was > looking for a Django based solution. Can someone reccomend a Django > based issue

Creating A Model For Existing DB Table

2010-11-10 Thread octopusgrabbus
I have an existing MySQL table. It's fairly straightforward: part_num char(20) ept_type smallint (default 0) not null inv_id integer (default 0) not null load_date date columns 2 and 3 (ept_type and inv_id) form a unique key. An example of a unique key is 43 and 80581770. I've tried to create

Re: Trouble accessing development server

2010-11-10 Thread Engywook
Hmm... none of the below work. Also doesn't seem to matter if I use port 8000 or port 8100 or any other. What does happen, in the browser, is that it appears to be continuously trying to load the page. It doesn't matter if I have the server running or not. On Nov 10, 4:57 am, bruno desthuilliers

Re: Creating A Model For Existing DB Table

2010-11-10 Thread Daniel Roseman
On Nov 10, 5:23 pm, octopusgrabbus wrote: > I have an existing MySQL table. It's fairly straightforward: > > part_num char(20) > ept_type smallint (default 0) not null > inv_id integer (default 0) not null > load_date date > > columns 2 and 3 (ept_type and inv_id) form

Re: Trouble accessing development server

2010-11-10 Thread Shawn Milochik
If you're using Internet Explorer you have to add the http:// to the URL. If you're not, I apologize for suggesting you might be using the Big Blue E. ;o) Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Creating A Model For Existing DB Table

2010-11-10 Thread octopusgrabbus
Thanks. On Nov 10, 12:31 pm, Daniel Roseman wrote: > On Nov 10, 5:23 pm, octopusgrabbus wrote: > > > > > I have an existing MySQL table. It's fairly straightforward: > > > part_num char(20) > > ept_type smallint (default 0) not null > > inv_id

Re: Creating A Model For Existing DB Table

2010-11-10 Thread Sandip Bhattacharya
On Wed, Nov 10, 2010 at 09:23:55AM -0800, octopusgrabbus wrote: > # Create your models here. > class ept_inv(models.Model): > part_num = models.CharField(max_length=20) > ept_type = models.SmallIntegerField > inv_id = models.IntegerField > load_date = models.DateField Call the

Re: Creating A Model For Existing DB Table

2010-11-10 Thread Simone Dalla
2010/11/10 Sandip Bhattacharya > On Wed, Nov 10, 2010 at 09:23:55AM -0800, octopusgrabbus wrote: > > # Create your models here. > > class ept_inv(models.Model): > > part_num = models.CharField(max_length=20) > > ept_type = models.SmallIntegerField > >

Error: No module named admindjango.contrib.auth

2010-11-10 Thread Harry
Trying to follow Part 2 of the Django documentation >>> python manage.py syncdb throws this when configuring admin 'Error: No module named admindjango.contrib.auth' More errors if I try to include admin docs. 1) Need to know where I can see which modules are installed 2) Why this module did not

Re: Django based issue tracker

2010-11-10 Thread CLIFFORD ILKAY
On 11/10/2010 03:12 AM, Joakim Hove wrote: Hello, I am setting up a bug/issue tracker - the project is quite small and I do not have complex needs. As I enjoy working with Django I was looking for a Django based solution. Can someone reccomend a Django based issue tracker? In case I fail

Re: Error: No module named admindjango.contrib.auth

2010-11-10 Thread Łukasz Rekucki
On 10 November 2010 18:39, Harry wrote: > Trying to follow Part 2 of the Django documentation > python manage.py syncdb throws this when configuring admin > 'Error: No module named admindjango.contrib.auth' > More errors if I try to include admin docs. > > 1) Need to know

Re: Django based issue tracker

2010-11-10 Thread Toby Champion
I don't know of a Django-based issue tracker that's in active development, but I'd suggest you first try using a web-based, hosted tool. If your project is simple enough, something like http://www.unfuddle.com/ might meet your needs. Accounts are free for very small projects, and include a SVN or

media-admin missing gifs

2010-11-10 Thread Anderson Goulart
Hello, I am just trying to modify django-admin templates and everything appears to work except icon_calendar.gif which does not appear. I set ADMIN_MEDIA_PREFIX = '/media_admin/' in settings.py, but it insists it is not defined. The estrange thing is that icon_addlink.gif icon works perfectly

How to extract answer from QuerySet

2010-11-10 Thread octopusgrabbus
My new model class works great. It returns my answer, but in a query set, and the table is set up only to return one element in the QuerySet due to the indexes. My problem is how to extract the data from that QuerySet. repr() does not work, because the model class has no repr method. How do I

Re: Creating A Model For Existing DB Table

2010-11-10 Thread octopusgrabbus
Thanks, and I took this one step further. I have a test application directory, and ran the python manage.py inspectdb into a special models.py file that I'll use for future reference. On Nov 10, 1:30 pm, Simone Dalla wrote: > 2010/11/10 Sandip Bhattacharya

Re: How to extract answer from QuerySet

2010-11-10 Thread octopusgrabbus
This may not be the best way, but it works: temp_ept_id = EptInv.objects.filter(inv_id=80581770).values_list() and I got it from http://docs.djangoproject.com/en/1.0/ref/models/querysets/ On Nov 10, 3:47 pm, octopusgrabbus wrote: > My new model class works great.

Re: How to extract answer from QuerySet

2010-11-10 Thread Shawn Milochik
The queryset returns zero or more instances of your model. So if there's only one result, you can just get the first item in the queryset by its index. For example: some_queryset = YourModel.objects.filter(**kwargs) if some_queryset.count() == 1: x = some_queryset[0] #x is now an

Re: How to extract answer from QuerySet

2010-11-10 Thread Łukasz Rekucki
On 10 November 2010 21:55, Shawn Milochik wrote: > The queryset returns zero or more instances of your model. So if > there's only one result, you can just get the first item in the > queryset by its index. > > For example: > > some_queryset =

Re: How to extract answer from QuerySet

2010-11-10 Thread Shawn Milochik
2010/11/10 Łukasz Rekucki : > On 10 November 2010 21:55, Shawn Milochik wrote: >> The queryset returns zero or more instances of your model. So if >> there's only one result, you can just get the first item in the >> queryset by its index. >> >> For

Django removes fields from admin's list

2010-11-10 Thread Yo'av Moshe
Hey, I'm using Django's admin interface to list, edit and add objects to my application. When I start my Django application it all works fine, but after a while the list view goes crazy: first the checkboxes disappear, then the first field and later on the second one. Sometimes it goes even

Re: Trouble accessing development server

2010-11-10 Thread Sam Lai
Do you have a dedicated IP? If not, you're pretty much out of luck with the development server. http://helpdesk.hostmonster.com/index.php/kb/article/000405 On 11 November 2010 04:28, Engywook wrote: > Hmm... none of the below work. Also doesn't seem to matter if I use >

Loading Form Fields With Computed Data

2010-11-10 Thread octopusgrabbus
My form returns back to itself return render_to_response('chkinv.html', {'errors': errors}) before and after the post. During the post, status is calculated through a model that a piece of inventory is or is not available. What is the best way to put that status back into the message field in

Re: question about involve "vncserver" command with django

2010-11-10 Thread Sam Lai
Why can't you tell vncserver to listen on a different port? the vncserver script passes any unknown args to Xvnc, so you can use the argument for Xvnc to change the port (-rfbport port_number). man vncserver: http://www.realvnc.com/products/free/4.1/man/vncserver.html man Xvnc:

Re: How to extract answer from QuerySet

2010-11-10 Thread Łukasz Rekucki
On 10 November 2010 22:10, Shawn Milochik wrote: > 2010/11/10 Łukasz Rekucki : >> On 10 November 2010 21:55, Shawn Milochik wrote: >>> The queryset returns zero or more instances of your model. So if >>> there's only one result, you can

Re: How to extract answer from QuerySet

2010-11-10 Thread Shawn Milochik
Łukasz, Good and valid points. Thanks. Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to

Re: Suspicious Operation from session decoding

2010-11-10 Thread pjrhar...@gmail.com
On the unlikely chance that anyone turns up with the same problem for google, I'll post my solution. Still would love to know what the original problem was. from django.utils.importlib import import_module session_engine = import_module(settings.SESSION_ENGINE) session =

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

2010-11-10 Thread Brian
Dan, Thanks for the reply. I just can not get it to work. Works just fine in same or any directory under the dir that the .py file is in. I played with TEMPLATE_DIRS setting without any luck, tested to the root dir and still does not work even with "../Top.html" in the dir under it. On Nov 10,

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

2010-11-10 Thread Shawn Milochik
On Wed, Nov 10, 2010 at 4:42 PM, Brian wrote: > Dan, Thanks for the reply. > > I just can not get it to work. Works just fine in same or any > directory under the dir that the .py file is in. > > I played with TEMPLATE_DIRS setting without any luck, tested to the >

Re: Trouble accessing development server

2010-11-10 Thread Engywook
Well, nuts. I was afraid it was going to be something like that. Guess I'll have to install Apache and MySQL on my computer, then. And to Shawn, re IE: --> shudder On Nov 10, 4:17 pm, Sam Lai wrote: > Do you have a dedicated IP? > > If not, you're pretty much out of

Problems doing a query with __count=0 for a related foreignkey

2010-11-10 Thread Eduardo Robles Elvira
Hello everyone, I'm trying to do this: . from user.models import Profile Profile.objects.filter(services__count=0) . As you can see, I want to retrieve all the users with no related services. But it gives an error: "FieldError: Cannot resolve keyword 'count' into field. Choices are:

Re: How to extract answer from QuerySet

2010-11-10 Thread octopusgrabbus
Thank you. This worked well. However, I'm left with this value How do I get that into a comparable form? On Nov 10, 4:06 pm, Łukasz Rekucki wrote: > On 10 November 2010 21:55, Shawn Milochik wrote: > > > The queryset returns zero or more instances of

Re: How to extract answer from QuerySet

2010-11-10 Thread Shawn Milochik
On Wed, Nov 10, 2010 at 5:16 PM, octopusgrabbus wrote: > Thank you. This worked well. > However, I'm left with this value > > > How do I get that into a comparable form? > It sounds like you're getting the __unicode__() representation of your model. If you want the

Re: Problems doing a query with __count=0 for a related foreignkey

2010-11-10 Thread cootetom
I think this should work: Profile.objects.filter(services__creator__isnull = True) If you query like this and one of the intermediate models doesn't exist then django will treat that model as if it did exist but with all of it's values as null. That is as I understand it anyway! On Nov 10,

Re: Problems doing a query with __count=0 for a related foreignkey

2010-11-10 Thread Jason Mayfield
On Nov 10, 2010, at 4:24 PM, Eduardo Robles Elvira wrote: > I'm trying to do this: > > . > from user.models import Profile > Profile.objects.filter(services__count=0) > . http://docs.djangoproject.com/en/1.2/topics/db/aggregation/#filtering-on-annotations - Jason -- You received

Re: Problems doing a query with __count=0 for a related foreignkey

2010-11-10 Thread Jason Mayfield
Sorry, my first response isn't what you wanted. I completely misread your post. One option would be something like: Profile.objects.exclude(id__in=Service.objects.values_list('creator_id', flat=True)) Though that looks clunky. - Jason -- You received this message because you are subscribed

Re: question about involve "vncserver" command with django

2010-11-10 Thread Bill
Thank you Sam, I've checked the manual and try to change any port include rfbport or http port, it doesn't work. But finally, I find my way, I use pexpect to involve the command. It works. Thank you everyone! Bill On Nov 10, 4:23 pm, Sam Lai wrote: > Why can't you tell

Saving images in django

2010-11-10 Thread andy
Django recommends saving images to the file system since this gives better performance than storing the files in a database. However I don't seen any documentation on how to restrict access to those files by user. If someone knows the url to your image directory they could possibly view all the

Re: Saving images in django

2010-11-10 Thread Łukasz Rekucki
On 11 November 2010 03:19, andy wrote: > Django recommends saving images to the file system since this gives > better performance than storing the files in a database. However I > don't seen any documentation on how to restrict access to those files > by user. If someone

Re: media-admin missing gifs

2010-11-10 Thread Karen Tracey
On Wed, Nov 10, 2010 at 3:25 PM, Anderson Goulart wrote: > > Hello, > > I am just trying to modify django-admin templates and everything appears to > work except icon_calendar.gif which does not appear. I set > ADMIN_MEDIA_PREFIX = '/media_admin/' in settings.py, but it

Re: Saving images in django

2010-11-10 Thread vikalp sahni
If you are using apache. you can simple disable the indexing of files. in your apache conf directory directive. This will give forbidden 403 if u try to access the directory from apache. hence no files are seen. Options -Indexes I hope this helps. Regards

Re: Saving images in django

2010-11-10 Thread andy
Thanks for the info very useful. On Nov 10, 6:34 pm, Łukasz Rekucki wrote: > On 11 November 2010 03:19, andy wrote: > > > Django recommends saving images to the file system since this gives > > better performance than storing the files in a database.

Re: getting a variable in a templatetag

2010-11-10 Thread Kenneth Gonsalves
On Nov 10, 4:48 pm, Tom Evans wrote: >     user = self.user.resolve(context) yes - I did not put this line (was inheriting from legacy code where there was something called resolve_variable which I think did this in one step. (note to self, however trivial the question

[ANN] Django 1.3 alpha 1 released

2010-11-10 Thread James Bennett
The first alpha preview package for Django 1.3 is now available. * Release notes: http://docs.djangoproject.com/en/dev/releases/1.3-alpha-1/ * Download instructions: http://www.djangoproject.com/download/ -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --