Re: django-sagepay example

2013-04-10 Thread sparky
wow a million times thank you! just what I needed to get going. :))) On Tuesday, April 9, 2013 5:27:12 PM UTC+1, sparky wrote: > > I want to use > django-sagepay. > > However, it doesn't seem to have any examples or test.

Re: [django_tables2] Expected table or queryset, not 'str'.

2013-04-10 Thread Tom Evans
On Tue, Apr 9, 2013 at 8:06 PM, Tomas Pelka wrote: > > ValueError at /plyn > > Expected table or queryset, not 'str'. > > Request Method:GET > Request URL:http://127.0.0.1:8000/plyn > Django Version:1.5 > Exception Type:ValueError > Exception Value: > > Expected table or queryset, not 'str'. > Yo

Re: [django_tables2] Expected table or queryset, not 'str'.

2013-04-10 Thread Tomas Pelka
Damn, what is the correct version or other plugin to display nice tables in Django? Thanks Tom Dne středa, 10. dubna 2013 11:08:35 UTC+2 Tom Evans napsal(a): > > On Tue, Apr 9, 2013 at 8:06 PM, Tomas Pelka > > wrote: > > > > ValueError at /plyn > > > > Expected table or queryset, not 'str'.

Re: Django 1.5 not disconnecting from database after a request

2013-04-10 Thread Andrey Kostakov
https://docs.djangoproject.com/en/dev/ref/databases/#persistent-connections On Wed, Apr 10, 2013 at 2:59 AM, Lewis Sobotkiewicz wrote: > Hi all, > > I'm seeing some strange, undocumented behaviour when upgtrading to Django > 1.5.1. I notice that it is holding onto MySQL connections after request

Django developer required for full time job

2013-04-10 Thread Mo Mughrabi
Hello, We are looking for a Django developer for a full time job in a start up, the candidate must have work experience with Django. As a plus knowing the below - Linux administration / setup - amazon cloud computing - RabbitMQ and Celery - South migration for Django

Re: Can someone help me with this error. No ReverseMatch

2013-04-10 Thread Chris Ramón
using one url would be: url(r'''^narrow_category/(?P\d+)/(?P\w*)''' r'(?:\/(?P\d+))?' r'(?:\/(?P\d+))?' r'(?:\/(?P\d+))?$', 'catalog.views.narrow_category', name="narrow_category"), second_digit, third_digit and fourth_digit parameters would be optional, and your view would look somethi

Re: Using a drop down list as widget for filter in admin

2013-04-10 Thread Daniel Braun
Thanks Ibrahim, I was searching google for a solution and was sent here - it was simply perfect. (should be merged to be honest!) On Sunday, September 23, 2012 4:46:46 PM UTC+2, Ibrahim Lawal wrote: > > Here's how I achieved it. > > {% load i18n %} > {% if choices|length > 9 %} > {% blocktrans

Re: Getting an AttributeError while creating a Django project

2013-04-10 Thread ak
Please try to use the *traceback* option: >>> python django-admin.py startproject mysite --traceback Maybe we will get some additional info... -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emai

Oracle database TextField limitations and Django admin interface queries

2013-04-10 Thread Lauri Savolainen
A little background: my application is used to manage observational data which is collected from designated routes annually. Each route object has a set of observation events which in turn have a date field. The data is managed by using a (terrible) customized Django admin interface. In the adm

Re: django-sagepay example

2013-04-10 Thread Bill Freeman
An please, indicate on your site that the credit card number will go through your site, so that I can know to never buy anything there. I suspect that I can count on my fingers and toes the number of web developers in the world who have the knowledge, patience, and diligence to securely handle cre

Re: Oracle database TextField limitations and Django admin interface queries

2013-04-10 Thread Jani Tiainen
10.4.2013 14:45, Lauri Savolainen kirjoitti: A little background: my application is used to manage observational data which is collected from designated routes annually. Each route object has a set of observation events which in turn have a date field. The data is managed by using a (terrible) cu

Django queryset 'in' operator on two querysets fails on first call

2013-04-10 Thread bradley griffiths
Cross posted from: stack overflow . When using the 'in' operator on two querysets, the first time the call is made it fails. from django.db import models class Category(models.Model):

Re: Can admin list being filtered be remembered

2013-04-10 Thread Derek
Use this middleware: https://code.djangoproject.com/ticket/3777#comment:6 On Tuesday, 9 April 2013 23:41:25 UTC+2, frocco wrote: > > If I set a filter in the admin list, and edit and save a record, the > filter is not remembered. > Cn this be changed? > -- You received this message because yo

Django queryset 'in' operator fails on first call

2013-04-10 Thread bradley griffiths
Corss posted from stack overflow When using the 'in' operator on a queryset, the first time the call is made it fails. from django.db import models class Category(models.Model): name = models.Cha

Re: Show label next to Foreing key raw_id_field

2013-04-10 Thread Almudena Vila Forcén
Does anyone know how to do this? Thanks El jueves, 4 de abril de 2013 12:35:21 UTC+2, Almudena Vila Forcén escribió: > > Hi, > > I have a model with a Foreing key raw_id_field. Now, when I choose > something and I return to the model I can only see the id. But when I save > it and I open it aga

DateField displayed as (None) in admin

2013-04-10 Thread Tomas Pelka
Hi all, for some reason Dates are displayed as (None) in admin and in shell as well. model.py: # -*- coding: utf-8 -*- from django.db import models from django.contrib import admin class Record(models.Model): date = models.DateField(_('Čas zadání'), null=True, blank=True) #, auto_now=True,

Re: Django queryset 'in' operator on two querysets fails on first call

2013-04-10 Thread carlos
maybe need read de docu https://docs.djangoproject.com/en/1.5/ref/models/querysets/#select-related Cheers On Wed, Apr 10, 2013 at 7:26 AM, bradley griffiths < bradley.griffi...@gmail.com> wrote: > Cross posted from: stack > overflow

Re: Django queryset 'in' operator on two querysets fails on first call

2013-04-10 Thread Tom Evans
On Wed, Apr 10, 2013 at 2:26 PM, bradley griffiths wrote: > Cross posted from: stack overflow. > > When using the 'in' operator on two querysets, the first time the call is > made it fails. > > … > > print category_list # [, ] > print other_cats # [] > print category_list[0] in other_cats # False

Re: DateField displayed as (None) in admin

2013-04-10 Thread Tomas Pelka
I forgot to mention this is Django 1.5.1. Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group,

Re: Django 1.5.1: ORA-01843: not a valid month

2013-04-10 Thread Carsten Fuchs
Am 10.04.2013 16:50, schrieb Carsten Fuchs: I consider downgrading to Django 1.4.5 on the affected system, as I'm unfortunately unsure how to best proceed with debugging and/or fixing this. I just found out that when we - downgrade cx_Oracle to 5.0.3, the problem does not occur, - upgradi

Re: facebook/twitter sharing, and testing

2013-04-10 Thread sara ismail
can anyone help me?! On Wednesday, April 10, 2013 4:50:51 PM UTC+2, sara ismail wrote: > > im new to django, and i am working on a project, a selling and buying > website, where a user can post about a product that he/she wants to sell, > and my part right now is sharing posts from the site with

[Jobs] - Python/Django Developer Position

2013-04-10 Thread Ranjith Kumar
Hello All, Greetings A Job has been created in group India: Senior Python Programmers - Urgently Required | Hakett We welcome talented people with the following skills to join in our family. We are looking for a Strong and Highly Skilled Python Developers. Job Title : Python Developers No. of

How to use a list in a django model

2013-04-10 Thread Cody Scott
I am trying to store questions in a database. I don't to set a fixed number of options for the question, some questions could have 4 or 2 or 5. Currently I am using a ManyToManyField to a table that just contains a CharField. This works but creating an option requires making another Choice objec

Re: How to use a list in a django model

2013-04-10 Thread Brian Schott
Is a many-to-many what you really want? How common are the choices and suppose someone goes in an edits one of the choices and suddenly it doesn't match up right with a different linked question. It might make sense to use a reverse foreign key one-to-many relationship and provide a mechanism

Re: Django 1.5 not disconnecting from database after a request

2013-04-10 Thread Lewis Sobotkiewicz
Thanks, but I'm not using the Django development version. Apparently persistent DB conns will be a feature of Django 1.6, but not 1.5.1. I'm using RDS with MySQL 5.5.27. The only thing I've changed about the infrastructure is upgrading Django to 1.5.1. If I downgrade to 1.4.5, DB connections ar

Re: How to use a list in a django model

2013-04-10 Thread Cody Scott
I like the is_correct and the count attributes! The problem with that it is hard to make a quiz in the admin section. You create a quiz and a question but then you have to go to the choice section and create choices for the question. And even if you have the same choice in two questions you nee

Re: How to use a list in a django model

2013-04-10 Thread Brian Schott
You can create and edit choices right in the Question admin view. You can even control how many blank slots to show by default. Go look at ChoiceInline admin here in the tutorial: https://docs.djangoproject.com/en/dev/intro/tutorial02/ The next step would be to create an admin action on Questi

Re: django-sagepay example

2013-04-10 Thread sparky
@ke1g thats a very sweeping generalisation. personally, we are PCI DSS level 2 compliant, have scans and all data is transmitted using SSL. we are resellers we also NEVER store card details EVER only transmit! I'm a newbie to Django but have implemented sagepay on 3 other languages on sites whi

Re: django-sagepay example

2013-04-10 Thread Mario Gudelj
What exactly are you proposing, Bill? What's the problem with simply passing the credit card data to the gateway if you do it over SSL and not store it? Are you saying that you're only purchasing on sites with non-seamless gateways? On 11 April 2013 05:22, sparky wrote: > @ke1g thats a very swe

Re: django-sagepay example

2013-04-10 Thread sparky
@ke1g also there are very high compliance standards in the UK. You have to be complaint or the merchants get on your case. you have to have port scans, SSL and some level of PCI DSS to take cards on your site with sagepay. just my 2p On Wednesday, April 10, 2013 1:15:17 PM UTC+1, ke1g wrot

Re: How to use a list in a django model

2013-04-10 Thread Cody Scott
Perfect Answer! I must have been sleeping when I did that part of the tutorial. Now I understand it and even learned about actions and this is what my duplicate action looks like def duplicate_questions(modeladmin, request, queryset): for obj in queryset: new_question = Question(ques

Re: How to use a list in a django model

2013-04-10 Thread Cody Scott
I also want to have the same question in multiple quizzes. But the count for each option should be dependent on the Quiz. I can do the same thing to Quiz in the admin and add Questions Inline but then to add Choices to the Questions I need to go to the question panel and there will be a lot of

Re: How to use a list in a django model

2013-04-10 Thread Cody Scott
Also if a Question changes and it is used in multiple quizzes all question instances will also need to change. I think I am missing something. Here is my models.py class Product(models.Model): name = models.CharField(max_length=256, unique=True) def __unicode__(self): return

Re: django-sagepay example

2013-04-10 Thread Bill Freeman
On Wed, Apr 10, 2013 at 3:22 PM, sparky wrote: > @ke1g thats a very sweeping generalisation. > > personally, we are PCI DSS level 2 compliant, have scans and all data is > transmitted using SSL. we are resellers > we also NEVER store card details EVER only transmit! I'm a newbie to > Django but h

Re: django-sagepay example

2013-04-10 Thread Bill Freeman
On Wed, Apr 10, 2013 at 3:50 PM, sparky wrote: > @ke1g also there are very high compliance standards in the UK. You have > to be complaint or the merchants > get on your case. > you have to have port scans, SSL and some level of PCI DSS to take cards > on your site with sagepay. > > > just my 2p

Nested Result

2013-04-10 Thread Carlos Eduardo Sotelo Pinto
Hi people I have three different apps on my project - vehicles - gpstracking - customer I need a result like - Site 1 -- Customer 1 Vehicle | Last Track but I dont know how to do and google is not helping me so much I know I must so a filtered on view but I have gooten lost Please give m

sql union all to def()

2013-04-10 Thread Tommy
Hi. I have the SQL query below that works in PostgreSQL. I am attempting to learn to draw graphs/trend lines to a web page in the Django Framework Rather than use raw SQL queries I would like to learn how to get the same results in a Django purists fashion. I have searched but I cannot find a

Re: django-sagepay example

2013-04-10 Thread Bill Freeman
On Wed, Apr 10, 2013 at 3:35 PM, Mario Gudelj wrote: > What exactly are you proposing, Bill? What's the problem with simply > passing the credit card data to the gateway if you do it over SSL and not > store it? Are you saying that you're only purchasing on sites with > non-seamless gateways? > I

Re: How to use a list in a django model

2013-04-10 Thread Brian Schott
Cody, This is a REALLY large list, so I recommend at this level of detailed question to StackOverflow. It is a great resource and lots of Django developers like to show off and write your code for you sometimes :-). Short answers: There are ways to do custom inline forms: http://stackoverflow.

Re: facebook/twitter sharing, and testing

2013-04-10 Thread Bill Freeman
On Wed, Apr 10, 2013 at 11:55 AM, sara ismail wrote: > can anyone help me?! > > On Wednesday, April 10, 2013 4:50:51 PM UTC+2, sara ismail wrote: >> >> im new to django, and i am working on a project, a selling and buying >> website, where a user can post about a product that he/she wants to sell,

Re: Accessing Django project models from CGI

2013-04-10 Thread Mark Jones
Can't imagine why you would want to do this via CGI, it can't perform very well. There is a TON of stuff that gets setup during initialization for wsgi/runserver, etc.. Syntax wise your import is way off since your models do not live in the Django folder, you can't import them like this.

Re: sql union all to def()

2013-04-10 Thread Rafael E. Ferrero
I think that you can get all your table data on a Django View and then make an algorithm to have your data, maybe using a recursive function. Like i understand you are putting together every single field in one... so your first result its one field (val) then you are counting all similar value, so

URL is successfully reversed and then not found

2013-04-10 Thread jondbaker
I'm working on tests for a Django app that I'm contributing to the community (https://github.com/jondbaker/django-critique) and have become stuck on a problem. After I perform a GET request for the app's sole URL within my integration tests: response = self.client.get(reverse("critique_create")

request_finished signal not being called with Django 1.5.1 with uwsgi

2013-04-10 Thread Lewis Sobotkiewicz
Hi there, I'm noticing some strange behaviour with Django 1.5.1 and uwsgi - The builtin signal django.core.signals.request_finished isn't being triggered. I've tried various versions of uwsgi, and they all have the same behaviour. Also, when I downgrade to Django 1.4.5, the normal behaviour res

Re: Django 1.5 not disconnecting from database after a request

2013-04-10 Thread Lewis Sobotkiewicz
Seems to be caused by Django not sending the "request_finished" signal, which is also bizarre, unexpected behaviour. On Wednesday, April 10, 2013 11:47:52 AM UTC-7, Lewis Sobotkiewicz wrote: > > Thanks, but I'm not using the Django development version. Apparently > persistent DB conns will be a

Custom Commands?

2013-04-10 Thread Mark Lybrand
I am at a loss how to get custom commands working in my Django project. I am on Windows 7, running Python 2.7.3, Django 1.4.5. When I try to make my "hello world" command, I get an unknown command error. I have the following structure: │ manage.py │ ├───mysite │ │ settings.py │ │ set

XMLRPC semms not work in 1.5.1

2013-04-10 Thread yillkid
Hi all I use XMLRPC with this link: https://code.djangoproject.com/wiki/XML-RPC and work fine in Django 1.4.3 But now I upgrade to 1.5.1 but not work error message as below: http://paste.ubuntu.com/5697269/ -- You received this message because you are subscribed to the Google Groups "Django us

New to testing

2013-04-10 Thread Lachlan Musicman
Hi I'm new to testing. Not to Django. To my shame. I'm trying to test some m2m signals connections, so I have a def test_parent_account_creation(self): jack = MaleAccountFactory() jill = FemaleAccountFactory() jack.parents.add(jill) self.assertIn(jill, jack.parents.all()) #w

Re: New to testing

2013-04-10 Thread Shawn Milochik
Create a function with a name that *doesn't* start with "test" and you can easily do what you want. Then both tests can call it. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, s

Re: New to testing

2013-04-10 Thread Mike Dewhirst
On 11/04/2013 2:02pm, Lachlan Musicman wrote: Hi I'm new to testing. Not to Django. To my shame. I'm trying to test some m2m signals connections, so I have a Inside your test class before writing tests you can have ... def setUp(self): jack = MaleAccountFactory() jill =

Re: New to testing

2013-04-10 Thread Lachlan Musicman
On 11 April 2013 14:23, Mike Dewhirst wrote: > On 11/04/2013 2:02pm, Lachlan Musicman wrote: > > Inside your test class before writing tests you can have ... > > def setUp(self): > > jack = MaleAccountFactory() > jill = FemaleAccountFactory() > > def tearDown(self): >

Re: New to testing

2013-04-10 Thread Lachlan Musicman
On 11 April 2013 14:42, Lachlan Musicman wrote: > On 11 April 2013 14:23, Mike Dewhirst wrote: >> On 11/04/2013 2:02pm, Lachlan Musicman wrote: >> >> Inside your test class before writing tests you can have ... >> >> def setUp(self): >> >> jack = MaleAccountFactory() >> jill =

Re: New to testing

2013-04-10 Thread Mike Dewhirst
On 11/04/2013 2:42pm, Lachlan Musicman wrote: On 11 April 2013 14:23, Mike Dewhirst wrote: On 11/04/2013 2:02pm, Lachlan Musicman wrote: Inside your test class before writing tests you can have ... def setUp(self): jack = MaleAccountFactory() jill = FemaleAccountFactor

Re: New to testing

2013-04-10 Thread Lachlan Musicman
On 11 April 2013 14:48, Lachlan Musicman wrote: >>> On 11/04/2013 2:02pm, Lachlan Musicman wrote: >>> >>> Inside your test class before writing tests you can have ... >>> >>> def setUp(self): >>> >>> jack = MaleAccountFactory() >>> jill = FemaleAccountFactory() >>> >>> def

should we develop apps based on urls?

2013-04-10 Thread surya
I have an unstructured idea in my to implement (say a weekend hack). The thing here is, how to give it a structure.. 1. should I first define URLs and then divide apps based on it? 2. or something else. I want to develop a ratings site.. where people rate on product X.. I like to divide apps

m2m symmetry confusion

2013-04-10 Thread Lachlan Musicman
Hi, I'm trying to implement a simple family tree type structure. I'm expanding on this example code base: https://github.com/mieows/familytree-django/blob/master/models.py (please ignore any errors in that models.py, I've addressed many of them) Ok, simply I have: class Account(models.Model)

Re: m2m symmetry confusion

2013-04-10 Thread Lachlan Musicman
On 11 April 2013 16:19, Lachlan Musicman wrote: > Hi, > > I'm trying to implement a simple family tree type structure. I'm > expanding on this example code base: > > https://github.com/mieows/familytree-django/blob/master/models.py > > (please ignore any errors in that models.py, I've addressed ma

Re: should we develop apps based on urls?

2013-04-10 Thread mulianto
Hi In django you can change the public URL with out change the function call in the view.py The URL.py is flexible and can be just inside each app you create for reusable . Mulianto Sent from my iPhone On 11 Apr 2013, at 13:11, surya wrote: > I have an unstructured idea in my to implement (

Re: Custom Commands?

2013-04-10 Thread Andrey Kostakov
For first step you need create application, "manage.py startapp myapp". 'management' folder should be located in your application folder. And don't forget add application in INSTALLED_APPS in your settings.py (INSTALLED_APPS = ('myapp', )) On Thu, Apr 11, 2013 at 4:52 AM, Mark Lybrand wrote: > I