Re: Images dose not upload , unless it the admin !

2009-04-01 Thread Hamza
got it fixed it mins ago , Thanks Alex , ( I need to slp 38 hours so far ) On Apr 2, 7:49 am, Alex Gaynor wrote: > On Thu, Apr 2, 2009 at 1:38 AM, Hamza wrote: > > > Hello > > > am having a problem in uploading images , which i set

Re: Images dose not upload , unless it the admin !

2009-04-01 Thread Alex Gaynor
On Thu, Apr 2, 2009 at 1:38 AM, Hamza wrote: > > Hello > > am having a problem in uploading images , which i set ImageField to > upload the image to /Photo/ directory , however it works , and > uploaded the photos as expected , but now its not working : and > display a

Images dose not upload , unless it the admin !

2009-04-01 Thread Hamza
Hello am having a problem in uploading images , which i set ImageField to upload the image to /Photo/ directory , however it works , and uploaded the photos as expected , but now its not working : and display a message : This field is required. , when i submit a photo in it , it repeat the

Re: widget=forms.HiddenInput doesn't work

2009-04-01 Thread Michael Rose Jr.
On Apr 1, 8:40 pm, Brian Neal wrote: > On Apr 1, 10:19 pm, "Michael Rose Jr." > wrote: > > > > > Brian. Thanks for responding. I mean to post "name". I've been > > experimenting with other field types, which why I accidentally pasted > > "last". Here

Re: widget=forms.HiddenInput doesn't work

2009-04-01 Thread Brian Neal
On Apr 1, 10:19 pm, "Michael Rose Jr." wrote: > > Brian. Thanks for responding. I mean to post "name". I've been > experimenting with other field types, which why I accidentally pasted > "last". Here is the HTML for "name". > Name: type="text" name="name" maxlength="45"

Re: widget=forms.HiddenInput doesn't work

2009-04-01 Thread Brian Neal
On Apr 1, 10:19 pm, "Michael Rose Jr." wrote: > > Brian. Thanks for responding. I mean to post "name". I've been > experimenting with other field types, which why I accidentally pasted > "last". Here is the HTML for "name". > Name: type="text" name="name" maxlength="45"

inlineformset_factory ordering

2009-04-01 Thread Paddy Joy
Is it possible to order the forms in an inlineformset_factory? I have tried ordering the forms in the template using the following but I still see a different order everytime I refresh the page. {% for form in formset.initial_forms|dictsort:"id" %} I'm on SVN 10361. Anyone any ideas? Paddy

Re: widget=forms.HiddenInput doesn't work

2009-04-01 Thread Michael Rose Jr.
On Apr 1, 6:53 pm, Brian Neal wrote: > On Apr 1, 8:16 pm, rizzoo wrote: > > > How do I make a field hidden when using ModelForm?  I tried > > HiddenInput but it appears to be ignored. > > > code:http://dpaste.com/22290/ > > Line 9 > > > Here's what

Re: how can I change(update) an existing avatar to a new one?

2009-04-01 Thread TTear1943
Thank you for you reply. Now I have slove the problem. But the solution is very strange. In fact, there is a clean function in my update form, as following: def clean_user_avatar(self): if not self.cleaned_data["user_avatar"]: raise forms.ValidationError("Image Path is in

forming email body

2009-04-01 Thread Joey Gartin
Newbie question: In a view I am sending out a few emails to users. The email format is identical for each user, with the users information being dynamic. My question is regarding forming a long email and using it as the body over and over (in a loop for each user). What is the best way to do

Re: widget=forms.HiddenInput doesn't work

2009-04-01 Thread Brian Neal
On Apr 1, 8:16 pm, rizzoo wrote: > How do I make a field hidden when using ModelForm?  I tried > HiddenInput but it appears to be ignored. > > code:http://dpaste.com/22290/ > Line 9 > > Here's what View Source shows for that line in the browners: > Last: name="last"

widget=forms.HiddenInput doesn't work

2009-04-01 Thread rizzoo
How do I make a field hidden when using ModelForm? I tried HiddenInput but it appears to be ignored. code: http://dpaste.com/22290/ Line 9 Here's what View Source shows for that line in the browners: Last:http://groups.google.com/group/django-users?hl=en

Re: Sync db and model

2009-04-01 Thread Russell Keith-Magee
On Thu, Apr 2, 2009 at 7:58 AM, MartinBorthiry wrote: > > Hello: > >  We are using django-evolution to sync our model with the db, but we > have some issues. > >  Which is the best way to keep synchronized our model and db? > >  We want to keep the previous data into

Re: Fixtures for django.contrib.sites.Site

2009-04-01 Thread Russell Keith-Magee
On Thu, Apr 2, 2009 at 5:49 AM, Adam Nelson wrote: > How do I do a fixture for the Site model?  I've tried all sorts of different > model names > [ >   { >     "model": "sites.site", >     "pk": 1, >     "fields": { >       "domain": "example.com", >       "name": "Example" >     

Sync db and model

2009-04-01 Thread MartinBorthiry
Hello: We are using django-evolution to sync our model with the db, but we have some issues. Which is the best way to keep synchronized our model and db? We want to keep the previous data into db. Thanks --~--~-~--~~~---~--~~ You received this message

Re: Django Developers Wanted

2009-04-01 Thread Hernan Olivera
Hi, Liam! 2009/1/24 Info Cascade : > This will probably be of most interest to Django developers in the San > Francisco Bay Area, > but the company is open to hearing from anyone who might be interested. Remote off-shore freelancers too? regards -- Hernan

Django Developers Wanted

2009-04-01 Thread Info Cascade
Hi, Joe, We're looking for a Django developer, and I happened upon your profile at DjangoGigs. If this looks like it might be of interest, please contact me for more information. Best, Liam Kirsher 415.456.4420 -- Hi -- This will probably be of most interest to Django developers in the San

Re: Fixtures for django.contrib.sites.Site

2009-04-01 Thread Paul Menzel
Am Mittwoch, den 01.04.2009, 17:49 -0400 schrieb Adam Nelson: > How do I do a fixture for the Site model? I've tried all sorts of > different model names > > > [ > { > "model": "sites.site", > "pk": 1, > "fields": { > "domain": "example.com", > "name": "Example" >

Re: admin permissions i18n

2009-04-01 Thread Alex Gaynor
On Wed, Apr 1, 2009 at 6:06 PM, Killarny wrote: > > I am also running across this issue. I had simply assumed that > permission names would require ugettext_lazy to be localized, but it > isn't working. In trying to understand this, I am left wondering why > the permission

Re: admin permissions i18n

2009-04-01 Thread Killarny
I am also running across this issue. I had simply assumed that permission names would require ugettext_lazy to be localized, but it isn't working. In trying to understand this, I am left wondering why the permission name field is not stored in the database in such a fashion to allow lookup from

Fixtures for django.contrib.sites.Site

2009-04-01 Thread Adam Nelson
How do I do a fixture for the Site model? I've tried all sorts of different model names [ { "model": "sites.site", "pk": 1, "fields": { "domain": "example.com", "name": "Example" } }, ] And I get this error: ... File

Re: Changemanipulator takes 15 seconds to execute

2009-04-01 Thread Miguel
Hi Karen, i didn't want to bother you too much (because of that I dindnt send too much code). I think these model are bad implemented. I have put the raw_id_admin parameter to true but the point is that I have too many queries: >>> len(connection.queries) 53 and some of them, all that goes to

Re: Comments custom form made easier to add captcha

2009-04-01 Thread Michel Thadeu Sabchuk
Hi, > You don't say what version of Django you are using. This sounds like you > want exactly the kind of customization described here: > > http://docs.djangoproject.com/en/dev/ref/contrib/comments/custom/ Yes, I already following it, but with 1.0.2 django version :) > That page doesn't exist

Problem saving dynamically added form in formset

2009-04-01 Thread Brandon Taylor
Hi everyone, I'm using an inline formset on a model. I have some jQuery that adds an additional form to the page, and augments the TOTAL_FORMS parameter by 1. The problem is that the dynamically added form is not present in the collection of forms when I save the formset. All of the name and ID

Re: Search on concatenated fields of qset

2009-04-01 Thread Tim Chase
> My model has firstname and lastname as separate fields. In a search > box if a person types in one name say "Bunny" then based on the > following query they will find Bunny: > > qset = ( > Q(firstname__icontains=query) | > Q(lastname__icontains=query) | > ) >

Re: Wrong link to uploaded file in admin...

2009-04-01 Thread Dan Jewett
On Apr 1, 3:12 pm, Karen Tracey wrote: > On Wed, Apr 1, 2009 at 2:52 PM, Dan Jewett wrote: > > > I'm using the following settings: > > > MEDIA_ROOT = '/Users/dan/projects/some_project/files/' > > > # static files > >        (r'^files/(?P.*)$',

Re: FileField cannot save file with chinese filenames.

2009-04-01 Thread 夏恺
Karen Tracey 写道: > On Wed, Apr 1, 2009 at 5:12 AM, 夏恺 > wrote: > > > Hi all! > > I wrote a model to hold files uploaded by users, it goes like this: > > > This is ticket #10254: http://code.djangoproject.com/ticket/10254 > > It has a patch you

Search on concatenated fields of qset

2009-04-01 Thread Jesse
My model has firstname and lastname as separate fields. In a search box if a person types in one name say "Bunny" then based on the following query they will find Bunny: qset = ( Q(firstname__icontains=query) | Q(lastname__icontains=query) | ) If a person types

Re: Inheriting attributes from a model

2009-04-01 Thread Denis
Now I've got serialization to json working thanks to your advice. I still have problems with converting the data back into an object, but I don't have time to look into that now. It'll have to wait tomorrow. Thanks ! --~--~-~--~~~---~--~~ You received this message

Re: Comments custom form made easier to add captcha

2009-04-01 Thread Karen Tracey
On Wed, Apr 1, 2009 at 3:05 PM, Michel Thadeu Sabchuk wrote: > I created a custom comments app to make use of captcha. I didn't > change the mode, I just change the form to make use of django-simple- > captcha [1]. > > To make all magic works I need to do some hacks in django

Re: Comments custom form made easier to add captcha

2009-04-01 Thread Michel Thadeu Sabchuk
I found a better way to hack :) In the django.contrib.comments.__init__ file, I changed the get_model, get_form and get_form_target method to something like: def get_form(): if get_comment_app_name() != __name__ and hasattr(get_comment_app (), "get_form"): return

Re: Wrong link to uploaded file in admin...

2009-04-01 Thread Karen Tracey
On Wed, Apr 1, 2009 at 2:52 PM, Dan Jewett wrote: > > I'm using the following settings: > > MEDIA_ROOT = '/Users/dan/projects/some_project/files/' > > # static files >(r'^files/(?P.*)$', 'django.views.static.serve', > {'document_root':

Comments custom form made easier to add captcha

2009-04-01 Thread Michel Thadeu Sabchuk
Hi Guys, I created a custom comments app to make use of captcha. I didn't change the mode, I just change the form to make use of django-simple- captcha [1]. To make all magic works I need to do some hacks in django comments framework. I want to use the existing views, I don't want to write it

Choicefield - Dynamic update

2009-04-01 Thread AsiSoudai
Good morning, I'm new to django, and in need for a little pointers: I've a bunch of Choicefields that I want to update ( similar to Country-city-street, type of behavior ). How would I go about updating those fileds, without reloading the page? Javascript? Ajax? or django have a way to update

Wrong link to uploaded file in admin...

2009-04-01 Thread Dan Jewett
I'm using the following settings: MEDIA_ROOT = '/Users/dan/projects/some_project/files/' # static files (r'^files/(?P.*)$', 'django.views.static.serve', {'document_root': '/Users/dan/projects/some_project/files'}), In an app called 'collaborate' I have a model that looks like this:

Re: Using _default_manager in a model causes many idle MySQL connections. (Django 1.0)

2009-04-01 Thread Guillaume Carbonneau
I too am interested in seeing this patch. I'm getting lots of idle connections in postgres On Mar 31, 5:26 am, J wrote: > Hello Michael, > > Would you share your temp patch here? > > TIA, > > J > > On Mar 20, 12:52 am, MikeL wrote: > > > I wasn't

non-existent models.py treatment

2009-04-01 Thread Leo
I ran into a situation recently where I was trying to do syncdb on a project that included an application with initial_data but no models.py. The syncdb failed silently and it took me a little while to understand what was going on. Is it an explicit design decision to fail on encountering no

Re: Trac + Sphinx

2009-04-01 Thread Fábio Costa
Sorry, what he meant to ask is if the Django project use any kind of integration within trac and sphinx, like some kind of plugin. Sorry for bothering again, but i don't know anywhere else to get this kind of information. Thanks in advance. Fábio Miranda Costa Engenheiro de Computação

Re: Changemanipulator takes 15 seconds to execute

2009-04-01 Thread Karen Tracey
On Wed, Apr 1, 2009 at 1:35 PM, Miguel wrote: > sorry karen. I have tried both. First I put in teh forma_parte_de foreing > key field but it has no discernible effect on performance. I even execute it > via python console and you can see clearly that it takes long time to >

Re: Can I use Components and Classes in Django for views/controllers?

2009-04-01 Thread Ariel Mauricio Nunez Gomez
Yes, Class Based Views are nice, here is a fresh blog post about it: http://www.screeley.com/entries/2009/apr/01/class-based-views-and-reusable-apps/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Setting default values for model options?

2009-04-01 Thread jeremias.kangas
Hello, I noticed that default value when adding a field for a model is null=False. This default option is not very good for me, because for almost every field needs to be null in my application. Is there a way to change these default values for options? - Jeremias

Re: Can I limit the choices in a ContentType field in admin?

2009-04-01 Thread Adam Stein
I wound up doing it that way as well except I used the model name rather than the ID: data_type = models.ForeignKey(ContentType, limit_choices_to = {"model__in": ("model1", "model2")}, ) On Wed, 2009-04-01 at 10:34 -0700, Lee wrote: > Actually I tried to do as I suggested and I couldn't

Re: Changemanipulator takes 15 seconds to execute

2009-04-01 Thread Miguel
sorry karen. I have tried both. First I put in teh forma_parte_de foreing key field but it has no discernible effect on performance. I even execute it via python console and you can see clearly that it takes long time to response. Then I tried to put the raw parameter in the many to many fields

Re: Can I limit the choices in a ContentType field in admin?

2009-04-01 Thread Lee
Actually I tried to do as I suggested and I couldn't get it to work... I ended up using the following: from MyProject.MyApp.models import MyModel CONTENT_TYPE_CHOICES = (ContentType.objects.get_for_model (MyModel).id,) class My_Other_Model(models.Model): content_type =

Re: Can I limit the choices in a ContentType field in admin?

2009-04-01 Thread Adam Stein
Thanks for the info. I also ran across 'limit_choices_to' which also works. On Wed, 2009-04-01 at 08:48 -0700, Lee wrote: > You're close... > > change your method in CHOICES to get_for_model( _model_ ) > > So it should be > CHOICES = ( > (ContentType.objects.get_for_model(My_Model),

Re: problem customizing comments app

2009-04-01 Thread Karen Tracey
On Wed, Apr 1, 2009 at 1:04 PM, laird18 wrote: > > Hello all, > > I'm trying to follow the "example custom comments app" exercise as > documented here: > > http://docs.findjango.com/ref/contrib/comments/custom.html#ref-contrib-comments-custom > > It looks simple

Re: how to django to request a page of the other domain

2009-04-01 Thread Doug B
It might be better to use the rewrite/proxy capability of your webserver rather than try to proxy using django. If you do end up trying to do it in python, I found pycurl to be much easier to deal with for any requests requiring cookies, authentication, or anything besides a simple url get

Re: Changemanipulator takes 15 seconds to execute

2009-04-01 Thread Karen Tracey
On Wed, Apr 1, 2009 at 1:03 PM, Miguel wrote: > umm, raw_id_admin takes no effect. I think I have found the problem. As you > said it may be in the model: > > Pattern_method model has this entry definition: > > metodos_embebidos = >

Re: Can I use Components and Classes in Django for views/controllers?

2009-04-01 Thread matehat
Hi, You do have a couple of options, as mentioned by others earlier. One of them is creating a base callable class view for your entire site and have it subclassed for specific cases, but I think that would be a bit heavy to work with here. Keep in mind that's entirely possible, but you might

problem customizing comments app

2009-04-01 Thread laird18
Hello all, I'm trying to follow the "example custom comments app" exercise as documented here: http://docs.findjango.com/ref/contrib/comments/custom.html#ref-contrib-comments-custom It looks simple enough but I've hit a complete dead end with it, and I don't have any idea how to debug the

RE: trouble uploading mp3 file

2009-04-01 Thread shelah johnson
I took a look at the file and you may have hit on it... the file size is 1.04 KB. Thanks! -Original Message- From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com] On Behalf Of creecode Sent: Tuesday, March 31, 2009 10:52 PM To: Django users Subject: Re: trouble

Re: Changemanipulator takes 15 seconds to execute

2009-04-01 Thread Karen Tracey
On Wed, Apr 1, 2009 at 10:52 AM, Miguel wrote: > I don really understand the raw_id_admin issue. I have read the api but it > is still not clear. > > You meant I could improve the behaviour by adding this paramter? > > forma_parte_de = >

Re: adding views to admin site

2009-04-01 Thread Oli Warner
Surely you need an ^admin/myapp/ rule in your main urls.py? (Your myapp/urls.py cannot attach to the /admin/ path because it is locked into the ^myapp path) Or you could switch it around and go for /myapp/admin/ (^admin/...) in your myapp/urls.py Both would be perfectly valid. On Wed, Apr 1,

Re: Flatpages variables

2009-04-01 Thread Oli Warner
Same principal stands; you'll need to use middleware to check the current user has what they need on their session and interrupt the request if they don't. If that doesn't make sense, read up on what middleware can do for you. On Wed, Apr 1, 2009 at 4:47 PM, Wiiboy wrote:

Re: how to django to request a page of the other domain

2009-04-01 Thread Oli Warner
Look at urllib2 (google) You should be able to do something like return HttpResponse(urllib2.urlopen('http://www.your-url.ext/uri')) 2009/4/1 Albert > > cross domain ajax request is not allowed ,so I decide to use proxy on > the server side > but I don't know how to finish

Re: Can I limit the choices in a ContentType field in admin?

2009-04-01 Thread Lee
You're close... change your method in CHOICES to get_for_model( _model_ ) So it should be CHOICES = ( (ContentType.objects.get_for_model(My_Model), "Model 1"), (ContentType.objects.get_for_model(My_Other_Model), "Model 2"), ) Obviously, make sure you import your model

Re: Flatpages variables

2009-04-01 Thread Wiiboy
Sorry, should've pointed out: I'm not using Django's user system, because I've got a PHP forum that I have to integrate with. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

how to django to request a page of the other domain

2009-04-01 Thread Albert
cross domain ajax request is not allowed ,so I decide to use proxy on the server side but I don't know how to finish this, anyone point me some url? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: how can I change(update) an existing avatar to a new one?

2009-04-01 Thread Karen Tracey
2009/4/1 TTear1943 <1943@gmail.com> > > I seems it doesnot work when update an ImageField. > Certainly ImageFields can be updated. You've omitted from the code you posted what exactly is done by the function user.handle_upload_user_avatar(), which is my first guess as to where the problem

Re: set list_filter directly

2009-04-01 Thread Karen Tracey
On Wed, Apr 1, 2009 at 7:40 AM, Sams wrote: > > anyone knows?... > If someone knew, they likely would have answered. You might be looking for the solution in ticket #5833, but I'm not really sure. The patch for that ticket is lacking docs to describe the solution

Re: Sending SMS using python script

2009-04-01 Thread Karen Tracey
On Wed, Apr 1, 2009 at 7:14 AM, gganesh wrote: > > hi group, > my application needs to send SMS occasionally to all the clients .Is > there any library in python that supports in sending SMS. > [snip] > This question really has nothing to do with Django, so you'll likely

Re: Collapsed inline

2009-04-01 Thread Karen Tracey
2009/4/1 Filip Gruszczyński > > I am creating my own admin for a model and I would to add a collapsed > inline. > > [snip] > But I have no idea how to achieve this with an inline. Is it possible > in DJango (possibly in 1.0, because this is at the production server, > but I

Re: evaluation of checkboxes

2009-04-01 Thread Timothy
Hi Alex, many thanks for your quick responce. Now it works as I expect. And I apologize for my questions but I'm learning by doing and I have not much time to realize my project. I know I have much to learn (reading the documentation) - sorry Timothy

Re: Changemanipulator takes 15 seconds to execute

2009-04-01 Thread Miguel
I don really understand the raw_id_admin issue. I have read the api but it is still not clear. You meant I could improve the behaviour by adding this paramter? forma_parte_de = models.ForeignKey('Plantilla_ > > bloque',related_name='dentro_de',blank=True,null=True, raw_ide_admin=true) And

Re: evaluation of checkboxes

2009-04-01 Thread Alex Gaynor
On Wed, Apr 1, 2009 at 10:44 AM, Timothy <83...@gmx.de> wrote: > > Hi Folks, > > I have checkboxes in my Form - submitd with POST-method > > request.POST['stat'] delivers a list/a string(???) [1, 2, 3 A, B] / > "1, 2, 3, A, B" > > I try to evaluate this but get only the last value (here: "B") >

evaluation of checkboxes

2009-04-01 Thread Timothy
Hi Folks, I have checkboxes in my Form - submitd with POST-method request.POST['stat'] delivers a list/a string(???) [1, 2, 3 A, B] / "1, 2, 3, A, B" I try to evaluate this but get only the last value (here: "B") my code a) if "stat" in request.POST: st = request.POST['stat']

Re: FileField cannot save file with chinese filenames.

2009-04-01 Thread Karen Tracey
On Wed, Apr 1, 2009 at 5:12 AM, 夏恺 wrote: > > Hi all! > > I wrote a model to hold files uploaded by users, it goes like this: > > [snip] > and when I try to add an mp3 file with chinese filename through the > admin interface, the files are not saved correctly, their names are >

Re: Modifu request.user

2009-04-01 Thread soniiic
On Apr 1, 3:16 pm, Митко Масарлиев wrote: > soniiic wrote: > > > On Mar 31, 10:31 pm, Mitko Masarliev wrote: > > >> I have application with table name clients. Clients has one to one > >> relation with django users and in all app logic I check

Modifying contrib.auth

2009-04-01 Thread jeremias.kangas
Hi, I want to modify contrib.auth so that "username" validates as an email field and can be longer than 30 characters. Is the only way to do this to make my own version of contrib.auth (contrib.myauth) or is there some handier way? - Jeremias

Re: weird name error

2009-04-01 Thread Adonis
To whom it may concern, the problem was the order in which the classes are created. In the above exampel, the order seems fine but in my model the species_d comes first and then the layers. this makes it search for sth that is not initiated yet! cheers and sorry for the stupid error... On Mar

Re: Modifu request.user

2009-04-01 Thread Митко Масарлиев
soniiic wrote: On Mar 31, 10:31 pm, Mitko Masarliev wrote: I have application with table name clients. Clients has one to one relation with django users and in all app logic I check clients id by request.user.id, In some cases user_id is not same as

Re: How to handle the Browser Close ?

2009-04-01 Thread Jeff FW
http://docs.djangoproject.com/en/dev/topics/http/sessions/#session-expire-at-browser-close On Apr 1, 2:26 am, veeravendhan wrote: > Say a user is logged in to the system,  If he closes the browser how > will I handle the Logout for that user ? Any idea ??

Re: Modifu request.user

2009-04-01 Thread soniiic
On Mar 31, 10:31 pm, Mitko Masarliev wrote: > I have application with table name clients. Clients has one to one > relation with django users and in all app logic I check clients id by > request.user.id, In some cases user_id is not same as clients_id. This > is the

Re: Merging apps

2009-04-01 Thread Dids
You're correct, it's projects, not applications. Each project has 1 application at the moment. Not all of the project have user management but a couple have. On Apr 1, 2:10 pm, Thomas Guettler wrote: > Dids schrieb: > > > Hi, > > > I have a handful of application running

Re: how can I change(update) an existing avatar to a new one?

2009-04-01 Thread TTear1943
I seems it doesnot work when update an ImageField. On 4月1日, 下午5时37分, TTear1943 <1943@gmail.com> wrote: > Hi, I encounter a problem. > In my user models there is an atrrbution: user.avatar = ImageField > ('avatar', upload_to=AVATAR_TEMP_DIR, blank=True, null=True) > then i use a modelform as

Re: Flatpages variables

2009-04-01 Thread Rajesh D
On Apr 1, 2:30 am, Wiiboy wrote: > Hi, > I've got a site where users must be logged in to view any pages. > Logged in users may write articles for the newsletter, and upload > them.  I then convert the article to HTML (manually), and make it > available for other users.  

Re: Incompatibility with FreeTDS/ODBC and Unicode on a MSSQL server?

2009-04-01 Thread Mark Shewfelt
Thanks Karl - Actually, this morning I gave up and upgraded Ubuntu to 8.10, which uses a newer version of FreeTDS and unixODBC. It seems to work OK, though there are some funky Unicode issues using Django's TextField, but I can get around those for now. Cheers, Mark On Mar 31, 8:41 pm, "Karl

Re: Inheriting attributes from a model

2009-04-01 Thread Rajesh D
On Apr 1, 6:43 am, Denis wrote: > I am developing a store using Satchmo, and I want the ability to save > quotes; that's snapshots of the current cart, and I want to store the > history of all the quotes in the database. My current models look like > this: > > class

Re: Merging apps

2009-04-01 Thread Thomas Guettler
Dids schrieb: > Hi, > > I have a handful of application running on the same apache server. > > More are on the way and it's starting to get messy to manage. > > I'd like to "merge" all the applications into one but I'm not sure how > to go about it. > [What I want is, a single entry in my

Re: set list_filter directly

2009-04-01 Thread Sams
anyone knows?... On 31 mar, 13:34, Sams wrote: > Hi all, > > I would like to know if there is some way to pass to admin list_filter > the values I want to filter. > > for example, i have a field for author's book. > it's a string with more than one author. > > a few books

Default values in inline admin widget

2009-04-01 Thread Filip Gruszczyński
I have inline admin widget, it's a tabular inline and I would like to have a few of it's rows filled for the user. Can I achieve it somehow quickly (DJango 1.0 or 1.1)? Should I put some JS somewhere or is it possible from admin.py? -- Filip Gruszczyński

Sending SMS using python script

2009-04-01 Thread gganesh
hi group, my application needs to send SMS occasionally to all the clients .Is there any library in python that supports in sending SMS. I like to conform few information i gathered in this regard. I can send SMS by two ways 1. Sending SMS using Email clients 2. Using sms gateway to send

adding views to admin site

2009-04-01 Thread MarcoS
Hi, I've a problem adding views to my admin site using Django 1.1 beta. I've defined inside my admin.py: class SeasonAdmin(admin.ModelAdmin): def get_urls(self): urls = super(SeasonAdmin, self).get_urls() my_urls = patterns('', (r'check_calendar/$',

I can upload an avatar when creating, but how can I change an avatar when updating?

2009-04-01 Thread 林吓洪
Hi, I encounter a problem. In my user models there is an atrrbution: user.avatar = ImageField('avatar', upload_to=AVATAR_TEMP_DIR, blank=True, null=True) then i use a modelform as an create user form. And the avatar is uploaded corrcet. Which upload to AVATAR_TEMP_DIR, then I move the avatar into

Merging apps

2009-04-01 Thread Dids
Hi, I have a handful of application running on the same apache server. More are on the way and it's starting to get messy to manage. I'd like to "merge" all the applications into one but I'm not sure how to go about it. [What I want is, a single entry in my apache.conf file, not one per app as

I can upload an avatar when creating, but how can I change an avatar when updating?

2009-04-01 Thread TTear1943
Hi, I encounter a problem. In my user models there is an atrrbution: user.avatar = ImageField ('avatar', upload_to=AVATAR_TEMP_DIR, blank=True, null=True) then i use a modelform as an create user form. And the avatar is uploaded corrcet. Which upload to AVATAR_TEMP_DIR, then I move the avatar

how can I change(update) an existing avatar to a new one?

2009-04-01 Thread TTear1943
Hi, I encounter a problem. In my user models there is an atrrbution: user.avatar = ImageField ('avatar', upload_to=AVATAR_TEMP_DIR, blank=True, null=True) then i use a modelform as an create user form. And the avatar is uploaded corrcet. Which upload to AVATAR_TEMP_DIR, then I move the avatar

Inheriting attributes from a model

2009-04-01 Thread Denis
I am developing a store using Satchmo, and I want the ability to save quotes; that's snapshots of the current cart, and I want to store the history of all the quotes in the database. My current models look like this: class QuoteItem(models.Model, Product): quantity =

Re: how to use email instead of username for user authentication?

2009-04-01 Thread johan . uhle
Best way is to write your own authentication backend I think. Check the docs: http://docs.djangoproject.com/en/dev/topics/auth/?from=olddocs#writing-an-authentication-backend This article might also give you a good idea:

Collapsed inline

2009-04-01 Thread Filip Gruszczyński
I am creating my own admin for a model and I would to add a collapsed inline. Right now it is: inlines = [PriorityInline,] but this was I have no idea how to specify it is collapsed. I can't just put it into fieldsets. I tried adding classes=['collapse'] to the inline, but it didn't help. I

Re: Sessions living through HttpResponseRedirect

2009-04-01 Thread Bro
Hi Josh, I think the best is after you create a client, he should log in. When the client log in, you can use : request.user to get user information. Good luck Bro --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Can I use Components and Classes in Django for views/controllers?

2009-04-01 Thread andybak
Without really examining the problem in detail it doesn't sound like you are doing anything that isn't possible with a combination of context_processors (for common variables) and template inheritance/ includes. Each view constructs the specific context, a custom context processor provides site

Re: Can I use Components and Classes in Django for views/controllers?

2009-04-01 Thread Ståle Undheim
I have thought about this, the problem is that part off the context variables are arguments to the view method. So I have urls like "(? P\w+)", and I need to extract the project name from the url to produce the context. So in my context preprocessor to read the url configs, look if a pattern

FileField cannot save file with chinese filenames.

2009-04-01 Thread 夏恺
Hi all! I wrote a model to hold files uploaded by users, it goes like this: Model: class Userfiles(models.Model): user = models.ForeignKey( User, verbose_name="user name", ) upload_file = models.FileField( u"file", upload_to='user/%Y/%m/%d', )

Re: Time lookup

2009-04-01 Thread LD
OK, situation I deal with is that I have many events, each event is scheduled for some date and time (like 1 april 2009, 1pm). I want to make query that retrieve all events that are scheduled between 3pm-5pm (na matter what day) or are scheduled before 2pm (no matter what day) or sth simillar.

Re: Can I use Components and Classes in Django for views/controllers?

2009-04-01 Thread Briel
Hi. For the second part, it looks like you could use your own template_context_preprocessor. With it you can do stuff like creating variables for your template. Maybe this would be able to solve your problem having to send the same template vars over and over again. If you dont need view specific

Re: Overriding ModelForm

2009-04-01 Thread Daniel Roseman
On Apr 1, 8:35 am, MrBodjangles wrote: > Hi All, > I know this is something very basic (perhaps even a typo), but the > code below gives an error: > > "    password = models.CharField(widget=PasswordInput()) > TypeError: __init__() got an unexpected keyword argument

Can I use Components and Classes in Django for views/controllers?

2009-04-01 Thread Ståle Undheim
I come from a Java background, and I really like Apache Wicket as a way for constructing web frameworks. In it you use classes, extension and compositions to build your pages. This allows for great reuse off components in different pages. Django however works via functions instead, which can't

Overriding ModelForm

2009-04-01 Thread MrBodjangles
Hi All, I know this is something very basic (perhaps even a typo), but the code below gives an error: "password = models.CharField(widget=PasswordInput()) TypeError: __init__() got an unexpected keyword argument 'widget' " ( This should be similar to what was presented in the official doc:

Re: How to handle the Browser Close ?

2009-04-01 Thread Briel
Hi. You don't really have to log the user out, unless you are making something with very sensitive material. A lot of sites wont log you out unless you haven't been at their site for some time. One thing you could do, would be to log users out that haven't been active for x minutes/hours, but

  1   2   >