On 24 January 2012 07:58, JJ Zolper wrote:
> Yes I knew I was in the Python shell I just never saw anything that
> described you couldn't make Django commands within the Python interpreter. I
> mean it is based on Python isn't it? That's where I thought logically you
> could make Django calls from
Thanks all, I decided to use plata for my project, since I feel it can be
customized for my requirement much better than the other E-Commerce project
(i might be wrong but still after evaluating most of the django ecommerce
project this is what i felt). Matthias, thanks for developing Plata. Just
s
I have a model ContactDetail with two choice fields,
ContactDetail.dialing_code and ContactDetail.country. These use the
standard tuples ('AU', 'Australia') and so on.
I know I can use get_country_display() and get_dialing_code_display()
to show the longer values, but is there a more generic versi
Hi guys, I’m trying to let this form display but it’s not displaying
in my browser. When I open up the browser, only a blank page shows up.
How can I go about it? Below are my codes:
In models.py
from django.db import models
from django.forms import ModelForm, Textarea, HiddenInput
from django.con
Hey Gang, is it possible to include a csrf token with a xml post?
It looks like there are options in the view to control this but
getting into the header would be nice.
This isn't working along with many other tries. Anyone know what the
header should look like this offhand?
xmlhttp.open(
On 24-01-12 16:47, Robert Steckroth wrote:
Hey Gang, is it possible to include a csrf token with a xml post?
It looks like there are options in the view to control this but
getting into the header would be nice.
Django made it easy for you! There's a javascript snippet you can
copy/paste that
Hahaha, ya I saw that. I was hoping that it could just be inserted
into the request header easily.
That would be mandatory if one was going to be utilizing user post
data frequently however.
For what it's worth, I simply used this instead -->
{% csrf_token %}
function confirmation(person) {
Maybe try:
val = getattr(obj, 'get_%s_display' % field.name)()
On 1/24/12, katstevens wrote:
> I have a model ContactDetail with two choice fields,
> ContactDetail.dialing_code and ContactDetail.country. These use the
> standard tuples ('AU', 'Australia') and so on.
>
> I know I can use get_cou
coded kid wrote:
> Hi guys, I’m trying to let this form display but it’s not displaying
> in my browser. When I open up the browser, only a blank page shows up.
> How can I go about it? Below are my codes:
>
Hello,
In the template, you probably want
{{ mobForm.as_table }}
For debugging pur
Your view doesn't pass a context to the template. It needs to do this,
and your form needs to be part of the context.
something like:
from myweb.meekapp.models import mobForm
from django.shortcuts import render_to_response
from django.template import RequestContext
def home(request):
retur
Sam Lai,
Thank you so much for taking the time to explain all that to me.
Being new to all this I feel that I might need to just start out with a
command prompt working with Django and something else... another command
prompt or VS to create my python files.
However, having read what you poste
Hi,
in the django docs about __unicode__ it says the following:
class Person(models.Model):
first_name = models.CharField(max_length=50)
last_name = models.CharField(max_length=50)
def __unicode__(self):
return u'%s %s' % (self.first_name, self.last_name)
what does the u'%s
sorry bottom line should be?
as I believe if you take the top example you should be able to do:
def __unicode__(self):
return (self.first_name, self.last_name)
On Jan 24, 11:04 pm, Krondaj wrote:
> Hi,
>
> in the django docs about __unicode__ it says the following:
>
> class Person(mod
Hello, all!
I have a small conundrum I could use a hand with.
I have a deployed Django application with a Model which has a
URLField:
project_homepage = models.URLField('Project Homepage', blank=True)
and a ModelForm to create the parent object.
Currently, the application checks to see if this
On Tue, Jan 24, 2012 at 5:04 PM, Krondaj wrote:
> what does the u'%s %s' % mean... I cannot find any exaplanation of
> this in the docs?
It's not covered in Django's documentation because it's a standard
feature of the Python programming language -- this is basic Python
string formatting, which f
On 25/01/2012 10:30am, Rich Jones wrote:
Hello, all!
I have a small conundrum I could use a hand with.
I have a deployed Django application with a Model which has a
URLField:
project_homepage = models.URLField('Project Homepage', blank=True)
How about ...
project_homepage = models.URLField(
Hi everyone,
I'd really appreciate your help here!
I have just designed a model for my data that I want to publish as a
webform, that people fill in, however there are only certain bits I
want them to fill in as i'll be filling the rest in later as the work
progresses. is the model here correct
Sam Lai,
I am interested in PostgreSQL. I've heard it is good to use along with
Django. More specifically to work with GIS. I'm very interested in the
Geographical uses of Django. In particular GeoDjango. As I continued to
learn more about this web framework I hope to be able to work with
data
How can I trace SQL issued by orm and time taken in ajax requests?
Django-debug-toolbar does not work for ajax requests.
--
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 unsub
I figured out a simple workaround , instead of returning a xml or json
response from view I temporarily changed the view to send back a html
page and Django-debug-toolbar gave me the data.
It is pain to do it for all ajax requests but I can do it for one I am
most concerned about.
On Jan 24, 7:42
On Tue, 2012-01-24 at 18:33 -0600, James Bennett wrote:
> On Tue, Jan 24, 2012 at 5:04 PM, Krondaj wrote:
> > what does the u'%s %s' % mean... I cannot find any exaplanation of
> > this in the docs?
>
> It's not covered in Django's documentation because it's a standard
> feature of the Python pro
On Tue, 2012-01-24 at 19:19 -0800, JJ Zolper wrote:
> I am interested in PostgreSQL. I've heard it is good to use along with
> Django. More specifically to work with GIS. I'm very interested in the
> Geographical uses of Django. In particular GeoDjango. As I continued
> to learn more about this web
If I may say, 'u' makes it easy to return variable with any hassle.
And %s rep each string in your script. I think there should be other
ways to go about this. Hope you get my point?
kenneth gonsalves wrote:
> On Tue, 2012-01-24 at 18:33 -0600, James Bennett wrote:
> > On Tue, Jan 24, 2012 at 5:04
23 matches
Mail list logo