App engine serving static files?

2011-02-15 Thread Praveen Krishna R
*Hey Guys,* * * *Does Anyone has experience, serving static content with google app engine?* *Does it make a big difference, than serving it with nginx on the same server as django?* *I currently use a shared hosting, and was just thinking to move the static content to GAE* *I would like to know yo

Re: User Profiles?

2011-02-15 Thread william ratcliff
Thanks! On Wed, Feb 16, 2011 at 1:43 AM, Ian Clelland wrote: > > > user=User.objects.create_user(username=username,email=email,password=password) > >except django.db.utils.IntegrityError: > >print 'user exists' > >user=User.objects.get(username=username) > >user.firstname

Re: User Profiles?

2011-02-15 Thread Ian Clelland
> user=User.objects.create_user(username=username,email=email,password=password) >    except django.db.utils.IntegrityError: >        print 'user exists' >        user=User.objects.get(username=username) >    user.firstname=first_name >    user.lastname=last_name >    user.save() #make sure we have

Re: gantt charts or timeline graphics

2011-02-15 Thread Xavier Ordoquy
Hi, Doesn't reportlab already provide imaging facilities that you are looking for ? Regards, Xavier. Le 16 févr. 2011 à 00:33, refreegrata a écrit : > Hello list, I have a question. I need to generate some gantt chart or > time line image to represent every step of an element in a process. I >

Re: form select box how to (help needed)

2011-02-15 Thread Kenneth Gonsalves
On Tue, 2011-02-15 at 19:05 -0800, Bobby Roberts wrote: > I can't load it through the "CHOICES" parameter in my forms field... > how can I do this? override __init__ in your form and populate there -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/ -- Y

Re: chrome extension

2011-02-15 Thread Tony Lambropoulos
Should I assume that this was a silly question? On Mon, Feb 14, 2011 at 10:10 PM, Tony wrote: > Hi, > Is there any way to have a chrome extension with a backend in Django, > like for storing data server side and using its views? Or is this not > possible? > thanks > > -- > You received this mes

RE: Progress Bar/ProgressBarUploadHandler Documentation Examples

2011-02-15 Thread Chris Matthews
Hi Hank, I just got the book "jQuery UI 1.7" by Dan Wellman. Chapter 8 covers Progressbar. Have not worked through it yet so I can't give my view on it. Regards Chris -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of hank23 Sent:

form select box how to (help needed)

2011-02-15 Thread Bobby Roberts
I've got several select boxes in a user profile that the we can manipulate in /admin. One of these select boxes is called "locations" and has locations to which you can assign a user. for explanation, let's say that that the select box is populated like such: 1,location1 2,location2 3,location3

User Profiles?

2011-02-15 Thread William Ratcliff
In Django, the standard way to add additional information to be associated with a user is to use a user profile. To do this, I have an app called, "accounts" accounts __init__.py models.py admin.py (we'll ignore this for now, it works fine) management __init__.py

how to get attribute of intermediary model?

2011-02-15 Thread Margie Roginski
Say I am using an intermediary model like that in the doc: class Person(models.Model): name = models.CharField(max_length=128) class Group(models.Model): name = models.CharField(max_length=128) members = models.ManyToManyField(Person, through='Membership') class Membership(models.Mod

Dajaxice Unresolved Import

2011-02-15 Thread LJ
I followed the installation instructions on the dajaxice project website (http://docs.dajaxproject.com/dajaxice/installation.html). Some parts of the simple example project work great, but some parts do not work. I am getting the error: Unresolved import: dajaxice_autodiscover This is on the line

gantt charts or timeline graphics

2011-02-15 Thread refreegrata
Hello list, I have a question. I need to generate some gantt chart or time line image to represent every step of an element in a process. I already have saved the history, but I need represent this in a graphic. Somebody know some library to do something like this? The idea is build the graphic in

Re: Progress Bar/ProgressBarUploadHandler Documentation Examples

2011-02-15 Thread hank23
Are there any other good options or coding examples besides this one or is it the best and most complete? On Feb 15, 8:20 am, Derek wrote: > Fortunately, other clever coders have written up on > this:http://fairviewcomputing.com/blog/2008/10/21/ajax-upload-progress-bar... > > On Feb 14, 4:56 pm,

Re: Authentication Framework Question

2011-02-15 Thread hank23
Thanks a bunch. It looks like its all there. Thanks again!! On Feb 15, 1:59 pm, Shawn Milochik wrote: > See the 'next' stuff: > > http://docs.djangoproject.com/en/1.2/topics/auth/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

oauth & django for a private server

2011-02-15 Thread Ruben Benarroch
hi, i am developing an application for my university, they asked me for an authentication logarithm, in this case OAUTH to be the one who authenticates the web application that im developing which will show the schedule for the students and teachers, im in need of a good tutrotial for developing an

Re: Accessing the HttpRequest object from a model

2011-02-15 Thread Daniel Roseman
On Tuesday, February 15, 2011 8:05:31 PM UTC, jonas wrote: > > Thanks for your reply. But I found out about save_model(). > From there I have access to the HttpRequest object that contains my > contrib.auth.models.User model. > > But that seemed to be half the story. > > class Post(models.Model)

Re: Accessing the HttpRequest object from a model

2011-02-15 Thread Jonas Geiregat
>> > > Two ways: > > 1) Pass the form which is creating/modifying this object the current > request. It can then use the request object in the save() method to > populate the field. Eg: > > class FooForm(forms.ModelForm): > def __init__(self, *args, **kwargs): >self.request = kwargs.pop('r

Re: Authentication Framework Question

2011-02-15 Thread Shawn Milochik
See the 'next' stuff: http://docs.djangoproject.com/en/1.2/topics/auth/ -- 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, send email to django-us

Authentication Framework Question

2011-02-15 Thread hank23
I have an application and I have figured out how to always send an unauthenticated user to the login screen, no matter what screen they try to enter when they're unauthenticated. First let me say that I have not finished reading all of the documenation on the authentication framework yet, so if the

request_finished signal

2011-02-15 Thread Bzyczek
Hello, when exactly Django send request_finished signal please? If I have in cache some temporary data, is it safe to clear them by function connected to request_finished signal? (i suppose that template was rendered, view and all middleware code was executed, etc..; in short, everything which cou

Re: Django Templates: Form field name as variable?

2011-02-15 Thread Mike Ramirez
On Tuesday, February 15, 2011 01:31:07 am ju wrote: > Thank you very much for you answer > > I prefer to use validation that form class provides for me... > I do too. > I tried to use but > the other problem that I have is that I can't get errors for each > field of form :( > . > There is

really difficult issue for sorting a callable for a list_display

2011-02-15 Thread Dan Kirkland
I have two models: callrecords and callbackrequest Callrecords stores details of a customer. Callackrequest stores dates and times of when we need to call the customer back So, if a customer calls we create a record in callrecords. The callrecords admin interface also has inlines = [CallBackI

Re: ID of each request

2011-02-15 Thread Bzyczek
Thank you for your tips, I will try it. Michal On 15 ún, 18:03, "Cal Leeming [Simplicity Media Ltd]" wrote: > Well, as long as you are doing things correctly, then Python will be thread > safe and thus you can place a "global" definition in your middleware (global > grequest; grequest=request),

Re: Django User Permissions

2011-02-15 Thread David De La Harpe Golden
On 15/02/11 17:31, hank23 wrote: > So my question is what type of object is returned by user.user_permissions? First, N.B. you probably want to look at user.get_all_permissions(). user_permissions in particular doesn't represent all permissions a user "has" in the django.contrib.auth system, only

Trouble Understanding best approach for using django authentication

2011-02-15 Thread Jeremiah
I'm struggling with getting/understanding the best approach for using the authentication tools that come with Django. I'm taking the approach of writing my own form and my own view. My form displays and accepts input, but I'm not getting expected results once the "login" button is clicked. I'm s

Looking for a python / Django tutor in the Bay Area

2011-02-15 Thread spaceshuttle
I am looking for someone who can work with me on a web application that I started developing in Django, about 2 months ago. Looking for someone local to the Bay Area, ideally around Palo-Alto / Mountain View, for a weekly or bi-weekly meetings. I'm a beginner and am looking for an experienced devel

Django User Permissions

2011-02-15 Thread hank23
I'm trying to get used to working with django's user authentication framework and want to display the permissions for a user I've created. When I try to display the the permissions that I get back from user.user_permissions I had assumed that something like a list would be returned and be iterable,

Re: ID of each request

2011-02-15 Thread Cal Leeming [Simplicity Media Ltd]
Well, as long as you are doing things correctly, then Python will be thread safe and thus you can place a "global" definition in your middleware (global grequest; grequest=request), then create a function which does "global grequest; return grequest". I have used this method for quite some time, an

Re: ID of each request

2011-02-15 Thread Bzyczek
> I am not aware of anything, but you can easily make a piece of middleware > which generated a UUID then exposed this in the request object :) Yes I could, but then I must provide to all parts of my code request object. I don't know how to build something like "global variable", which will be saf

Re: ID of each request

2011-02-15 Thread Cal Leeming [Simplicity Media Ltd]
I am not aware of anything, but you can easily make a piece of middleware which generated a UUID then exposed this in the request object :) On Tue, Feb 15, 2011 at 4:41 PM, Plovarna wrote: > Hello, > is there something in core of the Django which uniquely identify each > request? (something like

ID of each request

2011-02-15 Thread Plovarna
Hello, is there something in core of the Django which uniquely identify each request? (something like variable, that is incremented on each request and I have access to value from any part of my application). Regards Michal -- You received this message because you are subscribed to the Google

Re: Accessing the HttpRequest object from a model

2011-02-15 Thread Tom Evans
On Tue, Feb 15, 2011 at 3:58 PM, Jonas Geiregat wrote: > I have a model > > from django.contrib.auth.models import User > > class Post(models.Model): >        with_some_properties = model.CharField(max_length=1) >        author  = models.ForeignKey(User) > >        def clean(self): >              

Re: images

2011-02-15 Thread webzy
Hi, Here is a How-to on this: http://docs.djangoproject.com/en/1.2/howto/static-files/ On Feb 15, 12:00 pm, "Szabo, Patrick \(LNG-VIE\)" wrote: > Hi, > > I just want an image to be shown in my header so i just added it in my > template like this: > > > > Unfortunately i only get the "alt text"

Accessing the HttpRequest object from a model

2011-02-15 Thread Jonas Geiregat
I have a model from django.contrib.auth.models import User class Post(models.Model): with_some_properties = model.CharField(max_length=1) author = models.ForeignKey(User) def clean(self): if self.author is None: self.author =

AW: list to template

2011-02-15 Thread Szabo, Patrick (LNG-VIE)
No of course it's not a joke...it really isn't I guess i just missunderstood. But still {{ buchung.0.0 }} doesn't work either . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT-Entwickler LexisNexis Marxergasse 25, 1030 Wien mailto:patrick.sz...@lexisnexis.at Tel.: +43 (1

Re: list to template

2011-02-15 Thread Tom Evans
On Tue, Feb 15, 2011 at 2:36 PM, Szabo, Patrick (LNG-VIE) wrote: > According to youre link my synthax was correct: > >    * Dictionary lookup. Example: foo["bar"] >    * Attribute lookup. Example: foo.bar >    * Method call. Example: foo.bar() >    * List-index lookup. Example: foo[bar] > > Anyway

Model Does Not Insert Record; Instead Updates Multiple Records With Date

2011-02-15 Thread octopusgrabbus
My problem is I create a model object and then save it. The data I put in the model, which is not added. Instead an update of all similar part numbers with the date occurs. I know about the override that forces an insert. Is that what I should do? Here is a sample of the data: part_num,"ept_type",

AW: list to template

2011-02-15 Thread Szabo, Patrick (LNG-VIE)
According to youre link my synthax was correct: * Dictionary lookup. Example: foo["bar"] * Attribute lookup. Example: foo.bar * Method call. Example: foo.bar() * List-index lookup. Example: foo[bar] Anyway none of those work :-( . . . . . . . . . . . . . . . . . . . . . . . . .

Re: Progress Bar/ProgressBarUploadHandler Documentation Examples

2011-02-15 Thread Derek
Fortunately, other clever coders have written up on this: http://fairviewcomputing.com/blog/2008/10/21/ajax-upload-progress-bars-jquery-django-nginx/ On Feb 14, 4:56 pm, hank23 wrote: > Are there any exampels of how to code Progress bars or the handlers > which support them somewhere in the djang

Re: Login, Password Recovery, etc

2011-02-15 Thread Derek
I am behind a firewall and have no problem downloading; maybe your company has blocked access to github? On Feb 14, 4:07 pm, Andre Terra wrote: > Is it just me or there aren't any downloads available for these projects? > I'm behind a firewall and can't really try cloning from git. > > Thanks in

Re: list to template

2011-02-15 Thread Tom Evans
On Tue, Feb 15, 2011 at 2:09 PM, Szabo, Patrick (LNG-VIE) wrote: > Hi, > > Now when i try to acces that lists with > > {{ buchung[0][0] }} > This isn't particularly well documented, best I could find is this: http://docs.djangoproject.com/en/1.2/ref/templates/api/#rendering-a-context Templates

list to template

2011-02-15 Thread Szabo, Patrick (LNG-VIE)
Sry a part of my code was wrong i use {%for buchung in result %} {{ buchung[0][0] }} {%endfor%} To acces the list... Von: Szabo, Patrick (LNG-VIE) Gesendet: Dienstag, 15. Februar 2011 15:09 An: 'django-users@googlegroups.com' Betreff: list to template Hi, What

Django + Legacy MSSQL LATIN1

2011-02-15 Thread Manuel Gonçalves - Analista de Sistemas
Hi guys, I new on the group, it,s my first post: Question 1: I have success to play django + pyodbc on debian linux to connect on MSSQL legacy database, I try django-mssql but it,s look likes play only on windows machines, Does anyone have anothes MSSQL backend to integrate django + MSSQL on de

list to template

2011-02-15 Thread Szabo, Patrick (LNG-VIE)
Hi, What i want to do is show all DB-entries of a certain user. These entries include foreign keys and i need to get the related objects too and print them in a template So what i do is this: First i get all the objects that i need. buchungen = Buchung.objects.filter(Mitarbeiter

Re: Google App Engine supports Django 1.2!

2011-02-15 Thread strap
Hi, you can start here: http://code.google.com/appengine/articles/django-nonrel.html http://code.google.com/appengine/articles/appengine_helper_for_django.html http://www.allbuttonspressed.com/blog/django hth, Cheers Strap On Feb 14, 7:15 pm, Gath wrote: > Please give me a pointer/link to a tuto

Re: Django + WebDAV

2011-02-15 Thread Thomas Weholt
Please post any findings on this subject or information about any projects you might start to solve/provide this to this group. This is very interesting. :-) I`ve made a ftpserver which authenticates logins using django user management, but a webdavserver would be even nicer. Thomas On Tue, Feb 1

chrome extension

2011-02-15 Thread Tony
Hi, Is there any way to have a chrome extension with a backend in Django, like for storing data server side and using its views? Or is this not possible? thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t

Django + WebDAV

2011-02-15 Thread Michael A. Ryan
Hello Django Users I'm looking for people who have experience interfacing Django with WebDAV protocol, or using Django as a basis for authentication to a WebDAV server. I'm interested in at least comparing notes but potentially interested in maybe co-authoring an open source module for WebDAV.

AW: AW: images

2011-02-15 Thread Szabo, Patrick (LNG-VIE)
Now it works...Thanks a lot everybody ! . . . . . . . . . . . . . . . . . . . . . . . . . . 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 -- You received this message because yo

Re: AW: images

2011-02-15 Thread Kenneth Gonsalves
On Tue, 2011-02-15 at 11:07 +0100, Szabo, Patrick (LNG-VIE) wrote: > How do i check the logs !? > I'm using the integrated webserver. you are running it from the console - it will give error messages like 404 with a path -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugc

Re: AW: AW: Form to add data

2011-02-15 Thread Daniel Roseman
On Monday, February 14, 2011 1:59:08 PM UTC, Szabo, Patrick (LNG-VIE) wrote: > > > Now i did exclude certain fields in my form because i have to set them > automaticaly. > Eg. I have a field that's called Mitarbeiter. I want to set the field to > the current user id so i've tried this: > > def

Re: images

2011-02-15 Thread Piotr Zalewa
Learn how to serve static files For the Django 1.3+ http://docs.djangoproject.com/en/dev/howto/static-files/ For Django 1.2 http://docs.djangoproject.com/en/1.2/howto/static-files/ Good luck zalun On 02/15/11 10:00, Szabo, Patrick (LNG-VIE) wrote: > Hi, > > I just want an image to be shown in m

Re: images

2011-02-15 Thread Ian McDowall
On Feb 15, 10:16 am, Praveen Krishna R wrote: > *plz Check django official docs to find out how static files are served on > production and development server.* > * > * > *in the dev server include a similiar snippet into your projects > urls.py, urlpatterns:* > * > * > *(r'^site_media/(?P.*)$',

Re: images

2011-02-15 Thread Praveen Krishna R
*plz Check django official docs to find out how static files are served on production and development server.* * * *in the dev server include a similiar snippet into your projects urls.py, urlpatterns:* * * *(r'^site_media/(?P.*)$', 'django.views.static.serve',{'document_root': 'D:/djangoprojects/p

Re: Django Mutlisite Setup

2011-02-15 Thread Cal Leeming [Simplicity Media Ltd]
Might also want to try django multihost :) On Tue, Feb 15, 2011 at 9:58 AM, Aryeh Leib Taurog wrote: > On Feb 14, 5:08 am, Jason Drane wrote: > > Forgive me if this question offends you more advanced users. I am > > begun down the road of learning Django. I am curious if it is possible > > to p

AW: images

2011-02-15 Thread Szabo, Patrick (LNG-VIE)
How do i check the logs !? I'm using the integrated webserver. Kind regards . . . . . . . . . . . . . . . . . . . . . . . . . . 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 -

Re: images

2011-02-15 Thread Kenneth Gonsalves
On Tue, 2011-02-15 at 11:00 +0100, Szabo, Patrick (LNG-VIE) wrote: > Unfortunately i only get the "alt text" shown and not the image. > The image is in the same directory as the template. check your logs to see where it is searching for your image -- regards KG http://lawgon.livejournal.com Coi

images

2011-02-15 Thread Szabo, Patrick (LNG-VIE)
Hi, I just want an image to be shown in my header so i just added it in my template like this: Unfortunately i only get the "alt text" shown and not the image. The image is in the same directory as the template. Why doesn't this work ?! Kind regards . . . . . . . . . . . . . . . . . . . .

RE: Saving multiple records from admin list page

2011-02-15 Thread Chris Matthews
Hi Sithembewena, If you want to monitor changes to tables then you might also be interested in keeping audit/history records. See the book ProJango by Marty Alchin Chapter 11 (page 263 onwards) and http://qr7.com/2010/10/django-simple-history-ftw/ by Corey Bertram Regards Chris From: django-

Re: Django Mutlisite Setup

2011-02-15 Thread Aryeh Leib Taurog
On Feb 14, 5:08 am, Jason Drane wrote: > Forgive me if this question  offends you more advanced users. I am > begun down the road of learning Django. I am curious if it is possible > to place Django in the root of my server and reference it to each of > multiple sites in development, similar to ph

Re: Saving multiple records from admin list page

2011-02-15 Thread Sithembewena Lloyd Dube
Courtesy of Django docs, by the way: http://docs.djangoproject.com/en/1.2/ref/contrib/admin/actions/ On Tue, Feb 15, 2011 at 11:47 AM, Sithembewena Lloyd Dube wrote: > Solution found: I simply added a function call to the mailing function in > each action definition in admin.py as follows: > >

Re: Saving multiple records from admin list page

2011-02-15 Thread Sithembewena Lloyd Dube
Solution found: I simply added a function call to the mailing function in each action definition in admin.py as follows: actions = ['staking_approved', 'staking_in_process', 'staking_rejected', 'staking_review_later'] def save_model(self, request, obj, form, change): staking_r

Re: AW: AW: Form to add data

2011-02-15 Thread Benedict Verheyen
> def main(request): > f = BuchungForm(request.POST) > buchung = f.save(commit=False) > buchung.Mitarbeiter = 'request.user.id' > buchung.save() > return render_to_response('main/index.html', {'user' : request.user, > 'form' : f}) > > but this gives me the following erro

Re: Django Templates: Form field name as variable?

2011-02-15 Thread ju
Thank you very much for you answer I prefer to use validation that form class provides for me... I tried to use but the other problem that I have is that I can't get errors for each field of form :( There is another solution that I decide to use: http://stackoverflow.com/questions/4993625/djang

Re: Django API efficient enough for filtering tens of millions of records?

2011-02-15 Thread Thomas Weholt
FYI: release version 0.5.0 of DSE yesterday. Source is available at https://bitbucket.org/weholt/dse and pypi. Regards, Thomas Weholt On Tue, Feb 15, 2011 at 10:10 AM, Sithembewena Lloyd Dube wrote: > Hi Everyone, > > Coming back weeks later, to say thank you for your contributions. I got > quit

Saving multiple records from admin list page

2011-02-15 Thread Sithembewena Lloyd Dube
Hi all, In my admin.py, I overrode the save() function of a model as follows: from myproject.myapp.functions import send_staking_request_status_notification_email def save_model(self, request, obj, form, change): staking_request = obj obj.save() send_staking_request

Re: Django API efficient enough for filtering tens of millions of records?

2011-02-15 Thread Sithembewena Lloyd Dube
Hi Everyone, Coming back weeks later, to say thank you for your contributions. I got quite sidetracked from this task, but I should report back on this soon. Thank you! On Wed, Jan 19, 2011 at 10:05 AM, Thomas Weholt wrote: > Bulk inserts are the way the go if you can. When inserting a bunch of

AW: Having trouble synchronizing the database, can someone help?

2011-02-15 Thread Szabo, Patrick (LNG-VIE)
I think i rember reading in the doc that you can somehow run custom sql...is that an option ?! If this is something you don’t have to do regularly you could also just connect to the db with some gui-client and delete the tables there Von: django-users@googlegroups.com [mailto:django-users

Re: Having trouble synchronizing the database, can someone help?

2011-02-15 Thread Xavier Ordoquy
flush will only flush the data from the base. It doesn't modify the table structure as far as I remember. You can have a look at the thread "Model Codng/Model Usage Pitfall?" which was on the same topic yesteday. Regards, Xavier. Le 15 févr. 2011 à 09:01, Chen Xu a écrit : > thanks, flush does

Re: Having trouble synchronizing the database, can someone help?

2011-02-15 Thread Chen Xu
thanks, flush does help, but it delete everything, however I have 2 apps in my db, so is there any commands (ex: sqlclear ) that allows me to only remove the tables in particular app?? Thanks On Mon, Feb 14, 2011 at 11:51 PM, Szabo, Patrick (LNG-VIE) < patrick.sz...@lexisnexis.at> wrote: > I th