Here is a tutorial for adding a plus sign for custom dropdown box in custom admin pages

2010-04-19 Thread Asim Yuksel
If you registered your models with adminCreate a widgets.py and put the following code there from django.template.loader import render_to_string from ivl.views import * def SelectWidgetWithPopUp(url): class SelectWithPopUp(forms.Select): def render(self, name, *args, **kwargs):

Invitation to connect on LinkedIn

2010-04-19 Thread Ajit Jena
LinkedIn I'd like to add you to my professional network on LinkedIn. - Ajit Ajit Jena Software engineer at Mindfire Solutions Bhubaneshwar Area, India Confirm that you know Ajit Jena https://www.linkedin.com/e/isd/1236739149/ZP28ZCLB/ -- (c) 2010, LinkedIn Corporation

Re: assert_match_hash(self, reference, sample)

2010-04-19 Thread Phlip
>         for key, value in reference.items(): >             if value == sample.get(key, value or True): if value == sample.get(key, not(value)): D'oh! C-: -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

assert_match_hash(self, reference, sample)

2010-04-19 Thread Phlip
Djangoists: Because I'm a perfectionist with deadlines, I write scads of developer tests. But they too frequently find me comparing two hashes for equality. The goal of any assertion should be a pristine diagnostic that tells everything it knows, neatly formatted. So assert_equal() fails on that

Re: I need django open-source project to newspaper

2010-04-19 Thread JIffin Joy Akkarappatty
May help this http://code.google.com/p/django-pennypress/ http://code.google.com/p/pynews2/ Thanks & Regards, Jiffin Joy Akkarappatty. On Mon, Apr 19, 2010 at 1:11 AM, Hussain Deikna wrote: > Hi for all, please I need an open source newspaper web side . > thank you bye > > > -- > You r

Re: Baffled by self.client.login(...) not working in unit tests

2010-04-19 Thread Ramiro Morales
On Mon, Apr 19, 2010 at 11:51 PM, Brian McKeever wrote: > I fixed it by uninstalling Python 2.6.5 and installing 2.6.4 instead. Then it could be related to a change in behavior introduced by a [0]fix in the Cookie Python stdlib module included in 2.6.5. This was reported as ticket [1]12720 in Dj

Re: Baffled by self.client.login(...) not working in unit tests

2010-04-19 Thread Russell Keith-Magee
On Tue, Apr 20, 2010 at 10:51 AM, Brian McKeever wrote: > I fixed it by uninstalling Python 2.6.5 and installing 2.6.4 instead. Ah - then I think I know the problem. Python 2.6.5 made a change to the way cookies are stored which is subtly incompatible with the test client. This problem has been

Re: Baffled by self.client.login(...) not working in unit tests

2010-04-19 Thread Brian McKeever
I fixed it by uninstalling Python 2.6.5 and installing 2.6.4 instead. On Apr 19, 8:44 pm, Brian McKeever wrote: > I'm having the same problem. None of my tests are able to log in on > this computer. > > Here's an example: > >     def test_bug(self): >         response = self.client.get(reverse('h

Re: Base template doesnt get the context

2010-04-19 Thread Adam Patterson
What does the other template look like? Are you overridding the categories block? On Tue, Apr 20, 2010 at 5:17 AM, Thales wrote: > Good evening, > > I am learning django with the django book. I decided to develop a > simple news system just to practice, > The base layout should show all the news

Re: Baffled by self.client.login(...) not working in unit tests

2010-04-19 Thread Brian McKeever
I'm having the same problem. None of my tests are able to log in on this computer. Here's an example: def test_bug(self): response = self.client.get(reverse('home')) self.assertRedirects(response, 'accounts/login/?next=/home/', 302, 200) bob = User( use

Nesting model forms with admin

2010-04-19 Thread Spaceman Paul
I'm looking at extending the django admin app for a project, as it does about 96% of what we need straight out of the box. The main feature not offered is what might be called nested modelforms. Stretching the example from the InlineModelAdmin documentation (which does almost the exact opposite o

Base template doesnt get the context

2010-04-19 Thread Thales
Good evening, I am learning django with the django book. I decided to develop a simple news system just to practice, The base layout should show all the news categories in a block, and each other page should modify another block. Here is the base: Titulo {% block categories %} CATEGORIES {

Re: Django Admin - m2m widget with blank=true, null=true - How to unselect all FKs?

2010-04-19 Thread Victor Hooi
heya, Yeah, that is an option, just add a clear all button. Shouldn't be too hard. I find the filter_horizontal widget much nicer though, might just use that =). Thanks for your help. Cheers, Victor On Apr 19, 6:26 pm, Jani Tiainen wrote: > No, it's definitely not obvious but there is no simpl

Re: Django - Java RPC?

2010-04-19 Thread Graham Dumpleton
On Apr 19, 9:00 pm, "jani.mono...@gmail.com" wrote: > What is the most straightforward way of inspecting/scripting a > headless Java application from Django? > I run Jython embedded in the Java app already so this may or may not > make things easier than plain Java on one side. > > Instead of wr

Re: Many-To-Many issue; trying to find a way around conditional id

2010-04-19 Thread Matt
Oops. That title should be "conditional if," of course. On Apr 19, 2:43 pm, Matt wrote: > Hoping you all can tell me what I'm doing that's stupid here. I have > three models: > > class highschool(models.Model): >     name = models.CharField(max_length=50) >     address = models.CharField(max_leng

Many-To-Many issue; trying to find a way around conditional id

2010-04-19 Thread Matt
Hoping you all can tell me what I'm doing that's stupid here. I have three models: class highschool(models.Model): name = models.CharField(max_length=50) address = models.CharField(max_length=60) city = models.CharField(max_length=60) state = models.CharField(max_length=2) class c

Re: unable to connect

2010-04-19 Thread ge...@aquarianhouse.com
Did you try http://127.0.0.1:8000/ ? On Apr 19, 8:51 pm, arpho wrote: > some days ago after a not clean shut-down django stopped to work, > after python manage.py runserver, it seems working normally, but when > I try to connect tohttp://localhost:8000/adminwith firefox all I can > get is Unable

Re: multiple projects are getting url's confused

2010-04-19 Thread Daniel Roseman
On Apr 19, 7:38 pm, mh...@yahoo.com wrote: > I'm fairly new to django so hopefully its something simple I'm missing > - I've tried setting up 2 separate projects(both are fairly simple) > > The problem I'm having is, after restarting apache2 > I can point my browser to:http://98.232.251.252/stockda

unable to connect

2010-04-19 Thread arpho
some days ago after a not clean shut-down django stopped to work, after python manage.py runserver, it seems working normally, but when I try to connect to http://localhost:8000/admin with firefox all I can get is Unable to connect, postgresql 8.4 got to some problems: does not start any more the

multiple projects are getting url's confused

2010-04-19 Thread mhj44
I'm fairly new to django so hopefully its something simple I'm missing - I've tried setting up 2 separate projects(both are fairly simple) The problem I'm having is, after restarting apache2 I can point my browser to: http://98.232.251.252/stockdata/and everything works I can point my browser

Re: Please help me make a SELECT box!

2010-04-19 Thread Asim Yuksel
Why dont you use a widget with charfield forms.CharField(max_length=1, widget=forms.Select (choices=CHOICES)) and your choices are CHOICE = ( ('A', 'A'), ('B', 'B'), ('C', 'C'), ) On Apr 19, 4:56 pm, amyhalf wrote: > For the life of me

Please help me make a SELECT box!

2010-04-19 Thread amyhalf
For the life of me I can't get Django to render even the simplest of HTML boxes. Here's a recent example that I have which I cannot get to work. This is the form: class CreditCardForm(forms.Form): fullname = forms.CharField(128, 1, required = True) mm_expiry = forms.ChoiceField(

Re: manipulate header before sending response

2010-04-19 Thread Tim Arnold
On Apr 19, 3:12 pm, Shawn Milochik wrote: > You can create your own middleware. > > http://docs.djangoproject.com/en/1.1/topics/http/middleware/ > > Shawn > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email

Error in admin template when try to login

2010-04-19 Thread Ovnicraft
Hi django users, i set enable the admin in my project, when i load the localhost/admin url the first time login is showed, try to login and get this[1] error, this is my admin.py[2], but i dont know how to identify the problem, i need your help to identify it. best regards, [1] http://dpaste.co

Re: manipulate header before sending response

2010-04-19 Thread Shawn Milochik
You can create your own middleware. http://docs.djangoproject.com/en/1.1/topics/http/middleware/ 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

manipulate header before sending response

2010-04-19 Thread Tim Arnold
hi, I have a static webpage which is out of my control (created in some other process). I want to show the page to the user, but I need to add a stylesheet to the header first. Is there a way to receive the request, add the to the header for the stylesheet and then serve the webpage? thanks, --T

Re: Multiple instance of the same app

2010-04-19 Thread Kepioo
Hi Ben- i actually want all the climbing sites in the same db, same server - that's why i didnt go for the sites framework. On Apr 19, 2:39 am, Benjamin Reitzammer wrote: > Hi, > maybe I missed something in you explanation, but if you want the same > code powering multiple sites and each of the s

Oracle xe - unique constraint when loading fixtures

2010-04-19 Thread pablo platt
Hi I have a Django1.1 project running with MySQL that I'm trying to export to Oracle xe. I've created fixtures with the project running MySQL with: python manage.py dumpdata > fixture.json and trying to load them to Oracle with (after syncdb): python manage.py loaddata fixture.json The error I'm

Re: Apache refresh problem

2010-04-19 Thread reindyr
Thanks Tom for clarifying this point! For now I went the way of recalculating the navigation and get the expected results also with Apache. After hours scratching my head, this was actually a 3 liner: instead of calculating the results in the first place, pass the navigation app a function pointer

I have a problem with the pagination with haystack and apache solr

2010-04-19 Thread Ariel
Hi everybody: I have a big problem with pagination using apache solr and haystack, this is what it is happening: I have a site where the news are being indexing with haystack and solr, but the problem is that when a I make the search the pagination is showing me more match results that what really

Chase Paymentech

2010-04-19 Thread Bobby Roberts
Has anyone out there integrated a payment module in django over to Chase Paymentech to process credit cards? I'm looking for sample code. -- 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...@googlegr

Re: Apache refresh problem

2010-04-19 Thread Tom Evans
On Mon, Apr 19, 2010 at 1:10 PM, reindyr wrote: > Hi, > > I am using django with Apache and mod_python. I have implemented a > site navigation using the django-nav module. Internally the module > maintains a dictionary and uses templatetags to generate the desired > code for the navigation. > > No

Re: ERROR: Caught UnicodeEncodeError while rendering: 'ascii' codec

2010-04-19 Thread Karen Tracey
On Sun, Apr 18, 2010 at 3:54 AM, Michael Strickland wrote: > Temporary fix: > > It appears to be a result of changeset [12637] in memcached.py: > http://code.djangoproject.com/changeset/12637 > > # memcached.py, lines 53-54 removed in def set() > 53: if isinstance(value, unicode): > 54:value

Apache refresh problem

2010-04-19 Thread reindyr
Hi, I am using django with Apache and mod_python. I have implemented a site navigation using the django-nav module. Internally the module maintains a dictionary and uses templatetags to generate the desired code for the navigation. Now, if I create new model instances in the django admin, I want

Re: get_next_by title?

2010-04-19 Thread Daniel Roseman
On Apr 19, 5:55 am, ChrisR wrote: > I still haven't found anything useful to help on this. > > Anyone have any thoughts, suggestions, pointers? > The basic algorithm for get_next_by_FOO is just: MyModel.objects.order_by('FOO').filter(FOO__gt=myobject.FOO)[0] In other words, order by the relevan

Django - Java RPC?

2010-04-19 Thread jani.mono...@gmail.com
What is the most straightforward way of inspecting/scripting a headless Java application from Django? I run Jython embedded in the Java app already so this may or may not make things easier than plain Java on one side. Instead of writing my custom wire format I'd like to reuse existing serializati

Re: Django Admin - m2m widget with blank=true, null=true - How to unselect all FKs?

2010-04-19 Thread Jani Tiainen
No, it's definitely not obvious but there is no simple way to otherwise to do it. We've sometimes added button with piece of javascript to clear all selections. But that only works if user has js enabled of course. It's just how browsers and operating systems show that particular component a

Re: Multiple instance of the same app

2010-04-19 Thread Benjamin Reitzammer
Hi, maybe I missed something in you explanation, but if you want the same code powering multiple sites and each of the sites' data reside in their own database, while all sites still have the same model (this is were I'm unsure if I understood you correctly), why don't you simply use multiple setti