Re: Can someone help with Many-to-many referencing and then calculations against another field on the linked model

2011-01-20 Thread Trevor Stanley
Kenneth Gonsalves wrote: On Wed, 2011-01-19 at 22:34 +, The Stanley Household wrote: Happy to send Model if needed but at the moment I'm unable to run the server to provide admin error report, can C&P from terminal if that would help with the error. please copy and paste your code

djangos flat pages

2011-01-20 Thread Lukasz Szymanski
Hi there, Is there any way ( module,app ) to implement custom flat pages inside the app? example. I have a newsletter app with user emails. I would like to have a email form inside my app (admin backend) to send newsletters. Cheers. -- You received this message because you are subscribed to the

Re: [django-users] Custom signals

2011-01-20 Thread Piotr Zalewa
Yes, that was it! pre_copy.send(type(self), instance=self, ... On 01/20/11 01:37, Łukasz Rekucki wrote: > On 20 January 2011 02:00, Piotr Zalewa wrote: >> I'm trying to add custom signals to my models. >> I'm sure I'm missing some step. >> >> http://paste.pocoo.org/show/323618/ >> > > The "sende

Re: Readonly on subset of forms in Admin inlines

2011-01-20 Thread Thomas
Am 20.01.2011 um 03:27 schrieb Peter Phillips: > Hello, > > Is there a straightforward way to set fields to read only for a subset > of the forms in an inline formset in the Admin? I'd like to set some > fields to read only on my inline form for rows that were not created > by the user. However,

Re: Can someone help with Many-to-many referencing and then calculations against another field on the linked model

2011-01-20 Thread Kenneth Gonsalves
On Thu, 2011-01-20 at 08:37 +, Trevor Stanley wrote: > Fringe.objects.select_related().filter(id=self) should this not be (id=self.id) -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/ -- You received this message because you are subscribed to the G

Re: "CSRF verification failed" when sending simple GET request using curl

2011-01-20 Thread Daniel Roseman
On Wednesday, January 19, 2011 11:07:04 PM UTC, scabbage wrote: > > How do I add CSRF token to curl then? > > What if I wanna expose my views as web services without providing a > UI, how do I make sure clients (e.g. Ajax, actionscript, etc) can use > it without this CSRF issue? > > > Thanks.

Re: djangos flat pages

2011-01-20 Thread Konrad Delong
On 20 January 2011 09:43, Lukasz Szymanski wrote: > Hi there, > Is there any way ( module,app ) to implement custom flat pages inside > the app? > > example. > I have a newsletter app with user emails. I would like to have a email > form inside my app (admin backend) to send newsletters. It looks

How to add a top menu to admin site.

2011-01-20 Thread hollando
I'm building my application with the admin site. As a start point, it make things so easy. However, I want to add a top menu that links to my apps and some of the dynamic pages. My top menu is kinda simple. Unlike treemenu, it's just flat menu with a few items. One solution I can think of is by mod

Re: "CSRF verification failed" when sending simple GET request using curl

2011-01-20 Thread Shawn Milochik
On Jan 19, 2011, at 8:01 PM, scabbage wrote: > Is there a way to completely disable CSRF handling? Sure, just remove the CSRF middleware from your settings.py. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: "CSRF verification failed" when sending simple GET request using curl

2011-01-20 Thread Russell Keith-Magee
On Thu, Jan 20, 2011 at 8:57 PM, Shawn Milochik wrote: > > On Jan 19, 2011, at 8:01 PM, scabbage wrote: > >> Is there a way to completely disable CSRF handling? > > Sure, just remove the CSRF middleware from your settings.py. While this advice is 100% accurate, I'd would *strongly* caution you no

Re: How to add a top menu to admin site.

2011-01-20 Thread Rehmetjan Tursun
in base_site.html: App in css: .currentapp{ *css* } On Thu, Jan 20, 2011 at 1:49 PM, hollando wrote: > I'm building my application with the admin site. > As a start point, it make things so easy. > However, I want to add a top menu that links to my apps and some of > the dyn

Re: How to add a top menu to admin site.

2011-01-20 Thread Konrad Delong
On 20 January 2011 06:49, hollando wrote: > I'm building my application with the admin site. > As a start point, it make things so easy. > However, I want to add a top menu that links to my apps and some of > the dynamic pages. > My top menu is kinda simple. Unlike treemenu, it's just flat menu wi

forms.ChoiceField get displayed value

2011-01-20 Thread Dan
If have a ChoiceField in a form (sometimes dynamically changed with javascript) when getting the cleaned_data for that field it will always return the value. i.e: Property1 self.cleaned_data.get('property') will always return '1' How can i access the displayed value 'Property1' ? Thanks -Da

Re: forms, hidden fields

2011-01-20 Thread niall-oc
Bang on the head :-) Cheers for that On Jan 18, 5:55 pm, Brian Neal wrote: > On Jan 18, 8:32 am, niall-oc wrote: > > > ... > > There is a simple form.  My question is how do you set a field to be > > hidden. > > >http://docs.djangoproject.com/en/1.1/topics/forms/#looping-over-the-f... > > > Thi

Django regular expression urls wrong match

2011-01-20 Thread Ali Ismayilov
Here is my urls.py: urlpatterns = patterns('', # Admin's (r'^admin/filebrowser/', include('filebrowser.urls')), (r'^admin/', include(admin.site.urls)), (r'^tiny_mce/(?P.*)$', 'django.views.static.serve', { 'document_root': os.path.join(settings.MEDIA_ROOT, > 'tinymce/j

question update: django auto filling some data based on model attribute

2011-01-20 Thread Mo Mughrabi
Any one? please, I been researching since yesterday http://stackoverflow.com/questions/4725685/django-auto-filling-some-data-based-on-model-attribute -- 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

DjangoAMF status

2011-01-20 Thread Joni @ mindpulse
Hello, Does anybody know if this project is active, or if it works OK with django < 1.3 ? Last update was 2 years ago... Or maybe there are other alternatives? Any info helps. DjangoAMF manual: http://djangoamf.sourceforge.jp/index.php?UserManual_en -- Joni -- You received this message because

Re: DjangoAMF status

2011-01-20 Thread meaglith
Maybe PyAMF is another choice. --- Blog: http://douhua.im Twitter: http://twitter.com/genedna Website: http://douhua.im --- On Thu, Jan 20, 2011 at 10:58 PM, Joni @ mindpulse wrote: > Hello,

Re: forms.ChoiceField get displayed value

2011-01-20 Thread Scott Gould
Try something like this: field = form.fields['property'] data = form.cleaned_data['property'] if isinstance(data, (list, tuple)): # for multi-selects friendly_name = [x[1] for x in field.field.choices if x[0] in data] else:

Re: thumbnails and rackspace files

2011-01-20 Thread Michel Thadeu Sabchuk
Hi! > basically does what i'm think of doing, but in a different area I make the thumb generation using the template tag but AFAIK easy thumbnails have a ThumbnailerImageField that can be configured to pre generate the thumbs. > also doesn't send the thumbnail over to cloudfiles, which is really

How to create multi-leveled forms with freeform entry options

2011-01-20 Thread Steven L Smith
One of our internal clients has asked for a form with the following structure: http://ssecdn.net/marcomm_form.pdf As you can see, there are a lot of checkboxes, and they (the client) need to be able to add more via the admin. I initially thought I'd store "Request Types" and "Requests" like this:

Re: Can someone help with Many-to-many referencing and then calculations against another field on the linked model

2011-01-20 Thread Trevor Stanley
Kenneth That is what I originally though but if I write that this is the error I get: in _get_fringe_value ft = Fringe.objects.select_related().filter(id=self.id).values() AttributeError: 'str' object has no attribute 'id' I'm in London and I do this in my spare time so have just arrived h

Re: "CSRF verification failed" when sending simple GET request using curl

2011-01-20 Thread scabbage
How do I include CSRF token in a curl request then? I use curl for debugging. Cannot seem to find any info on Google :( On Jan 20, 5:11 am, Russell Keith-Magee wrote: > On Thu, Jan 20, 2011 at 8:57 PM, Shawn Milochik wrote: > > > On Jan 19, 2011, at 8:01 PM, scabbage wrote: > > >> Is there a way

Installing Django on Linux-Derbian using virtualBox on Windows 7 Machine

2011-01-20 Thread Kimberly
Hello, I am new to the Django world and I was wondering if someone can help me step by step on how to install the Django on my Linux program. I've read some tutorial guides and I am abit lost and faced some issues. I am currently on linux and need to know how to add packages, and things in order to

Mongo - testing

2011-01-20 Thread Andrew Marder
Has anyone had any luck setting up testing databases with mongo? Right now I'm using pymongo in a single app, and I thought it would be cool if in that app I could see if my code was being tested and in that case I could use a different database. Problem is there doesn't seem to be an environment v

Re: Mongo - testing

2011-01-20 Thread Javier Guerra Giraldez
On Thu, Jan 20, 2011 at 4:26 PM, Andrew Marder wrote: > Problem is there doesn't seem > to be an environment variable in Django that will tell me whether my > code is being tested. that defeats the purpose of testing, doesn't it? even more in your case, since you want to hide the 'too experiment

Re: Installing Django on Linux-Derbian using virtualBox on Windows 7 Machine

2011-01-20 Thread Shawn Milochik
Exactly what have you tried, and where do you get stuck? What error message are you getting? -- 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@googlegroups.com. To unsubscribe from this group, sen

Re: Installing Django on Linux-Derbian using virtualBox on Windows 7 Machine

2011-01-20 Thread Kimberly Harvey
Right now, I am having problem with the installation of linux ( I will try to figure that out if not, will contact you about that). I do have a problem with installing the Django on Linux. I am new to the Django world, so I've already downloaded the Django to my usb drive. Is there a certain way I

Re: Installing Django on Linux-Derbian using virtualBox on Windows 7 Machine

2011-01-20 Thread Michael
You can probably just run "sudo apt-get install python-django" from the command line. -- Michael On Thu, 2011-01-20 at 13:26 -0800, Kimberly wrote: > Hello, I am new to the Django world and I was wondering if someone can > help me step by step on how to install the Django on my Linux program. >

Re: Installing Django on Linux-Derbian using virtualBox on Windows 7 Machine

2011-01-20 Thread Shawn Milochik
On 01/20/2011 04:40 PM, Kimberly Harvey wrote: Right now, I am having problem with the installation of linux ( I will try to figure that out if not, will contact you about that). I do have a problem with installing the Django on Linux. I am new to the Django world, so I've already downloaded th

Re: Installing Django on Linux-Derbian using virtualBox on Windows 7 Machine

2011-01-20 Thread Kimberly Harvey
But in order to do that, don't I need to have the Django source file somewhere in my computer/ or in my case.. I've downloaded the Django tar file to my usb flash drive? The command you gave me, that works in the linux world, right? Like I said, I am new to this Djando materials. On Thu, Jan 20,

Re: Installing Django on Linux-Derbian using virtualBox on Windows 7 Machine

2011-01-20 Thread Kimberly Harvey
I cannot install the Ubuntu, I have to use Derbian for work purposes. On Thu, Jan 20, 2011 at 3:45 PM, Shawn Milochik wrote: > On 01/20/2011 04:40 PM, Kimberly Harvey wrote: > >> Right now, I am having problem with the installation of linux ( I will try >> to figure that out if not, will contact

Re: Installing Django on Linux-Derbian using virtualBox on Windows 7 Machine

2011-01-20 Thread Ivo Brodien
> But in order to do that, don't I need to have the Django source file > somewhere in my computer/ or in my case. apt-get gets packages from the internet. And btw. Ubuntu is based on Debian. smime.p7s Description: S/MIME cryptographic signature

Expert help needed --LINUX on virtualBox using Windows 7 machine

2011-01-20 Thread Kimberly
This is now a LINUX-Derbian problem I am experiencing. I open the virtualbox and clicked on the Linux-Windows that I wanted, and clicked on "start" to run it. Once it run, it is black screen. I already mount the Derbian iso to the program, so I am lost for words on what is going on. This is a strug

Re: Installing Django on Linux-Derbian using virtualBox on Windows 7 Machine

2011-01-20 Thread Kimberly Harvey
MY boss never mentioned about using the Ubuntu, just want me to use the Debian. Thanks On Thu, Jan 20, 2011 at 3:58 PM, Ivo Brodien wrote: > > > > But in order to do that, don't I need to have the Django source file > somewhere in my computer/ or in my case. > > apt-get gets packages from the

Re: Installing Django on Linux-Derbian using virtualBox on Windows 7 Machine

2011-01-20 Thread Michael
Debian maintains a repository of software that is available to download and install easily. The fastest way to do this is from the command line. "apt-get" is the program that will do this for you, you just give it the name of the program you want, and it will download and install it for you autom

Re: Installing Django on Linux-Derbian using virtualBox on Windows 7 Machine

2011-01-20 Thread Mike Ramirez
On Jan 20, 1:47 pm, Kimberly Harvey wrote: > I cannot install the Ubuntu, I have to use Derbian for work purposes. > Ok, I have some suggestions, as someone said this is not a linux support group. Before you start working with django, you should take this one step at a time and get to know yo

Re: Can someone help with Many-to-many referencing and then calculations against another field on the linked model

2011-01-20 Thread Rainy
On Jan 20, 2:04 pm, Trevor Stanley wrote: > Kenneth > > That is what I originally though but if I write that this is the error I > get: > > in _get_fringe_value >     ft = Fringe.objects.select_related().filter(id=self.id).values() > AttributeError: 'str' object has no attribute 'id' > > I'm in

manage.py test => FAILED (failures=4, errors=1) HELP ME!!!

2011-01-20 Thread Marco Lerco
Sorry for my bad English. I'm Italian :-) I'm starting to study Satchmo. I followed all the installation process (http:// www.satchmoproject.com/ docs/dev/new_installation.html), after which I followed the command: python manage.py satchmo_check Result? This: Checking your satchmo configuration

Re: Installing Django on Linux-Derbian using virtualBox on Windows 7 Machine

2011-01-20 Thread Steven Elliott Jr
> Ubuntu IS Debian for all intents and purposes. Why does your boss insist that > you use a particular distro? It shouldn't really matter what your development > OS is (at least with *nix systems). Is there an existing Django application > that needs to be supported or is this a new project? >

Re: Expert help needed --LINUX on virtualBox using Windows 7 machine

2011-01-20 Thread Steven Elliott Jr
Why don't you try partitioning your hard drive instead and doing a dual boot installation? Also, it's Debian not Derbian. -Steve On Jan 20, 2011, at 4:59 PM, Kimberly wrote: > This is now a LINUX-Derbian problem I am experiencing. I open the > virtualbox and clicked on the Linux-Windows th

Re: "CSRF verification failed" when sending simple GET request using curl

2011-01-20 Thread Russell Keith-Magee
On Fri, Jan 21, 2011 at 4:40 AM, scabbage wrote: > How do I include CSRF token in a curl request then? I use curl for > debugging. Cannot seem to find any info on Google :( The CSRF token is just a hidden field on your form. When you render your template, the CSRF token will be included on the re

Re: Expert help needed --LINUX on virtualBox using Windows 7 machine

2011-01-20 Thread Russell Keith-Magee
On Fri, Jan 21, 2011 at 7:21 AM, Steven Elliott Jr wrote: > Why don't you try partitioning your hard drive instead and doing a dual boot > installation? > > Also, it's Debian not Derbian. And, as was pointed out on the last thread on this topic, this isn't a Linux support group. At the moment,

Re: Installing Django on Linux-Derbian using virtualBox on Windows 7 Machine

2011-01-20 Thread Kenneth Gonsalves
On Thu, 2011-01-20 at 22:58 +0100, Ivo Brodien wrote: > > But in order to do that, don't I need to have the Django source file > somewhere in my computer/ or in my case. > > apt-get gets packages from the internet. > > And btw. Ubuntu is based on Debian. and btw, the django version in debian i

Re: Expert help needed --LINUX on virtualBox using Windows 7 machine

2011-01-20 Thread Kenneth Gonsalves
On Thu, 2011-01-20 at 18:21 -0500, Steven Elliott Jr wrote: > Why don't you try partitioning your hard drive instead and doing a > dual boot installation? > > he is not doing dual boot - he is running linux under windows! -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://il

Re: Can someone help with Many-to-many referencing and then calculations against another field on the linked model

2011-01-20 Thread Kenneth Gonsalves
On Thu, 2011-01-20 at 19:04 +, Trevor Stanley wrote: > ft = Fringe.objects.select_related().filter(id=self.id).values() > AttributeError: 'str' object has no attribute 'id' maybe filter(id=self.fringe) or (id=self.fringe_id) -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http

Re: Installing Django on Linux-Derbian using virtualBox on Windows 7 Machine

2011-01-20 Thread Kimberly Harvey
Thanks for the tips and advices. I still believe Django can be run on the linux-Debian version. There are some updated Django which I've already saved on my usb flash drive which I will soon run some commands on the linux as some other people has advised me to do so. The person wants me to learn mo

Re: Installing Django on Linux-Derbian using virtualBox on Windows 7 Machine

2011-01-20 Thread Mike Ramirez
On Thursday, January 20, 2011 07:09:10 pm Kimberly Harvey wrote: > Thanks for the tips and advices. I still believe Django can be run on the > linux-Debian version. No one is saying otherwise. > There are some updated Django which I've already > saved on my usb flash drive which I will soon run s

Re: Installing Django on Linux-Derbian using virtualBox on Windows 7 Machine

2011-01-20 Thread Kimberly Harvey
That is exactly what I am doing right now, I between the crawl and walk phrase now, lol. On Thu, Jan 20, 2011 at 9:23 PM, Mike Ramirez wrote: > On Thursday, January 20, 2011 07:09:10 pm Kimberly Harvey wrote: > > > Thanks for the tips and advices. I still believe Django can be run on the > > >

Re: Localisation

2011-01-20 Thread Lachlan Musicman
On Wed, Jan 19, 2011 at 01:40, David Walker wrote: > There seem to be two main places where date formats originate.  They > are set in settings.py and in the locale's formats.py > (django.conf.locale..formats). > > formats.py sets (amongst others) DATE_FORMAT and SHORT_DATE_FORMAT for > the local

Re: Can someone help with Many-to-many referencing and then calculations against another field on the linked model

2011-01-20 Thread Kenneth Gonsalves
On Fri, 2011-01-21 at 07:33 +0530, Kenneth Gonsalves wrote: > On Thu, 2011-01-20 at 19:04 +, Trevor Stanley wrote: > > ft = Fringe.objects.select_related().filter(id=self.id).values() > > AttributeError: 'str' object has no attribute 'id' > > maybe filter(id=self.fringe) or (id=self.fringe_id