Re: Date and Times

2009-02-18 Thread ReneMarxis
Ok got this fixed. The problem comes if you enter invalid data. return dateformat.format(value, self.format) would throw an exception and the form would render to "" class DateFormattedTextInput(FormattedTextInput): "Renders formatted date." def __init__(self, format=None, attrs=None):

Re: Date and Times

2009-02-18 Thread ReneMarxis
Would you say i am right? I would past this on http://code.djangoproject.com/ticket/3672 where i got the original code from --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Date and Times

2009-02-18 Thread ReneMarxis
> That was a whole 19 hours before you posted this! It's not as if it's > been a week with no answer. For a question like this, where even > understanding the problem requires wading through 40 lines of code, it > might well take a while before somebody has time and motivation to get > there. > >

Re: Customizing Admin for Large Data Sets

2009-02-18 Thread James Mowery
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#list-per-page Set the above to the number of items you would like to appear per page. The default is 100, so set it it to something more manageable. http://docs.djangoproject.com/en/dev/ref/contrib/admin/#ordering Set that to a DateField or

WYSIWYG Image upload challenge

2009-02-18 Thread phoebebright
I have now spend 5 solid days trying to get any WYSIWYG editor with an image upload working in django with no success. Current status: YUI - works in Firefox/Mac not in IE. The image upload is happening but the response is being interpretted by IE as a download so control does not return to

Re: WYSIWYG Image upload challenge

2009-02-18 Thread Lee Braiden
2009/2/18 phoebebright : > > I have now spend 5 solid days trying to get any WYSIWYG editor with an > image upload working in django with no success. Current status: > This must be solveable!!! > > Any suggestions very welcome at this stage. I suggest an image

POST Method problem with profile

2009-02-18 Thread Praveen
urls.py --- url(r'^accounts/profile/$', create_profile, { 'profile_callback': UserProfile.objects.create },name='profiles_create_profile'), url(r'^accounts/editprofile/$', edit_profile, name='profiles_edit_profile'), url(r'^accounts/viewprofile/(?P\w+)/$', profile_detail,

Re: WYSIWYG Image upload challenge

2009-02-18 Thread phoebebright
Lee, They are using this part of the app as a CMS so need to be able to put multiple images in the text. Given the way apps such as Joomla and other CMSs work, this is a not unreasonable expectation. Got hold of a PC and solved one of the problems with filebrowser - the curse of the trailing ,

Re: Date Formating

2009-02-18 Thread ReneMarxis
Solved Please see http://groups.google.com/group/django-users/browse_thread/thread/4f19a5e0c9719f53/3ff236709a6d6578#3ff236709a6d6578 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Struggling to update a reverse foreign key lookup

2009-02-18 Thread Alfonso
Probably my very poor python coding rather than Django but I have the model below set up to update another table (reverse foreign key relationship I guess you would call it) class PriceOverride(models.Model): """ Product Price Override """ date_override = models.DateField() product_id =

Any way to show progress during a short process job?

2009-02-18 Thread Adam Stein
Maybe somebody can suggest how to get the functionality I'm trying to duplicate. I looked and can't find anything that seemed similiar. I have a form with checkboxes. User selects one or more and submits the form. The processing currently goes like this: 1) Write JavaScript to display moving

Re: Date and Times

2009-02-18 Thread koenb
H René, This is what I use on all my forms (I use my own modelform subclass to insert these for date fields, but that is not relevant): as formfield: class DateFormField(forms.DateField): def __init__(self, input_formats=None, *args, **kwargs): super(DateFormField,

markdown fails, can't figure out how or why

2009-02-18 Thread felix
I'm getting a failure on my deployed server and I can't figure out what might cause it. I've gotten it a few times. something to do with markdown going to the URL myself (its fetching the RSS feed) doesn't trigger the error ! from the stack trace I have no way of knowing what went in can

Saving referential objects

2009-02-18 Thread django...@gmail.com
Hello! I've got 3 objects, which have foreign keys pointing to each other. My Wrapper class also contains a generic foreign key to my resource class. Is there a 'clean' way to create all 3 of the models at once? Or do I have to allow the foreign keys to be null, and then go back and change them

Extract values from form fields in templates

2009-02-18 Thread koranthala
Hi, I am unable to extract values from form fields inside templates. For example: I have mutiple text fields in which one field says whether the second field is X or not and the second field containing the actual data. (These are initial values which I send from server to client)

Re: Date and Times

2009-02-18 Thread ReneMarxis
thanks koenb i'll try that this evening. --~--~-~--~~~---~--~~ 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

Re: HttpResponse post

2009-02-18 Thread Miguel
well, I am not a python programmer and maybe I am doing silly things or this is not as complex as I see but I not able to do what you mention above. I get the error, 'NoneType' object has no attribute 'read' I have tried to follow http://code.activestate.com/recipes/146306/, with only fields

Was there a recent change in the intial_data-loading code?

2009-02-18 Thread Jim
Hello, I had a running app, but yesterday started getting errors that Django wants to find intial_data. Was there a change in the way this works that I could use to adjust what I do? I have to admit to being stuck about where to start and I would be very grateful for any hints. It happens

Re: Customizing Admin to display non-editable fields

2009-02-18 Thread mermer
Thanks, that works very well - but as you mentioned is certainly not intuitive. Can you use a similar technique to prepopulate fields? My use case is this:- I want to display an INLINE formset. Though records which already exist I want to display but make certain fields uneditable Using the

django 0.97 and image thumbnails

2009-02-18 Thread Bobby Roberts
hi all. I've got a model with the following line: Pic1 = models.ImageField(upload_to='/auctionimages',blank=True) is it possible to easily create a thumbnail in django 0.97 on python2.5. If not, can someone show me how? --~--~-~--~~~---~--~~ You received

Re: Was there a recent change in the intial_data-loading code?

2009-02-18 Thread Karen Tracey
On Wed, Feb 18, 2009 at 9:13 AM, Jim wrote: [snip] > > > Snip of output: > > : > Running post-sync handlers for application pkgs > Running post-sync handlers for application tinymce > Running

Re: Was there a recent change in the intial_data-loading code?

2009-02-18 Thread Jim
I apologize; someone straightened me out in a private email that there was an error in my setup. Jim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: WYSIWYG Image upload challenge

2009-02-18 Thread Almost George
On Feb 18, 5:36 am, phoebebright wrote: > There is something different about the way django is handling to response to > php I think. I use the YUI Rich Editor in admin, and have no problems. I know debugging isn't as easy in IE as others, but do your best to find

Re: django 0.97 and image thumbnails

2009-02-18 Thread Alex Gaynor
On Wed, Feb 18, 2009 at 9:20 AM, Bobby Roberts wrote: > > hi all. > > I've got a model with the following line: > >Pic1 = models.ImageField(upload_to='/auctionimages',blank=True) > > > is it possible to easily create a thumbnail in django 0.97 on > python2.5. If not,

Re: WYSIWYG Image upload challenge

2009-02-18 Thread Brandon Taylor
FWIW, I have been able to successfully integrate Django Admin Uploads http://code.google.com/p/django-admin-uploads/ with jQuery. I'm not certain as to how difficult this would be to port to YUI. There are a couple of JS issues that I've had to fix with this, but otherwise, it works very well.

Add value to request header?

2009-02-18 Thread Brandon Taylor
Hi everyone, I know how to modify a response header value, but not a request header value. I need to integrate with an external system that is injecting a value in the request header that I need to check for. Is it possible to mock this behavior in Django? I'm not very familiar with how these

Dhango help

2009-02-18 Thread s.sudharsan siva
Hii am new to Django we are planning to show a demo on Django on FOss conf09.. can any one help with how to start with Django and what to demo -- With Regards S.Sudharsan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Getting Django to generate a report automatically on a assigned date?

2009-02-18 Thread Alfonso
Hi, I have a client who wants to generate an invoice statment automatically on the first of every month. I'm trying to work out how I might do that in Django. I have a simple statement model and a simple invoice model and all I want to do is on 1st of calendar Month update the statement model

Re: Dhango help

2009-02-18 Thread djandrow
The documents have a first steps section and other sections may inspire you as well http://docs.djangoproject.com/en/dev/ hope that helps Andrew On Feb 18, 3:19 pm, "s.sudharsan siva" wrote: > Hii am new to Django we are planning to show a demo on Django on FOss >

Python Versions and manage.py

2009-02-18 Thread djandrow
Hello, I have python 2.5 and 2.6 installed on my computer and when i try to run manage.py sqlall I get an error: raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e) django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: Module use of python25.dll conflicts

Re: Getting Django to generate a report automatically on a assigned date?

2009-02-18 Thread Alex Gaynor
On Wed, Feb 18, 2009 at 10:36 AM, Alfonso wrote: > > Hi, > > I have a client who wants to generate an invoice statment > automatically on the first of every month. I'm trying to work out how > I might do that in Django. I have a simple statement model and a > simple

Re: Python Versions and manage.py

2009-02-18 Thread Alex Gaynor
On Wed, Feb 18, 2009 at 10:44 AM, djandrow wrote: > > Hello, > > I have python 2.5 and 2.6 installed on my computer and when i try to > run manage.py sqlall I get an error: > > raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e) >

Re: Getting Django to generate a report automatically on a assigned date?

2009-02-18 Thread GRoby
Alfonso, One way would be to create a View that performs all of the Report Generating Tasks. You could then use cron (or another task scheduler) to run a command line browser that runs that view (using wget for example). So basically you would have a @monthly entry in cron that runs something

Django CMS and Tiny_mce - ERROR 'module' object has no attribute 'JS_URL'

2009-02-18 Thread zegerman
Hello, Im tryin to get Tiny_mce running with Django CMS. I installed Django CMS and its running fine. After that I setup django_tinymce and followed these steps: http://django-tinymce.googlecode.com/svn/tags/release-1.5/docs/.build/html/installation.html#id1 Thats my tiny_mce configuration in

Re: Getting Django to generate a report automatically on a assigned date?

2009-02-18 Thread martín arrieta
Hello.. it is very easy to make one standalone script with django.. Check this post: http://www.b-list.org/weblog/2007/sep/22/standalone-django-scripts/ Martin. 2009/2/18 GRoby > > Alfonso, > > One way would be to create a View that performs all of the Report >

Simply adding GROUP BY to a QuerySet

2009-02-18 Thread Deniz Dogan
Hi I'm having trouble understanding the new aggregation support in Django 1.1, and here is what I want to do: Let's say I have a model called Bike with a DateField called "production_date". Now I want to get all of the Bikes and group them by their production date. How would I do this in

Re: Extract values from form fields in templates

2009-02-18 Thread Kevin Audleman
Passing both the form and the object is the solution I use. It may not be completely DRY, but I can't see how it's bad. You need access to the data in an object so you pass the object. Much more sensible than trying to extract those values from a more complicated data structure. Kevin On Feb

Struggling with annotations / aggregations

2009-02-18 Thread Stefan Tunsch
Hi there! I'm trying to see what's the best approach in my scenario. The problem is how to make a list display different sums and calculations based on it's child objects. My scenario could be the following: Two models: Project and Task One Project has many Task. Task has a boolean "open"

Re: Getting Django to generate a report automatically on a assigned date?

2009-02-18 Thread Stefan Tunsch
Create a scheduled task /cron job that does what you want. This will get you started: from django.core.management import setup_environ import settings # If your script file is in the same directory as the settings.py file setup_environ(settings) After that, import your models as usual and

Re: Python Versions and manage.py

2009-02-18 Thread djandrow
I've had some success by specifying the path manually python "C:\ProgLangs\Python25\Lib\site-packages\django\conf \project_template\manage.py" sqlall I'm still getting an error but i'm 90% sure its unrelated. Thanks, Andrew On Feb 18, 4:00 pm, Alex Gaynor wrote: > On

Formsets issue

2009-02-18 Thread Thomas Hill
Hey all, Been trying to display multiple form rows for a project lately, and I just wanted to confirm that I'm doing this right. I found a solution on http://www.pointy-stick.com/blog/2009/01/23/advanced-formset-usage-django/ , and I took what I needed from it (my code below), but I found

OT: hide directory listing on server

2009-02-18 Thread PeteDK
Hi. I know this is not really Django related, but this is one of the best forums out there so i hope you can help me :-) The thing is, i have a django website. The media files are handled by the apache server instead of django, which works great. However when i go to

Re: Simply adding GROUP BY to a QuerySet

2009-02-18 Thread Jacob Kaplan-Moss
On Wed, Feb 18, 2009 at 11:12 AM, Deniz Dogan wrote: > Let's say I have a model called Bike with a DateField called > "production_date". Now I want to get all of the Bikes and group them > by their production date. How would I do this in Django? I can't seem > to

Re: Python Versions and manage.py

2009-02-18 Thread Ramiro Morales
On Wed, Feb 18, 2009 at 3:50 PM, djandrow wrote: > > I've had some success by specifying the path manually > > python "C:\ProgLangs\Python25\Lib\site-packages\django\conf > \project_template\manage.py" sqlall If you are using manage.py then the most common scenario is

Re: OT: hide directory listing on server

2009-02-18 Thread Ramiro Morales
On Wed, Feb 18, 2009 at 4:08 PM, PeteDK wrote: > > Hi. I know this is not really Django related, but this is one of the > best forums out there so i hope you can help me :-) > > The thing is, i have a django website. > > The media files are handled by the apache server

Re: OT: hide directory listing on server

2009-02-18 Thread Jirka Vejrazka
> However when i go to .com/media/profile_pics/ i get a directory > listing of all the folders in this directory. > > Can i disable this?? so its not possible to "browse" all the profile > pics, without knowing the exact path of a given file. Hi Peter, read the Summary section of

Re: Simply adding GROUP BY to a QuerySet

2009-02-18 Thread Deniz Dogan
On 18 Feb, 19:08, Jacob Kaplan-Moss wrote: > On Wed, Feb 18, 2009 at 11:12 AM, Deniz Dogan > wrote: > > Let's say I have a model called Bike with a DateField called > > "production_date". Now I want to get all of the Bikes and group them >

Re: OT: hide directory listing on server

2009-02-18 Thread PeteDK
On 18 Feb., 19:14, Ramiro Morales wrote: > On Wed, Feb 18, 2009 at 4:08 PM, PeteDK wrote: > > > Hi. I know this is not really Django related, but this is one of the > > best forums out there so i hope you can help me :-) > > > The thing is, i have a

Re: Simply adding GROUP BY to a QuerySet

2009-02-18 Thread Deniz Dogan
> { 'production_date' : 2008-01-02, >   'bikes' : [Bike 1, Bike 2], >   'production_date' : 2008-02-09, >   'bikes : [Bike 7, Bike 4] > > } I'm sorry about that, I meant something like this: { 2008-01-02 : [Bike 1, Bike 2], 2008-02-09 : [Bike 7, Bike 4] } I guess I didn't quite think that

Re: Formsets issue

2009-02-18 Thread Brian Rosner
On Feb 18, 2009, at 10:16 AM, Thomas Hill wrote: > #VIEW > @login_required > def manage_roles(request, resource_id): > resource = get_object_or_404(Lock, pk=resource_id) > if(request.method == "POST"): > formset = create_roles_formset(resource, request.POST) > if

Re: Simply adding GROUP BY to a QuerySet

2009-02-18 Thread Jacob Kaplan-Moss
On Wed, Feb 18, 2009 at 12:24 PM, Deniz Dogan wrote: > I'm sorry about that, I meant something like this: > > { 2008-01-02 : [Bike 1, Bike 2], > 2008-02-09 : [Bike 7, Bike 4] } Well, you can't do this with the aggregation API because you can't do that is SQL.

Re: Formsets issue

2009-02-18 Thread Thomas Hill
Ah, yes, indeed. Will definately do that, thanks. Regarding the formset classes and form classes with their try/except lines, however, does that look "right"? On Wed, Feb 18, 2009 at 10:31 AM, Brian Rosner wrote: > > > On Feb 18, 2009, at 10:16 AM, Thomas Hill wrote: > > >

Re: Extract values from form fields in templates

2009-02-18 Thread Karen Tracey
On Wed, Feb 18, 2009 at 8:52 AM, koranthala wrote: > > Hi, >I am unable to extract values from form fields inside templates. >For example: > I have mutiple text fields in which one field says whether the > second field is X or not and the second field

Re: Simply adding GROUP BY to a QuerySet

2009-02-18 Thread Deniz Dogan
On 18 Feb, 19:33, Jacob Kaplan-Moss wrote: > On Wed, Feb 18, 2009 at 12:24 PM, Deniz Dogan > wrote: > > I'm sorry about that, I meant something like this: > > > { 2008-01-02 : [Bike 1, Bike 2], > >  2008-02-09 : [Bike 7, Bike 4] } > >

Re: Formsets issue

2009-02-18 Thread Brian Rosner
On Feb 18, 2009, at 11:33 AM, Thomas Hill wrote: > Ah, yes, indeed. Will definately do that, thanks. Regarding the > formset classes and form classes with their try/except lines, > however, does that look "right"? Ah ok. I must have completely overlooked that. You seem to be solving

sql query for manytomany table

2009-02-18 Thread May
I need to get the institution name through an intermediary table (two foreign keys) to display in a template. The code is here: http://dpaste.com/122204/ Thank you anyone, May --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Formsets issue

2009-02-18 Thread Thomas Hill
Brilliant, thank you! I'll take care of this later tonight. Thanks again, Brian. On Wed, Feb 18, 2009 at 10:40 AM, Brian Rosner wrote: > > > On Feb 18, 2009, at 11:33 AM, Thomas Hill wrote: > > > Ah, yes, indeed. Will definately do that, thanks. Regarding the > > formset

Authentication with LDAP

2009-02-18 Thread João Olavo Baião de Vasconcelos
Hi all, I'd like to login in Admin site and authenticate with LDAP. Is there a "most used LDAP authentication backend"? I found the backend ldapauth.py [1], that seems to be the one. Is this the best solution? I see that in [2] that are many patches. Is the file in [1] updated, or do I have to

Re: WYSIWYG Image upload challenge

2009-02-18 Thread phoebebright
The javascript makes a call to this view on submitting the form that uploads the image. def uploadimage(request): try: upload_full_path = settings.CONTENT_IMAGES upload = request.FILES['image'] dest = open(os.path.join(upload_full_path,

Re: WYSIWYG Image upload challenge

2009-02-18 Thread phoebebright
That certainly looks like another option! Thanks. On Feb 18, 3:00 pm, Brandon Taylor wrote: > FWIW, I have been able to successfully integrate Django Admin > Uploadshttp://code.google.com/p/django-admin-uploads/with jQuery. I'm not > certain as to how difficult this

Re: Django CMS and Tiny_mce - ERROR 'module' object has no attribute 'JS_URL'

2009-02-18 Thread Phoebe Bright
My experience with setting up tinymce was that there were plenty of plenty of opportunities for getting the paths wrong! To avoid problems I put a dynamic link (ln -s) into the django admin media folder so it could use the defaults. Hope that helps. Phoebe. 2009/2/18 zegerman

Re: Python Versions and manage.py

2009-02-18 Thread Karen Tracey
On Wed, Feb 18, 2009 at 10:44 AM, djandrow wrote: > > Hello, > > I have python 2.5 and 2.6 installed on my computer and when i try to > run manage.py sqlall I get an error: > > raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e) >

apache authentication

2009-02-18 Thread Jlcarroll
I am creating a private genealogy web page of pictures/obituaries/data files/census records etc... all just a set of files within a directory structure. I just want Apache to index the directory's contents and the files within them and serve them over the web. That works fine. Then I wanted to

Weird error on Foreign key save?

2009-02-18 Thread Alfonso
I've got an invoice model that foreign key's to a customer model, when the invoice is saved I'm update a few fields in that related customer model to make other code in my setup work. I keep getting "unsupported operand type(s) for ** or pow(): 'Decimal' and 'NoneType'" whenever I try to save

Re: Dhango help

2009-02-18 Thread garagefan
i'm just kinda wondering how you're going to be showing a demo of django when you don't know anything about it, nor how to set it up. On Feb 18, 10:19 am, "s.sudharsan siva" wrote: > Hii am new to Django we are planning to show a demo on Django on FOss > conf09.. can

Re: sql query for manytomany table

2009-02-18 Thread Karen Tracey
On Wed, Feb 18, 2009 at 1:43 PM, May wrote: > > I need to get the institution name through an intermediary table (two > foreign keys) to display in a template. > > The code is here: > > http://dpaste.com/122204/ > > Thank you anyone, > (Your subject line says manytomany but

can template var be passed into template tag?

2009-02-18 Thread Margie
Is there a way to pass a template variable into a custom template tag? For example, say that my template is rendered like this, so that books is in the context: books = books.objects.all() return render_to_response(template.html, { "books":books } context_instance=RequestContext(request)

Re: Weird error on Foreign key save?

2009-02-18 Thread Karen Tracey
On Wed, Feb 18, 2009 at 2:30 PM, Alfonso wrote: > > I've got an invoice model that foreign key's to a customer model, when > the invoice is saved I'm update a few fields in that related customer > model to make other code in my setup work. I keep getting > "unsupported

Re: sql query for manytomany table

2009-02-18 Thread May
Hello Karen, Here are my views and models: http://dpaste.com/122204/ http://dpaste.com/14/ The manytomany table is actually a tertiary table. I was just trying to use django terms, so people would understand what type of table. Thanks for your help! May On Feb 18, 11:33 am, Karen

Re: sql query for manytomany table

2009-02-18 Thread May
The complete view is here: http://dpaste.com/17/ On Feb 18, 11:46 am, May wrote: > Hello Karen, > > Here are my views and models: > > http://dpaste.com/122204/ > > http://dpaste.com/14/ > > The manytomany table is actually a tertiary table.  I was just trying > to

Re: can template var be passed into template tag?

2009-02-18 Thread Karen Tracey
On Wed, Feb 18, 2009 at 2:35 PM, Margie wrote: > > Is there a way to pass a template variable into a custom template > tag? Certainly. Please read: http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#passing-template-variables-to-the-tag Karen

Re: sql query for manytomany table

2009-02-18 Thread Angel Cruz
this off topic, but i am saving these postings in my gmail. The problem with putting your code in dpaste is that in 29 days, that link is invalid, and when I look upon this thread in the future, I will have no idea what your source looks like and what the possible solutions are. dpaste looks

Re: sql query for manytomany table

2009-02-18 Thread Karen Tracey
On Wed, Feb 18, 2009 at 2:46 PM, May wrote: > > Hello Karen, > > Here are my views and models: > > http://dpaste.com/122204/ > > http://dpaste.com/14/ > > > The manytomany table is actually a tertiary table. I was just trying > to use django terms, so people would

django-sphinx Passages Help

2009-02-18 Thread Worldreptiles
I asked this question on the django-sphinx group a few days ago but so far havent recievied any replies so i thought i would ask here. I'm trying to use the passages function "BuildExcerpts" feature of sphinx and have been unable to get it to work. Im not new to sphinx but i am to django. So if

Re: django and database views

2009-02-18 Thread will0
On Jan 6, 12:47 am, drakkan wrote: > On 6 Gen, 00:41, drakkan wrote: > > Suppose I want to delete an user. This user is in table1 and so in > databaseview too. Django default is to do adeletecascade so it tries > to remove the user from table1,

Re: sql query for manytomany table

2009-02-18 Thread May
Hello Karen, Yes, I seem confused here. I've been trying everything. The key is that this query works correctly in the postgres database to retrieve the institutionname (institution), using the contact id retrieved from Project: select DISTINCT Institution.institution from Contactintermed,

Re: sql query for manytomany table

2009-02-18 Thread May
Hello Angel, Previously, when I placed code into the message, I was reprimanded by users for taking up message space and to use dpaste. However, I agree with you, the code is necessary for future reference. Since, you also seem to agree, I will henceforth place the code into the message.

Re: WYSIWYG Image upload challenge

2009-02-18 Thread Colin Bean
On Wed, Feb 18, 2009 at 10:50 AM, phoebebright wrote: > > The javascript makes a call to this view on submitting the form that > uploads the image. > > def uploadimage(request): >try: >upload_full_path = settings.CONTENT_IMAGES > >

My app is missing!

2009-02-18 Thread djandrow
Hello all, I've been trying to add a few extra fields to my model, as part of my blog app. So then I tried sqlall: python "C:\ProgLangs\Python25\Lib\site-packages\django\conf \project_template\manage.py" sqlall blog theres another thread about why i've included the path, but i don't see why it

Re: My app is missing!

2009-02-18 Thread Malinka Rellikwodahs
my first gues would be you are not in the akonline folder On Wed, Feb 18, 2009 at 15:54, djandrow wrote: > > Hello all, > > I've been trying to add a few extra fields to my model, as part of my > blog app. So then I tried sqlall: > > python

Re: sql query for manytomany table

2009-02-18 Thread Karen Tracey
On Wed, Feb 18, 2009 at 3:13 PM, May wrote: > > Hello Karen, > > Yes, I seem confused here. I've been trying everything. The key is > that this query works correctly in the postgres database to retrieve > the institutionname (institution), using the contact id retrieved

Re: My app is missing!

2009-02-18 Thread djandrow
I am: C:\Program Files\Apache2.2\akonline>python "C:\ProgLangs\Python25\Lib \site-packa ges\django\conf\project_template\manage.py" sqlall blog Error: App with label blog could not be found. Are you sure your INSTALLED_APPS setting is correct? On Feb 18, 9:00 pm, Malinka Rellikwodahs

Re: sql query for manytomany table

2009-02-18 Thread Karen Tracey
Regarding whether to dpaste or not: Ideally, there is a happy medium were the bulk of a problem is described in email and dpaste (or simliar) is used for full specifics of the code, if necessary, to get help. Usually when the line (or section) of code that is causing the problem is identified, it

Re: sql query for manytomany table

2009-02-18 Thread May
Hello Karen, What I need then is to rewrite the model statement. I imported the tables from MySQL, so the table structures were already set. Should I add a manytomany field in the contact table? I'm concerned about django creating a new separate table from the intermed table I already have.

Re: can template var be passed into template tag?

2009-02-18 Thread Margie
Thanks Karen. Don't know how I missed that. On Feb 18, 11:49 am, Karen Tracey wrote: > On Wed, Feb 18, 2009 at 2:35 PM, Margie wrote: > > > Is there a way to pass a template variable into a custom template > > tag? > > Certainly.  Please read: >

Re: sql query for manytomany table

2009-02-18 Thread Karen Tracey
On Wed, Feb 18, 2009 at 4:14 PM, May wrote: > > Hello Karen, > > What I need then is to rewrite the model statement. I imported the > tables from MySQL, so the table structures were already set. Should I > add a manytomany field in the contact table? I'm concerned about >

Re: Authentication with LDAP

2009-02-18 Thread Antoni Aloy
2009/2/18 João Olavo Baião de Vasconcelos : > Hi all, > > I'd like to login in Admin site and authenticate with LDAP. Is there a "most > used LDAP authentication backend"? > I found the backend ldapauth.py [1], that seems to be the one. Is this the > best solution? > > I see

Re: Any way to show progress during a short process job?

2009-02-18 Thread Malcolm Tredinnick
On Wed, 2009-02-18 at 12:20 +, Adam Stein wrote: > Maybe somebody can suggest how to get the functionality I'm trying to > duplicate. I looked and can't find anything that seemed similiar. > > I have a form with checkboxes. User selects one or more and submits the > form. The processing

Re: Customizing Admin to display non-editable fields

2009-02-18 Thread Malcolm Tredinnick
On Wed, 2009-02-18 at 06:15 -0800, mermer wrote: > Thanks, that works very well - but as you mentioned is certainly not > intuitive. > > Can you use a similar technique to prepopulate fields? My use case is > this:- > > I want to display an INLINE formset. Though records which already >

Re: Add value to request header?

2009-02-18 Thread Malcolm Tredinnick
On Wed, 2009-02-18 at 07:16 -0800, Brandon Taylor wrote: > Hi everyone, > > I know how to modify a response header value, but not a request header > value. I need to integrate with an external system that is injecting a > value in the request header that I need to check for. > > Is it possible

Re: Simply adding GROUP BY to a QuerySet

2009-02-18 Thread Malcolm Tredinnick
On Wed, 2009-02-18 at 09:12 -0800, Deniz Dogan wrote: > Hi > > I'm having trouble understanding the new aggregation support in Django > 1.1, and here is what I want to do: > > Let's say I have a model called Bike with a DateField called > "production_date". Now I want to get all of the Bikes

Re: Formsets issue

2009-02-18 Thread Malcolm Tredinnick
On Wed, 2009-02-18 at 09:16 -0800, Thomas Hill wrote: > Hey all, > > Been trying to display multiple form rows for a project lately, and I > just wanted to confirm that I'm doing this right. I found a solution > on http://www.pointy-stick.com/blog/2009/01/23/advanced-formset-usage-django/ >

unicode/str not callable

2009-02-18 Thread Nicolas Steinmetz
Hello, I have in mind in a tiny app to allow user to set a search box with the provider they wish. I base this on web_search and then did the following : # Create your models here. class SearchBox(models.Model): CROP_ANCHOR_STR = ('dmoz', 'ask', 'google', 'googlefr', 'excite', 'msn',

Re: OT: hide directory listing on server

2009-02-18 Thread Lloyd Budd
On Feb 18, 10:08 am, PeteDK wrote: > > However when i go to .com/media/profile_pics/ i get a directory > listing of all the folders in this directory. The easiest solution is just to put a blank index.html file in the directory. We do the equivalent in WordPress,

Re: 1.0 branch?

2009-02-18 Thread Lloyd Budd
On Feb 17, 9:04 pm, Alex Gaynor wrote: > > Django has a 1.0.X branch > here:http://code.djangoproject.com/browser/django/branches/releases/1.0.X > that is > the work that becomes the various point releases(currently 1.0.2). Thanks Alex! On Feb 17, 9:17 pm, James

Query that grabs objects before and after object

2009-02-18 Thread Sean Brant
Is there a simple way to say get me 4 objects from model that come before this object and 4 that come after this object. So lets say I have a Show. I would like to know which 4 shows come before the current show and which 4 come after, however I must limit the shows based on a category type.

Re: Any way to show progress during a short process job?

2009-02-18 Thread Kevin Audleman
Ajax would only be necessary if you want a status bar that reflects accurately the progress. You can probably get by with something simpler. I would write some Javascript that is triggered on clicking the submit button that replaces the button with this graphic:

Re: unicode/str not callable

2009-02-18 Thread Malcolm Tredinnick
On Thu, 2009-02-19 at 00:43 +0100, Nicolas Steinmetz wrote: [...] > The issue is that engine in engine(request.POST['search'], 10) does not > become google(request.POST['search'], 10) in the case where the user > chosed "google" as engine. > > Is there a solution or did I have to test all

Django "tracking" app

2009-02-18 Thread DougC
Hi all, I'm not sure if this is the right forum, so please redirect me if it's not. I'm new to Django/Python, but not to coding. I've run through the Django tutorial and I like what I see. A very common problem that I work on is a webapp that "tracks" something. People, computers, assets, you

Re: Query that grabs objects before and after object

2009-02-18 Thread Malcolm Tredinnick
On Wed, 2009-02-18 at 16:06 -0800, Sean Brant wrote: > Is there a simple way to say get me 4 objects from model that come > before this object and 4 that come after this object. > > So lets say I have a Show. I would like to know which 4 shows come > before the current show and which 4 come

  1   2   >