Re: output as input *.html

2011-04-10 Thread gintare
I mean maybe there is some special function in Django which display any model field as input field in *.html. I mean instead of generating simple text in *.html {{ model.fieldValue_which_is_displayed_as_text }} generates editable *.html [[ model.fieldValue_which_is_possible_to_edit_and_is_saved

Request variables are empty in views.py

2011-04-10 Thread Ali E . İMREK
I'm sending XML data but request.raw_post_data and POST vars are empty, whats wrong? ___views.py___ def reply(request): return HttpResponse("Server raw reply: "+str(request.raw_post_data)) I've copied POST process information form Firebug Net/XHR tab. ___HEADERS___ Hostlocalhost User-Ag

add field to the user registration (back-office)

2011-04-10 Thread issolah
Hey, So I create a module slider to manage a banner of site. The banner depend of the country choosed by front office user in site (user is not registred). But in the back-office, this modules muste be manage by user depend on her country Ex: I have some user: --> marc: mo

Re: Request variables are empty in views.py

2011-04-10 Thread Ali E . İMREK
10 Nisan 2011 13:33 tarihinde Ali E.İMREK yazdı: > I'm sending XML data but request.raw_post_data and POST vars are > empty, whats wrong? > > ___views.py___ > def reply(request): >    return HttpResponse("Server raw reply: "+str(request.raw_post_data)) > > > I've copied POST process information fo

Re: a noob in need (installing apps)

2011-04-10 Thread Pythia the Oracle
Many thanks, Vasil! I understand now. I just couldn't find the 'mailer' folder after installation. Found it, included it in INSTALLED_APPS, and it's up and running. Yay! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Django app for data management and visualization

2011-04-10 Thread Brian Bouterse
I'm a fan of using flot for visualization. I've used the Google Charts and it works well too. Brian On Sun, Apr 10, 2011 at 2:07 AM, ucnt...@gmail.com wrote: > > > On Apr 8, 12:22 am, Chris Matthews wrote: > > Hi Marwan, > > > > Another option that I'll invest

Re: Django app for data management and visualization

2011-04-10 Thread Marwan Al-Sabbagh
thanks for sharing the link. Thats a really amazing piece of software, I'm definitely gonna use that on some of my projects. Marwan On Sun, Apr 10, 2011 at 5:59 PM, Brian Bouterse wrote: > I'm a fan of using flot for > visualization. I've used the Google Charts

Re: how to have different logo for django admin based on URL

2011-04-10 Thread Mengu
I don't know if there is a Django way for this, however this can be achived very easily with javascript. On Apr 9, 2:36 am, rahul jain wrote: > Anyone ever tried to have different logos for admin based on the URL > > Like > > http://url/comp1 > > use comp1 logo for django admin always > > http://

SplitDateTimeField in model form won't pre-populate

2011-04-10 Thread jim_rain
Hi - I'm using Django 1.3 and I have a model defined with a DateTimeField and a corresponding form that uses a SpliteDateTimeField to format the date and time the way I want it to look. The definition looks like this: # --- Code snippet _# class Test(models.Mod

Re: Social Auth

2011-04-10 Thread Ryan Nowakowski
On Tue, Mar 29, 2011 at 09:56:15AM -0700, bish029 wrote: > how to get id or key required for social oath from facebook and use it > to test my development while i am still developing the site but not > yet launched it Create a test facebook app and use that app ID for development. -- You re

Re: Deploying Pinax to bluehost

2011-04-10 Thread Ryan Nowakowski
On Sun, Mar 27, 2011 at 10:27:54AM -0700, Antik wrote: > I created a Pinax website on localhost and I have been trying to > deploy it to my hosting server at bluehost.com, but I am really lost > as to how this works. COuld anyone shed light on the process? Thanks! I've deployed Pinax on bluehost b

Re: High availability deployments

2011-04-10 Thread Ryan Nowakowski
On Wed, Mar 23, 2011 at 11:29:00PM -0700, Shamail Tayyab wrote: >We have a setup in which we can't afford downtime (even while > deployment). > > Our setup is based on lighttpd + django (on fcgi via flup). What my > problem is, when we restart django, the site goes down for about a > couple of

how to Generate a 5 character unique alpha-numeric string

2011-04-10 Thread GOUTAM KUMAR RANA
how to Generate a 5 character unique alpha-numeric string to use as primary key in my model. how to show the generated string in a particular textbox when loading a particular form or page? Please help Thanks -- You received this message because you are subscribed to the Google Groups "Dja

Re: how to Generate a 5 character unique alpha-numeric string

2011-04-10 Thread David Markey
Ermm.. Why not just use a UUID? On 10 April 2011 18:48, GOUTAM KUMAR RANA wrote: > how to Generate a 5 character unique alpha-numeric string to use as primary > key in my model. > > how to show the generated string in a particular textbox when loading a > particular form or page? > > > Please he

Re: Subqueries

2011-04-10 Thread Mengu
i believe you can do this with "extra" attribute. go to http://docs.djangoproject.com/en/1.3/ref/models/querysets/ and search for subquery. you'll see how to do subqueries. On Apr 6, 5:30 pm, bernatbonet wrote: > Data Model: > class A(models.model): >    desc: model.CharField() > class B(models.

Re: populating a field based on selection of foreign key

2011-04-10 Thread Aref
Hello Ernesto, Thank you for taking the time to respond to my question. I tried your suggestion and unfortunately it did not work. I need to fill in the generation field of the board instance with the same generation as in system. I would like this to happen automatically. Again thanks for the res

processing POST data from jquery

2011-04-10 Thread het.oosten
I am trying to get a jquery form validator working. I am stuck now trying to work with the POST data. When i use a simple view for testing: def Code(request): if request.method == 'POST': message = request.POST data = dict(ok=True, msg=message)

Re: processing POST data from jquery

2011-04-10 Thread gladys
Remember that request.POST returns a dictionary. I think your variable should be: message = request.POST['your_post_variable_name'] and try changing the data in javascript to data = {'your_post_variable_name' : t.value} Goodluck. -- Gladys http://bixly.com On Apr 11, 3:58 am, "het.oosten" w

Re: how to Generate a 5 character unique alpha-numeric string

2011-04-10 Thread gladys
I don't think its possible to generate a unique string, unless you compare it with the rest of the values in your database, in which case you re-generate if you get a duplicate. Although, the probability of getting a duplicate is low. -- Gladys http://bixly.com On Apr 11, 1:50 am, David Markey

Re: SplitDateTimeField in model form won't pre-populate

2011-04-10 Thread gladys
Hello, TestForm is a ModelForm, therefore you initialize it by passing an object instance. obj = Test.objects.get(id=id) form = TestForm(instance=obj) Here is a sample view with proper usage of modelforms: def formrender(request, id=None): form = TestForm() # TestForm is a ModelForm test

Re: add field to the user registration (back-office)

2011-04-10 Thread gladys
Hi issolah, I'm not sure if i got your question correctly, but did you mean adding a 'country' field to django.contrib.auth.models.User? If so, you need to add a UserProfile(need not have this exact name), as described in the docs. Check out this link: http://docs.djangoproject.com/en/dev/topics/a

Re: CSS can be loaded but is not applied (Django 1.3, mod_wsgi3.3)

2011-04-10 Thread Max
Ok, I found it myself. Since the Apache update lots of former included modules weren't included anymore. I had to include mime_module to the Apache. Now stylesheets (CSS) are not just loaded but also correctly interpreted. Added to the httpd.conf: LoadModule mime_module /usr/libexec/apache2/mod_

Re: SplitDateTimeField in model form won't pre-populate

2011-04-10 Thread jim_rain
Gladys - Thanks you so much! Originally I was passing the object but I was leaving off the instance= That didn't work out so well. Jim On Apr 10, 2:20 pm, gladys wrote: > Hello, > > TestForm is a ModelForm, therefore you initialize it by passing an > object instance. > obj = Test.objects.get(id=

problems with redirect function

2011-04-10 Thread Antonio Sánchez
hi, im trying to use redirect shortcut, but im having problems passing arguments to the view i want to reverse. view definition is this: def profile(request, activation_key=None, new=None): if new is None: return HttpResponse("You're at the profile.") else:

How pass custom data to login template? (Seems only some like 'next' param are allowed!?)

2011-04-10 Thread Chris Seberino
How pass custom data to login template? (Seems only some like 'next' param are allowed!?) The reason for this problem is the Django auth system doesn't ask user to write the view for login page. cs -- You received this message because you are subscribed to the Google Groups "Django users" gro

mysql problems after upgrading to django 1.3

2011-04-10 Thread Rosemarie
hi :) I'm fairly new to django. I'm using it on mac os 10.5.8. I installed django 1.2.4 and created a small project that communicated with a mysql database. Everything was good. Then I upgraded to 1.3, followed uninstall instructions, installed the new version, everything seemed good. Except now

RE: [Suspected Spam] mysql problems after upgrading to django 1.3

2011-04-10 Thread Sells, Fred
Try mysql from the command line, make sure the service is running. Sometimes the install does not set it up to start on a reboot. Make sure you did not specify the port (socket) either when you installed or in django -- usually it's 3306 on a pc, don't know about mac. -Original Message- F

Re: mysql problems after upgrading to django 1.3

2011-04-10 Thread Rosemarie
Oh thank you, I am SUCH a moron, it never even occurred to me that mysql might not be running. How embarrassing :P Everything seems good now! Thanks! On Apr 10, 6:40 pm, "Sells, Fred" wrote: > Try mysql from the command line, make sure the service is running. > Sometimes the install does not se

Re: Uso de subconsultas

2011-04-10 Thread werefr0g
Hello, Maybe you mean: >>> result = A.objects.select_related().annotate(num_b=Count('b')).aggregate(max_num_b=Max(num_b)) >>> result['max_num_b'] In that case, you take each A value, count for each its related B occurences, then retain the highest count. Regards, Le 06/04/2011 16:25, be

Re: processing POST data from jquery

2011-04-10 Thread het.oosten
That was exactly what i needed. I didn't think of changing the javascript data. Thank you. -- 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

FeinCMS 1.3.0 final has been released!

2011-04-10 Thread Matthias Kestenholz
Hello everyone FeinCMS 1.3.0 has just been released and is available at the usual places. What is FeinCMS anyway? === FeinCMS is one of the most advanced Content Management Systems built on top of Django. FeinCMS not only includes a page module with many bundled content ty

Re: how to Generate a 5 character unique alpha-numeric string

2011-04-10 Thread GKR
I meant to say not random. serial eg: .. .. 2A00A 2A00B .. .. .. 2A00Z 2A010 2A011 .. ... 2A019 2A01A 2A01B -- 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