On Fri, Oct 22, 2010 at 12:37 PM, Phlip wrote:
> I just tried it:
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.sqlite3',
> # TODO restore 'NAME': ':memory:',
> 'NAME': '/home/phlip/fun.db',
> 'USER': '',
> 'PASSWORD': '',
> 'HOST':
I just tried it:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
# TODO restore'NAME': ':memory:',
'NAME': '/home/phlip/fun.db',
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': '',
}
}
Yes that's in my test_settin
Correction: I meant for the third ticket to have pk: 3.
On Oct 21, 3:18 pm, Yo-Yo Ma wrote:
> Example:
>
> Company has many Tickets
> Tickets have a PK, as well as a "number".
> Each Ticket's "number" should be the highest prior "number" for a
> Ticket with the same Company
>
> Ticket: pk: 1, num
Example:
Company has many Tickets
Tickets have a PK, as well as a "number".
Each Ticket's "number" should be the highest prior "number" for a
Ticket with the same Company
Ticket: pk: 1, number: 1, company: XYZ
Ticket: pk: 2, number: 1, company: Acme
Ticket: pk: 1, number: 2, company: XYZ
unique_
Apologies, I wasnt sure which bit of the tutorial you where at. I
think I see now the problem. Did you just stop reading after you
entered the last bit of code in views.py?
"""Reload the page. Now you'll see an error:
TemplateDoesNotExist at /polls/"""
So index.html is in /home/me/Templates/poll
I fully understood that and I thought it was implied in that I said I
was working with the tutorial I would have that file created. You only
asked where my template dir was directed to and that I put urls.py in
my reply, I would have put this in there if you had requested. Here it
is. Now, as far a
You see, what I tried to explain in the last message, my friend was
that index in 'polls.views.index') doesnt point the url polls/ to the
index.html but to the function you are suppose to create in the
views.py file in your app directory.
Your view.py file (inside your poll app folder)should look
On Oct 21, 10:39 am, Steve Holden wrote:
> REST, however, has a fairly rigid one-URL-one-action structure
Obligatory REST nitpick: REST maps URIs to resources, not actions.
In HTTP, the HTTP methods specify the action to perform.
(REST as described by Fielding also has nothing whatsoever to say
The index.html file is in the right location, what worries me is that
the template loaders are showing that they are loading nothing. In all
the other qustion in the google groups here that referenced an isssue
with templates not loading, their traceback had something like unable
to find documnet a
> You could try something like:
>
> args = iter(args) # may need args.__iter__() in earlier Pythons?
> for func in args:
> arg = next(args) # may need args.next() in earlier Pythons?
> ...
>
> > if func in list_of_allowed_funcs:
> > func(arg)
> > return Ht
http://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users
This'll do the trick. ;o)
Shawn
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To
> Well, like I said, I haven't tested that particular regex. But it
> should be possible to write a regex that does work.
it turns out your regex works fine:
print re.search(r'^((\w+)/(\d+)/)+$', 'fries/4/frobs/9/areas/
2/').group(1)
Django uses groups() instead of group(1), for whatever reason
On 10/21/2010 2:24 PM, ringemup wrote:
> #urls.py
> #note: untested regex, but a regex should be able to do this
> url('^((\w+)/(\d+)/)+$', 'myview', ...)
>
Oops. I omitted to point out (though the OP picked it up) that a
repeated group in a regex only leaves behind its last match in the match
ob
On 10/21/2010 2:24 PM, ringemup wrote:
> You can't do something like this?
>
> #urls.py
> #note: untested regex, but a regex should be able to do this
> url('^((\w+)/(\d+)/)+$', 'myview', ...)
>
> #views.py
> # note: this is pseudocode
> def myview(request, *args, **kwargs):
> # iterate through
Well, like I said, I haven't tested that particular regex. But it
should be possible to write a regex that does work.
If Django's dispatcher chokes on subpatterns, then just use the ^(.+)$
approach and split it yourself in the view, then iterate. Either way,
you shouldn't have to call multiple f
Where is your template_dirs in settings.py pointed too?
If you can post your urls.py.
Looking at the tutorial again,
(r'^polls/$', 'polls.views.index'), means that the url 'polls' will
serve the index function in the views.py file inside your polls app.
Your index.html should lie inside the top l
> url('^((\w+)/(\d+)/)+$', 'myview', ...)
Actually, no, that's only giving the last two matches:
(u'areas/2/', u'areas', u'2')
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
> You can't do something like this?
> url('^((\w+)/(\d+)/)+$', 'myview', ...)
Ah, I started with ^(.*)$ , and put the split on the inside. I will go
with your + pattern, because it checks for trivial errors at the
correct level.
--
You received this message because you are subscribed to the Goo
I've just finished patching django.contrib.auth.User to use one of
reverie's UUIDFields (http://gist.github.com/374662) as it's primary
key.
It's mostly been pleasantly straightforward, but I was slightly
puzzled by the need for the patch below, which requires the filter to
explicitly address the
You can't do something like this?
#urls.py
#note: untested regex, but a regex should be able to do this
url('^((\w+)/(\d+)/)+$', 'myview', ...)
#views.py
# note: this is pseudocode
def myview(request, *args, **kwargs):
# iterate through args two at a time
for func, arg in args:
if func in
I searched the posts for this, but I couldn't find my issue. I am
getting TemplateDoesNotExist at /polls/ when after adding the
index.html, but the template loaders show no directory being loaded.
My traceback is here http://dpaste.com/261308/. Thanks for the input.
--
You received this message b
> REST, however, has a fairly rigid one-URL-one-action structure which is
> ideally suited to Django's URL dispatch. The only way to get what you
> want is to layer another dispatching service atop Django's. I don't
> think you can do it with urlconfs alone.
knp. The point of urlconf is to adapt a
If you have to ask, you don't want to do it.
There is another solution that allows for essentially identical
business logic - store the card number with your gateway.
Authorize.net provides Customer Information Manager. Quantum Gateway
provides "quantum vault". Last time I looked paypal/google
Thanks. I will try the quotes for now. I am just building a prototype
now. Will quickly move to django form library.
-G
On Thu, Oct 21, 2010 at 8:17 PM, Thomas Guettler wrote:
> Hi,
>
> please try this:
>
>
> BTW, I would use the form library of django. It helps you to reduce
> bugs and ist ea
On Oct 21, 4:31 am, David De La Harpe Golden
wrote:
>
> Hmm. Appears to work okay for me (only tested Django-1.1.2), at least
> for instance.delete(). Perhaps you could try the operation directly at
> ./manage.py shell to see if there's anything odd going on:
>
Found the problem - I had overri
Thanks Russ,
I couldn't find it in the documentation, IMHO I think it's a little bit
hidden.
Best regards,
Miguel Araujo
2010/10/21 Russell Keith-Magee
> On Wed, Oct 20, 2010 at 10:33 PM, Miguel Araujo
> wrote:
> > Hi everyone,
> > Is there any way to force sqlite3 to use a file instead of RA
On 21/10/10 15:06, Chris Withers wrote:
> ...bt, why would dumpdata dump out something invalid?
Why indeed, but that doesn't mean it isn't.
(aside: of course the dumb regex match I suggested wasn't a proper date
parse either, you might want to try an actual parse in the loop - which
is what
On Oct 21, 4:01 pm, Lucasm wrote:
> It seems that the following does not work as expected:
>
> from django.db import models
>
> class MyManager(models.Manager):
> def create(self, *args, **kwargs):
> print "I am called!"
> return super(MyManager, self).create(*args, **kwargs)
>
It seems that the following does not work as expected:
from django.db import models
class MyManager(models.Manager):
def create(self, *args, **kwargs):
print "I am called!"
return super(MyManager, self).create(*args, **kwargs)
class OtherModel(models.Model):
pass
class
Hi,
please try this:
BTW, I would use the form library of django. It helps you to reduce
bugs and ist easy to use.
Rule of thumb: Don't access request.GET or request.POST. Give one of these
dictionaries to your form.
Thomas
Govindarajan wrote:
> First off I have to say that I am new to djan
try this:
Unquoted attributes are invalid HTML, and your browser is probably
treating the second half of the string as a separate attribute.
On Oct 21, 9:24 am, Govindarajan wrote:
> First off I have to say that I am new to django. I am trying to get a
> value from drop down select in HTML p
MySQL has a tool (mysqldump) that will output the contents of an
entire database to a SQL file that can then be loaded directly into
another database. Does Postgres not have anything analogous?
On Oct 11, 8:58 am, Chris Withers wrote:
> Hi All,
>
> I have an existing Django app with lots of da
On 10/21/2010 9:36 AM, Phlip wrote:
> On Oct 21, 5:26 am, Scott Gould wrote:
>
>> What's your use case? Are "nest, pest and rest" always "nest, pest and
>> rest" -- or could they be "rest, pest and nest", or "nest, best, and
>> rest"?
>
> Tx but - the use case is we can't do it like you said. C-
I'm very new to Python and Django so maybe someone can point me in the
right direction.
I have the following url.py line
url(r'^$', direct_to_template,
{'template':'index.html',
'extra_context':{'featured_actors': lambda:
User.objects
On 21/10/2010 14:48, David De La Harpe Golden wrote:
On 21/10/10 13:31, Chris Withers wrote:
...which is a little odd, given that the file was created by 'dumpdata'.
Any ideas?
Do you see any genuine wierdness in the format of any stringified
datetimes in the dumped json? Yes I know you've go
A quick question for anyone using the django-autocomplete ... where/how do I
style the display box used for displaying the "static" text?
Thanks!
Derek
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-
Alessandro
Sounds like you need a custom FilterSpec; see for example:
http://my.opera.com/curaloucura/blog/2009/02/17/custom-filter-on-django-admin
On Oct 21, 11:06 am, Alessandro Ronchi
wrote:
> Is it possible to change the list_filter in admin to show only items that
> have related values?
>
>
On 21/10/10 13:31, Chris Withers wrote:
> ...which is a little odd, given that the file was created by 'dumpdata'.
> Any ideas?
>
Do you see any genuine wierdness in the format of any stringified
datetimes in the dumped json? Yes I know you've got 132 megs, but I
don't mean check totally manuall
Sandro,
it's obviously a good thing to do when using non-ASCII characters *in
your code*. The problem is that this exception on my system showed up
whenever the mimetypes.guess_type method was called, even if it is the
only line of cod in source file (except the import line) and there are
no non-AS
On 21/10/2010 14:06, Jeff Green wrote:
When I was using loaddata I found out that if I did not have a True or
False value for any boolean fields, I would have an issue loading the
data. Once, I set the value for any records to True or False I was
successfully able to use loaddata. Hope that helps
On Oct 21, 5:26 am, Scott Gould wrote:
> What's your use case? Are "nest, pest and rest" always "nest, pest and
> rest" -- or could they be "rest, pest and nest", or "nest, best, and
> rest"?
Tx but - the use case is we can't do it like you said. C-:
The point is a REST path that can go arbitra
I have my doubts that csrf protection won't allow me, in that case I'd
like to discuss how to circumvent that fact (if it's the correct way
to do it) or which other kind if changes should I do to fullfill my
needs.
Thanks in advance.
--
You received this message because you are subscribed to the
First off I have to say that I am new to django. I am trying to get a
value from drop down select in HTML part. This value has spaces in it.
However, when I retrieve it in the view code only the text up to the
first space gets retrieved. Is there a to retrieve the whole string
with all the spaces p
When I was using loaddata I found out that if I did not have a True or False
value for any boolean fields, I would have an issue loading the data. Once,
I set the value for any records to True or False I was successfully able to
use loaddata. Hope that helps
On Thu, Oct 21, 2010 at 7:31 AM, Chris
On 11/10/2010 14:03, Shawn Milochik wrote:
One way would be to use the dumpdata command to export everything, change your
settings to point to the new database, then loaddata to restore.
Okay, so I'm using buildout and djangorecipe for my deployment.
On the postgres-backed server, I did:
bin/
What's your use case? Are "nest, pest and rest" always "nest, pest and
rest" -- or could they be "rest, pest and nest", or "nest, best, and
rest"?
If they're set in stone; that is, it's always nest, followed by pest,
followed by rest, then it's easy enough to just parameterize the url:
'/nest
On Oct 21, 8:59 am, easylancer wrote:
> I want to create s many to one in the users model so that a account
> can contain many users. How do i do this since User model exists in
> django core?
Create a userprofile model with a OneToOne relationship with User, and
give that a foreign key to Accoun
To use unicode characters, I put on the top of source file: -*- coding:
utf-8 -*- and before any string I put an "u", like: u"My unicode string". On
templates, I save the file as utf-8.
There's no workaround, only code.
2010/10/21 PureVirtual <1min...@gmail.com>
> For people who might have the m
On Oct 21, 12:47 pm, Franklin Einspruch
wrote:
> In my database there are tables for ArtworkImage, Artwork, and Artist.
> Every ArtworkImage belongs to an Artwork, and every Artwork belongs to
> an Artist.
>
> class Artist(models.Model):
> directory = models.CharField(max_length=128) # this is
Thumbnail si not working.
On Thu, Oct 21, 2010 at 2:48 PM, Kenneth Gonsalves wrote:
> On Thu, 2010-10-21 at 14:44 +0300, Ekin Yalgın wrote:
>> The path is correct, because python gives no error and creates the
>> tables about the easy_thumbnails. Model adds the image to the its
>> directory. Ther
The quoting trick worked well. Thank You
Chris
>>> Ian 10/20/10 2:48 PM >>>
On Oct 20, 8:20 am, "Christopher Conover"
wrote:
> Hello,
>
> I am using Django's multiple database support to connect to an existing
> Oracle database (10g). I do not have control of the schema nor do I have any
>
On Thu, 2010-10-21 at 14:44 +0300, Ekin Yalgın wrote:
> The path is correct, because python gives no error and creates the
> tables about the easy_thumbnails. Model adds the image to the its
> directory. There is no problem, if you ask this, else i didn't
> understand what you meant. Thanks again.
In my database there are tables for ArtworkImage, Artwork, and Artist.
Every ArtworkImage belongs to an Artwork, and every Artwork belongs to
an Artist.
class Artist(models.Model):
directory = models.CharField(max_length=128) # this is a lowercase
version of the artist's name
...
class Ar
The path is correct, because python gives no error and creates the
tables about the easy_thumbnails. Model adds the image to the its
directory. There is no problem, if you ask this, else i didn't
understand what you meant. Thanks again.
On Thu, Oct 21, 2010 at 2:39 PM, Kenneth Gonsalves wrote:
>
On Thu, 2010-10-21 at 14:34 +0300, Ekin Yalgın wrote:
> Thank you but it didn't work Do we need add something to templatetags
> folder? I am saying this, because with django-thumbnail extension,
> http://bitbucket.org/winsmith/django-thumbnail/wiki/Home
> when i add thumb.py to templatetags folder
Thank you but it didn't work Do we need add something to templatetags
folder? I am saying this, because with django-thumbnail extension,
http://bitbucket.org/winsmith/django-thumbnail/wiki/Home
when i add thumb.py to templatetags folder it is working with
it is working. It is creating a new file
On 21/10/10 08:22, shacker wrote:
> Thanks David, but I'm not sure I'm getting this. I've added that line
> to the class, but it doesn't give me cascade delete behavior (I can
> still delete a row and the comments linked to it remain in the db). Is
> there something else I need to do?
Hmm. Appe
On Thu, 2010-10-21 at 14:24 +0300, Ekin Yalgın wrote:
> Sorry it is thumb = ImageField ...
then what you have done is correct
--
regards
Kenneth Gonsalves
Senior Associate
NRC-FOSS at AU-KBC
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To p
Sorry it is thumb = ImageField ...
On Thu, Oct 21, 2010 at 2:21 PM, Ekin Yalgın wrote:
> It is something like this
>
> class Project(models.Model):
> avatar = ImageField(upload_to='images')
>
> On Thu, Oct 21, 2010 at 2:16 PM, Kenneth Gonsalves wrote:
>> On Thu, 2010-10-21 at 14:11 +0300, Eki
Solved my own problem. User's clocks were set ahead so the Internet
Explorer (pinnacle of stupid design) expired the cookie instantly.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroup
It is something like this
class Project(models.Model):
avatar = ImageField(upload_to='images')
On Thu, Oct 21, 2010 at 2:16 PM, Kenneth Gonsalves wrote:
> On Thu, 2010-10-21 at 14:11 +0300, Ekin Yalgın wrote:
>> I assumed that iimage filed is named thumb. Must it be 'photo'
>> certainly?
>
>
On Thu, 2010-10-21 at 14:11 +0300, Ekin Yalgın wrote:
> I assumed that iimage filed is named thumb. Must it be 'photo'
> certainly?
you can name it anything you want - what is the name you have given it
in the model?
--
regards
Kenneth Gonsalves
Senior Associate
NRC-FOSS at AU-KBC
--
You receiv
For credit card companies to allow you to do that sort of behaviour,
your site must be PCI-DSS compliant, and your site/code will be
audited once a year (at your cost) by your acquiring bank. The
requirements for PCI-DSS compliance are widely available on the
internet.
Due to these reasons, unless
I assumed that iimage filed is named thumb. Must it be 'photo' certainly?
On Thu, Oct 21, 2010 at 2:01 PM, Kenneth Gonsalves wrote:
> On Thu, 2010-10-21 at 13:53 +0300, Ekin Yalgın wrote:
>> It is a good extension, but in template page,
>>
>>
>> {% load thumbnail %}
>> ...
>>
>
> assume tha
For people who might have the mentioned problem here is a simple
solution (at least a workaround): rename non-ASCII keys from the
registry path "HKEY_CLASSES_ROOT\MIME\Database\Content Type" (in my
case there were three of them starting with "аудио" and "видео").
Source of solution (in Russian):
h
Hello all,
Regarding Django and e-commerce - has anyone ever built a site that
stores credit card information for delayed processing? In other
words, the customer makes a purchase, but the Web site "remembers"
their information for future purchases?
If you have, what special considerations are t
On Thu, 2010-10-21 at 13:53 +0300, Ekin Yalgın wrote:
> It is a good extension, but in template page,
>
>
> {% load thumbnail %}
> ...
>
assume that the image field is named photo:
will work (note it is not object.photo.url)
--
regards
Kenneth Gonsalves
Senior Associate
NRC-FOSS at AU-
It is a good extension, but in template page,
{% load thumbnail %}
...
...
this combination is not working for me. What should i do you think?
On Tue, Oct 19, 2010 at 8:02 AM, Kenneth Gonsalves wrote:
> On Mon, 2010-10-18 at 19:26 +0530, Venkatraman S wrote:
>> Look into django-photologue
I want to create s many to one in the users model so that a account
can contain many users. How do i do this since User model exists in
django core?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us..
Hi,
I'm trying to get some filter for my admin page on a ManyToManyField.
When I add it to the list_filter of the model admin, the filtering
works like a charm. But this is not what I want: I'd like to invert
the results, i.e. I want that only those list entries remain that do
NOT have this extern
At a client site, I have occasionally had her customers complain that
they get cookie errors when they try to log in, even though they have
cookies enabled and they are able to log in to other sites. Clearing
out their cookies doesn't seem to help. Most (95-99%) users can log
in fine. The affect
Thanks
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this gro
Is it possible to change the list_filter in admin to show only items that
have related values?
I have a foreignkey to a model but I want to show only filters that points
to non-empty sets.
Thanks in advance, best regards.
--
Alessandro Ronchi
http://www.soasi.com
Hobby & Giochi
http://hobbygio
I need to be able to both:
(a) prefilter dropdown lists for existing entries (to avoid loading unneeded
data);
(b) allow pre-filtered dropdown lists to change dynamically at runtime
I have, for example:
class Country(models.Model):
id = models.CharField(max_length=2, primary_key=True)
nam
On Oct 19, 9:42 am, David De La Harpe Golden
wrote:
>
> So to get deletion behaviour you want, you need to define a reverse
> generic relation back to comment on your model for django's deletion
> cascade to follow the deletion in the generic case. On your own models,
> this is of course straig
75 matches
Mail list logo