Pass 'request' object to Form

2011-02-09 Thread NavaTux
Hi all, i have been using modelform in my site,Now i want to do filter the objects(only today generated) in the particular model(TAG) ,for that constraint TAGS has to be generated today only, because while retrieving all objects in a particular many_to_many(TAG) field it is quite

Re: Looking for IDE + FTP

2011-02-09 Thread Cal Leeming [Simplicity Media Ltd]
There is one thing for sure. As it stands, there is an open market for a 'do it all' product that manages CI (continuous integration), workflow, development, SVN etc. I think Google Apps and Cherokee came close, but I don't much care for google apps, and cherokee has nasty performance related bugs.

Re: csrf cookie security

2011-02-09 Thread Ian Clelland
On Wed, Feb 9, 2011 at 11:51 AM, Brian Craft wrote: > I thought, rather, that the csrf token was a cookie that was put in a > hidden form field. You're absolutely right; I wasn't thinking about that side of the token. > With firebug or webkit dev tools you can see the django csrf token in > the

Re: Calling out for Help!

2011-02-09 Thread Cal Leeming [Simplicity Media Ltd]
Hi, Please also don't take offence if this sounds harsh, but I never have seen much point in beating around the bush, and these are just my own opinions, others may disagree. This may sound old fashioned, but you haven't even greeted yourself to the community with your name, or at the very least

Re: Calling out for Help!

2011-02-09 Thread Jitesh
Hi Justin, Take a chill man, the folks here on this group will surely help you. > Well, the "python manage.py runserver" command returned a screen full > of errors. What would be the appropriate way to post that? I don't > want to burn anyone's special eyes. First try to google that error in most

Re: How To Populate A Dropdown List

2011-02-09 Thread Malcolm MacKinnon
And one more file to render the drop down list, order_closeouts.html below. Sorry about the messy code. It ain't pretty but it works for me. Let me know if you have any questions. I forgot to initialize the form in my view. See views.py below. Here's some sample code that works for me: in models

Re: How To Populate A Dropdown List

2011-02-09 Thread Malcolm MacKinnon
I forgot to initialize the form in my view. See views.py below. Here's some sample code that works for me: in models.py class InventoryCloseouts(models.Model): prim = models.IntegerField(primary_key=True, db_column='PRIM') # Field name made lowercase. items = models.CharField(max_length=255

Re: How To Populate A Dropdown List

2011-02-09 Thread Mac
Here's some sample code that works for me: in models.py class InventoryCloseouts(models.Model): prim = models.IntegerField(primary_key=True, db_column='PRIM') # Field name made lowercase. items = models.CharField(max_length=255, db_column='ITEMS', blank=True) # Field name made lowe gen

output as input *.html

2011-02-09 Thread gintare
Now if i filter out and display model objects they come as a text information. I can only read it. It is not possible to make and save changes directly in *.html. Maybe there is some function which i overlooked by reading documentation, which displays model fields as input with initial values fro

Re: Django 1.3 class based generic views queryset

2011-02-09 Thread Łukasz Rekucki
On 9 February 2011 19:16, Phil M wrote: > class SampleModelManager(models.Manager): >    def published(self): >        return self.get_query_set().filter(published=True, > date__lte=datetime.datetime.now()) > This is the source of your problem. Later, you have: class SampleModelDetailView(Detail

Re: django and scale9x (socallinuxexpo)

2011-02-09 Thread Gerald Fontejon
Greetings. Scale9x is approx 2 weeks away, and I'm still interested in getting Django on-site with a booth. Scale9x can provide booth space, power, network, and also additional tickets for the conference. Here is a list of current exhibitors: http://www.socallinuxexpo.org/scale9x/exhibitors

Specifying Select Widget Options

2011-02-09 Thread hank23
Is there anyway in a form definition to specify how the options for a select widget are to be coded when they're be generated automatically? Specifically is there a way to specify where the value and the displayed data attributes of the generated options are to pull that data from when they're form

Re: Best forum/group for Django Help

2011-02-09 Thread Shawn Milochik
On 02/09/2011 04:06 PM, SimpleDimple wrote: Guys, Need to know which is the best forum/group for Django help ? I thought this is the one but I don't see much activity here despite of the fact that there are 19000+ members...where do you go for discussing your django issues with people ? Is thi

Best forum/group for Django Help

2011-02-09 Thread SimpleDimple
Guys, Need to know which is the best forum/group for Django help ? I thought this is the one but I don't see much activity here despite of the fact that there are 19000+ members...where do you go for discussing your django issues with people ? -- You received this message because you are subscri

Re: default header template file

2011-02-09 Thread SimpleDimple
ah... I see now...will check it out.. On Feb 9, 4:21 am, Shawn Milochik wrote: > The reason you should use the toolbar is that it will help you > instantly determine which templates are being used, so you know which > ones to edit. > > Shawn -- You received this message because you are subscrib

Re: How To Populate A Dropdown List

2011-02-09 Thread SimpleDimple
did it work Hank ? On Feb 9, 7:47 am, Brian Neal wrote: > On Feb 8, 10:03 am, hank23 wrote: > > > I have coded a form which will display some data in a dropdown > > selection box. The data is being populated from a a queryset that I > > have setup in the form's code. However the entries in the d

Re: Setting session variable at the time of login

2011-02-09 Thread SimpleDimple
This is great, I'll definitely look into this weekend...and get back to you. On Feb 9, 11:37 pm, Matteius wrote: > You may be interested in this school system > django-classcomm:http://classcomm.googlecode.com/  demoed > athttp://classcomm.net/ I > am the primary developer on this and I have JI

Re: Looking for IDE + FTP

2011-02-09 Thread Ovnicraft
I understand you are deploy your apps or project via FTP, what is a really bad idea how you are proposing it, i recommend you invest about CVS (better DCVS) here you can upload your files correctly and better, security. You can also invest about Fabric, virtualenv and mercurial as recommended tools

Re: Django new install system path

2011-02-09 Thread Daniel Roseman
On Wednesday, February 9, 2011 8:04:43 PM UTC, Tomasz Łopusiewicz wrote: > > Hello i have installed mod_python and django in my home/mysite but > when i run localhost/mysite i give back this: > > Don't try and run before you can walk. You're completely new to Django, so there's no point in tr

Django new install system path

2011-02-09 Thread Tomasz Łopusiewicz
Hello i have installed mod_python and django in my home/mysite but when i run localhost/mysite i give back this: MOD_PYTHON ERROR ProcessId: 12505 Interpreter:'localhost' ServerName: 'localhost' DocumentRoot: '/var/www' URI:'/mysite' Location: '/mysite' Director

Re: csrf cookie security

2011-02-09 Thread Brian Craft
I thought, rather, that the csrf token was a cookie that was put in a hidden form field. With firebug or webkit dev tools you can see the django csrf token in the cookies. I would also refer you to middleware/csrf.py, where you can see it doing the set_cookie. I thought the security of the csrf t

Re: csrf cookie security

2011-02-09 Thread Ian Clelland
On Wed, Feb 9, 2011 at 11:23 AM, Brian Craft wrote: > I notice that the csrf token is not secure, i.e. the Set-Cookie is > constructed w/o the "secure" option, so the browser will send it > in-the-clear. It's trivial, then, for a 3rd party to discover the csrf > token. > > Am I missing something?

Re: cannot login to admin site using admin credentials

2011-02-09 Thread Bill Freeman
You *might* need to drop all the auth_xxx tables, syncdb, and try again. Just a thought, since you've already broken the schema. But you might want to capture a dump of the database before you do stuff like this. Bill 2011/2/8 xpanta : > I tried deleting auth_user in order to force manage.py to

Re: Looking for IDE + FTP

2011-02-09 Thread lotia
Left out jEdit, which is not a native app, nor is it an IDE, but it packs in a lot of functionality via plugins. http://www.jedit.org/ -- aal On Feb 8, 8:30 pm, Karen McNeil wrote: > I have three Django sites that I've been working on recently and I've > been doing most of the development work

csrf cookie security

2011-02-09 Thread Brian Craft
I notice that the csrf token is not secure, i.e. the Set-Cookie is constructed w/o the "secure" option, so the browser will send it in-the-clear. It's trivial, then, for a 3rd party to discover the csrf token. Am I missing something? -- You received this message because you are subscribed to the

How To Code A Dialog Screen And Respond to It

2011-02-09 Thread hank23
I'm in the process of trying to write code that will check to see if a folder already exists and if it doesn't I want it to display a new screen or dialog box while still keeping the existing screen. The new screen or dialog box should show an error saying the folder does not exist and asking for c

Re: Looking for IDE + FTP

2011-02-09 Thread lotia
+1 folks recommending version control and not editing files directly on the remote machine. Additionally, FTP is quite insecure since you are sending login/ password in the clear for a user privileged to write files on your remote machine. However, people have reasons for doing this and if you'd

Django 1.3 class based generic views queryset

2011-02-09 Thread Phil M
I'm currently having a problem with DetailView based views and querysets being cached. If I use a custom manager function for the DetailView queryset, such as SampleModel.objects.published() below, the first request caches the queryset and any objects added after are inaccessible - the queryset ge

Re: Setting session variable at the time of login

2011-02-09 Thread Matteius
You may be interested in this school system django-classcomm: http://classcomm.googlecode.com/ demoed at http://classcomm.net/ I am the primary developer on this and I have JIRA project management and product backlog etc. so perhaps you would be more interested in working off an existing system.

Re: Looking for IDE + FTP

2011-02-09 Thread Matteius
I love pycharm and they have been improving it. It has become my primary Django IDE and they give free licenses to qualifying open source projects. Of course FileZilla is good for FTP and cygwin has SSH and SCP. I use VirtualBox for instances and sometimes have to edit files locally on the machin

Re: View file not processing any new additions

2011-02-09 Thread Nick
Nevermind. I was checking the template for one view and editing another. Idiotic. yeesh. On Feb 9, 12:12 pm, Nick wrote: > Additionally, > > if I change any of the other elements in the view, say: es = > ExamplTESTFORFAULT.object.all() it doesn't raise an error. Only when > there is a syntax er

Re: Any advice on why my template inheritance does not seem to be working??

2011-02-09 Thread creecode
Glad to be of assistance! On Feb 9, 10:10 am, Dustin wrote: > Wow, thank you. Yes that was exactly my problem. -- 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

Re: View file not processing any new additions

2011-02-09 Thread Nick
Additionally, if I change any of the other elements in the view, say: es = ExamplTESTFORFAULT.object.all() it doesn't raise an error. Only when there is a syntax error. On Feb 9, 11:53 am, Nick wrote: > I have a view for an application that loops through a queryset and > cleans the data for a ce

Re: now template tag and predefined format DATE_FORMAT problem

2011-02-09 Thread creecode
Hello Fred, On Feb 9, 10:02 am, Fred Chevitarese wrote: > I guess :P > > I guess you are making an mistake. > > It have to be something like this: {% now "jS F Y H:i" %} > > > You can take a look at the table with the custom datefilters: > > >http://docs.djangoproject.com/en/1.2/ref/templates/b

Re: Any advice on why my template inheritance does not seem to be working??

2011-02-09 Thread Dustin
Wow, thank you. Yes that was exactly my problem. My view code was: def problems(request): problems_list = Problems.objects.all() return render_to_response('problems_index.html', {'problems_list': problems_list}) And as soon as I changed it to "problems_index_problist.html" it worked!! Th

Re: Class-based views & authentication

2011-02-09 Thread Pascal Germroth
Hi, >> To make things a bit easier, I'm about to write my own mixin for that so >> I only have to provide a method that checks if credentials are OK. > > As you've noticed, you can override the dispatch to decorate the view > as required, and if you have a common authentication pattern, you can >

Re: now template tag and predefined format DATE_FORMAT problem

2011-02-09 Thread Fred Chevitarese
I guess :P " *O relógio da vida recebe corda apenas uma vez.* *Ninguém tem o poder de decidir quando os ponteiros pararão, se mais cedo ou se mais tarde.* *O presente é o único tempo que você possui.* *Viva, ame e trabalhe com vontade.* *Não ponha nenhuma esperança no tempo, pois o relógio pode p

Re: now template tag and predefined format DATE_FORMAT problem

2011-02-09 Thread Fred Chevitarese
I guess you are making an mistake. It have to be something like this: {% now "jS F Y H:i" %} You can take a look at the table with the custom datefilters: http://docs.djangoproject.com/en/1.2/ref/templates/builtins/#date ;) Hope it help! " *O relógio da vida recebe corda apenas uma vez.* *

View file not processing any new additions

2011-02-09 Thread Nick
I have a view for an application that loops through a queryset and cleans the data for a certain kind of output but leaves all the DB data in tact as it was entered for archiving purposes. There are multiple conditional checks that are working fine but anything new I've added or subtracted from the

django CMS 2.1.1 released!

2011-02-09 Thread Jonas Obrist
We just released django CMS 2.1.1 to fix an issue brought to light by Django 1.2.5. After todays Django 1.2.5 security release [1], the django CMS AJAX requests stopped working, due to lacking CSRF protection. This critical issue has now been fixed in the 2.1.1 release. Changes in this versi

Re: New installation django

2011-02-09 Thread Tom Evans
2011/2/9 Tomasz Łopusiewicz : > Hello, > > i am new and i wanted to install django on my local but i have some > problems with it. I was trying to install django according to: > http://www.howtoforge.com/installing-django-on-debian-etch-apache2-mod_python > > Everything was great but when i call th

Django Evangelists for a product?

2011-02-09 Thread destraynor
Hey all, I hope this message isn't perceived as spam, when asking around everyone told me that this was the best resource for finding folks. My name is Des, I work with an Irish company called Contrast, who produce a web based exception tracker called Exceptional. Exceptional supports the Django

Re: now template tag and predefined format DATE_FORMAT problem

2011-02-09 Thread creecode
Hey Daniel, I thought things were off somewhere. Just seeing if it was me first! :-) I looked at the code for Django v1.2.4 and couldn't see any signs that the now template tag and friends were even checking for the predefined formats. On Feb 9, 9:17 am, Daniel Roseman wrote: > On Wednesday, F

Re: Calling out for Help!

2011-02-09 Thread Joel Goldstick
On Wed, Feb 9, 2011 at 11:38 AM, Dev@CB wrote: > Well, the "python manage.py runserver" command returned a screen full > of errors. What would be the appropriate way to post that? I don't > want to burn anyone's special eyes. > And since we are using Apache, I'm going to say we are also using > w

New installation django

2011-02-09 Thread Tomasz Łopusiewicz
Hello, i am new and i wanted to install django on my local but i have some problems with it. I was trying to install django according to: http://www.howtoforge.com/installing-django-on-debian-etch-apache2-mod_python Everything was great but when i call this command in my shell Debian 6: "/usr/sha

Re: now template tag and predefined format DATE_FORMAT problem

2011-02-09 Thread Daniel Roseman
On Wednesday, February 9, 2011 3:31:53 PM UTC, creecode wrote: > > Hello all, > > I'm trying to use the now template tag < > http://docs.djangoproject.com/en/1.2/ref/templates/builtins/#now > > with the predefined format DATE_FORMAT and the now tag seems to be > processing the predefined format

Re: standalone server

2011-02-09 Thread Eric Chamberlain
We've used Twisted with the django ORM for similar uses in the past. On Feb 8, 2011, at 10:50 PM, rahul jain wrote: > Hi Guys, > > I would like to create a standalone server using django environment which > accepts/receive inputs through socket connections. After that some processing > and th

Re: Calling out for Help!

2011-02-09 Thread Joel Goldstick
On Wed, Feb 9, 2011 at 11:31 AM, Dev@CB wrote: > I can't let it go.. the whole "ask a question" and "the return key is > your friend" thing. I thought I was writing an intro blerb to the > moderators... anyway, it was in a little web form box and I just kept > typing. I didn't realize it was goin

Re: Calling out for Help!

2011-02-09 Thread Dev@CB
Well, the "python manage.py runserver" command returned a screen full of errors. What would be the appropriate way to post that? I don't want to burn anyone's special eyes. And since we are using Apache, I'm going to say we are also using wsgi. > Well, the first thing to see when deploying a djang

Re: Calling out for Help!

2011-02-09 Thread Dev@CB
I can't let it go.. the whole "ask a question" and "the return key is your friend" thing. I thought I was writing an intro blerb to the moderators... anyway, it was in a little web form box and I just kept typing. I didn't realize it was going to end up as a post. If I wanted sarcasm I'd start a co

Re: Any advice on why my template inheritance does not seem to be working??

2011-02-09 Thread creecode
Hello Dustin, I suspect your are confused about how inheritance works. On Feb 9, 7:43 am, Dustin D wrote: > No matter what I do, when I visit the parent, it just displays the > default value inside {% block problist %} as if the child doesn't > exist. I think you are referencing the parent tem

Re: How should I properly impliment HTTP(S) auth (REMOTE_AUTH) in django?

2011-02-09 Thread Sean W
The relays would operate garage doors. So, I want the user to be able to be able to quickly and securely launch the application and operate the doors. I would like to have a system which is almost as easy to use as an existing opener, but with additional features: - Check the door status fro

Re: How should I properly impliment HTTP(S) auth (REMOTE_AUTH) in django?

2011-02-09 Thread Sean W
The relays wound operate garage doors. So, I want the user to be able to be able to quickly and securely launch the application and operate the doors. I would like to have a system which is almost as easy to use as an existing opener, but with additional features: - Check the door status

Any advice on why my template inheritance does not seem to be working??

2011-02-09 Thread Dustin D
For some reason, I cannot seem to get template inheritance working and I have tried everything I can think of, so now I'm asking here. My problem is this: When I use one template, everything works fine. But as soon as I try to offload some of the code in a child, it just doesn't show up. Here are m

now template tag and predefined format DATE_FORMAT problem

2011-02-09 Thread creecode
Hello all, I'm trying to use the now template tag < http://docs.djangoproject.com/en/1.2/ref/templates/builtins/#now > with the predefined format DATE_FORMAT and the now tag seems to be processing the predefined format as a custom format. I tried... {% now "DATE_FORMAT" %} ...and get back... W

Re: Ordering/sort_by from a custom method

2011-02-09 Thread Casey S. Greene
I haven't used django-voting but it sounds to me like you want something like: Link.objects.aggregate(Avg(score = 'vote__score')).order_by('score') If I recall correctly you can chain aggregate and order_by. Anyway, that example and this link should get you started at least: http://docs.djangopro

AW: auth_user

2011-02-09 Thread Szabo, Patrick (LNG-VIE)
Thank you ! . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT-Entwickler LexisNexis Marxergasse 25, 1030 Wien mailto:patrick.sz...@lexisnexis.at Tel.: +43 (1) 534 52 - 1573 Fax: +43 (1) 534 52 - 146 -Ursprüngliche Nachricht- Von: django-users@googlegroups.com

Re: standalone server

2011-02-09 Thread Shawn Milochik
It sounds like you might be looking for Twisted instead of Django. http://twistedmatrix.com/trac/ 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-users@googlegroups.com. To unsubscribe from thi

new Admin class for each pre-filtered change list?

2011-02-09 Thread Ivo Brodien
I am using the following code, so that I can have different change lists that depend on some variable. The way the stuff member does not have to manually apply the filter each time he/she enters the list: class CourseApplicationAdminS12(CourseParticipantAdmin): year = 2012 def queryset(

Re: auth_user

2011-02-09 Thread Shawn Milochik
This is how you store additional information about users if you're using the contrib.auth User. http://docs.djangoproject.com/en/1.2/topics/auth/#storing-additional-information-about-users Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: E-commerce site

2011-02-09 Thread Fred Chevitarese
Yeah! Komodo Edit is free and is a very very good ide. In Komodo Ide you will have lot´s of features... But i think it´s expensive and Komodo Edit works very nice! ^^ ;) cya! " *O relógio da vida recebe corda apenas uma vez.* *Ninguém tem o poder de decidir quando os ponteiros pararão, se mais

admin fieldsets for different users

2011-02-09 Thread jean polo
hi I couldn't reply to this post (http://www.mail-archive.com/django- us...@googlegroups.com/msg108414.html) so I have to write a new one, sorry. is there a solution to this now ? what Profuel suggested: if not request.user.is_superuser: self.exclude.append('A') else: self.exclude.pop('A

Re: E-commerce site

2011-02-09 Thread Kenneth Gonsalves
On Wed, 2011-02-09 at 16:22 +0530, Arun K.Rajeevan wrote: > I know the place to ask satchmo related questions is there mailing > list. > But, still, Yesterday I tried installing satchmo and everything went > right, > except pictures (of products) are not showing up. actually I am not much into sa

Re: E-commerce site

2011-02-09 Thread Arun K.Rajeevan
Hi Fred, Thank you for Komodo tip. I tried wing IDE and loves it, but it's commercial, which I can't afford. I've to try Komodo edit now (which is free (the Edit version), right?) Also, tried Eric, which is too much for web development. I miss something like NetBeans for Java :) Thanks, Arun.K.R

Re: E-commerce site

2011-02-09 Thread Arun K.Rajeevan
Hi Kenneth sir, We met @ NIT Calicut. I was there with you on python workshop with Mr. Anoop. I know the place to ask satchmo related questions is there mailing list. But, still, Yesterday I tried installing satchmo and everything went right, except pictures (of products) are not showing up. I fo

Re: E-commerce site

2011-02-09 Thread Fred Chevitarese
Ops, i forgot... Here´s another e-commerce system made in Django... http://www.getlfs.com/start ;) " *O relógio da vida recebe corda apenas uma vez.* *Ninguém tem o poder de decidir quando os ponteiros pararão, se mais cedo ou se mais tarde.* *O presente é o único

Re: E-commerce site

2011-02-09 Thread Fred Chevitarese
I know. Lot of people don´t like ides, but i like it! xD And i use Komodo Edit. You can configure a lot of shortcuts to increasing your the development. I´ve made an "tutorial" to explain how to create those shortcuts... It´s in portuguese but you can use google translator. The video don´t have au

Re: Fabfile for a multi-server project

2011-02-09 Thread Tom Evans
On Wed, Feb 9, 2011 at 1:37 AM, mack the finger wrote: > I'm working on building a fabric deployment for a project with a > fairly complex environment. There will be 2+ app servers running > django code, a few database servers running in some kind of master/ > slave configuration, a rabbitmq serve

auth_user

2011-02-09 Thread Szabo, Patrick (LNG-VIE)
Hi, I'm wondering if I can just add new columns in to the auth_user table without ruining something in the model. I'd like to add data like titel. Thanks in advance. Kind regards . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT-Entwickler LexisNexis Marxergasse 25, 103

Re: Ordering/sort_by from a custom method

2011-02-09 Thread Andres Lucena
On Tue, Feb 8, 2011 at 6:00 PM, Andres Lucena wrote: > Dear Gurus, > > I've made a custom method for getting the score (from django-voting) > for a giving Model: > > class Link(models.Model): >    episode = models.ForeignKey("Episode", related_name="links") >    url = models.CharField(max_length=2

Re: standalone server

2011-02-09 Thread Cal Leeming [Simplicity Media Ltd]
Hey, Can you give some examples of what you have tried already? On Wed, Feb 9, 2011 at 6:50 AM, rahul jain wrote: > Hi Guys, > > I would like to create a standalone server using django environment which > accepts/receive inputs through socket connections. After that some > processing and then u