On Saturday, July 24, 2010 10:26:46 am commonzenpython wrote:
> hey guys, im making a form, and im having a problem with the
> models.TextField() , when used it displays the text field correctly,
> but it allows for the text field to be stretched, is there a way to
> set a maximun width and height
On Saturday, July 24, 2010 11:14:27 am john wrote:
> I am following the django book. I am to the point of setting up my
> datebase. It instructs me to enter the command:
>
> python manage.py sqlall.
>
> When I do I get no output, and no errors. It just returns me to the
have you added your ap
Still need help!
I have User, Project tables, assigned through the intermediate M2M
table Votes which has extra Date (date of the vote made) field.
In the template I want to list all the projects and order them by
votes count. I can order_by('-votes') because I'm using related_name
attribute, but
Hi all,
I am following the django book. I am to the point of setting up my
datebase. It instructs me to enter the command:
python manage.py sqlall.
When I do I get no output, and no errors. It just returns me to the
>>>.
python manage.py validate returned
0 errors found.
I also tried the sy
Hi all,
I am following the django book. I am to the point of setting up my
datebase. It instructs me to enter the command:
python manage.py sqlall.
When I do I get no output, and no errors. It just returns me to the
>>>.
python manage.py validate returned
0 errors found.
I also tried the sy
> Ah - this is possibly the source of confusion. Django's Routers can
> shard to different databases, but not to different tables in the same
> database.
>
> Why do you want to shard into different *tables*? The usual
> interpretation of sharding (at least, the usual interpretation that
> *I'm* fa
hey guys, im making a form, and im having a problem with the
models.TextField() , when used it displays the text field correctly,
but it allows for the text field to be stretched, is there a way to
set a maximun width and height for it ?
--
You received this message because you are subscribed to
Hi there,
Im a new django guy here so apology if i am asking a stupid question.
Can you comma separate an integer field in the admin interface
for example
1 -> 1
10 -> 10
100 -> 100
1000 -> 1,000
I know intcomma does that but how do you do that in admin
Thanks very much in advance
--
You rece
On Sat, Jul 24, 2010 at 9:03 AM, Andy wrote:
> I'm trying to shard my database horizontally.
>
> In another thread (http://groups.google.com/group/django-users/
> browse_thread/thread/2748cdf205b5cf3e/
> e8fe5087748d3c43#e8fe5087748d3c43) I was told it's best to use the
> Database Router to implem
I can't comment on US based hosting companies but i played with EC2 last
weekend. IMO, as
Greg pointed out, EC2 is too pricey if it is not sure how much capacity you'll
need in the
future and how you will scale out. Check
http://calculator.s3.amazonaws.com/calc5.html for
their calculator. If you
Thank you!
On Fri, Jul 23, 2010 at 1:44 AM, Daniel Roseman wrote:
> On Jul 22, 9:55 pm, Jonathan Hayward
> wrote:
> > Would it make sense to make
> >
> > A: A TextEmailField which does not have the ForeignKey, and
> >
> > B: A model which has the foreign key and a TextEmailField
> >
> > as a bet
I'm trying to shard my database horizontally.
In another thread (http://groups.google.com/group/django-users/
browse_thread/thread/2748cdf205b5cf3e/
e8fe5087748d3c43#e8fe5087748d3c43) I was told it's best to use the
Database Router to implement horizontal sharding.
But I can't figure out how to u
I'd stay away from Amazon if like you said money is a concern.
Amazon web services are extremely overpriced. For the same amount of
money you'd be able to get much better performance by renting a
dedicated server or even a VPS.
Also if you're running databases then IO performance is critical. The
so I would just run an apache instance on the host? And on the Amazon
utilities, is it that complicated to set up? Could you give me some sort of
overview of what that would take? And if I did just do the apache instance,
would it be fast enough because it sort of does need to be fast and be abl
So I did get an email from shwetanka with code
that fixed the error (thanks shwetanka):
It seems that user is not getting authenticated and when you are
calling the function login(request, authenticated_user) Anonymous_user
is passed and hence this NotImplementedError is raised. Use
UserManager's
On Fri, Jul 23, 2010 at 4:29 PM, Tony Lambropoulos wrote:
> Well I am new to this, but with a push in the right direction I think i can
> set it up and i have a partner who knows a little more. We're looking for
> advice on good hosting sites and database servers that mesh well with Django
> and
Well I am new to this, but with a push in the right direction I think i can
set it up and i have a partner who knows a little more. We're looking for
advice on good hosting sites and database servers that mesh well with Django
and can expand well. How is slicehost? has anyone heard anything abou
You will need to find/hire a sysadmin if you can't do this yourself. We
looked into Amazon for our purposes and found their interface kludgy and
their documentation confusing rather than helpful. Also, I kept a server
running idle on Amazon for a month and it was more expensive than slicehost
($20
I have just about finished all the logic for my site. In short, I
need the site to be pretty fast and a good amount of database storage
with the possibility of getting more in the future if and probably
when I need it. Right now I am just testing my website on my computer
with Django, (mod_swgi)
Hi All,
I was thinking of creating a single point of entry to my webpage
through an app call "core" from there, depending on the url pattern,
it can pass the processing to different apps. how do i do that while
staying in the workflow of the framework?
--
You received this message because you ar
That's because list have no attribute "forloop". forloop is for use inside a
{% for ... %}
tag, where
{{ forloop.counter0 }}
works just fine.
On Fri, Jul 23, 2010 at 1:30 PM, ydjango wrote:
> I tried {{labels.forloop.counter0}} . It did not work. where labels
> is a list.
>
> --
> You re
I tried {{labels.forloop.counter0}} . It did not work. where labels
is a list.
--
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
dj
I have a form application built off of two models, one model is "event
information" and the other model is "registrant". I have a field in
"event information" called survey_open_flag that is a boolean field
that I'm trying to use as a switch (active/non active) in the Admin
tool to allow registrant
Thank you guys! I m going thru regexp :)
On Jul 23, 8:42 pm, Franklin Einspruch
wrote:
> Minor correction above: third example should read "one OR MORE digits
> stored as a value." But yes, urls.py works on regexes so you do need
> the basics. Good luck!
>
> Franklin
>
> On Fri, Jul 23, 2010 at 1
Minor correction above: third example should read "one OR MORE digits
stored as a value." But yes, urls.py works on regexes so you do need
the basics. Good luck!
Franklin
On Fri, Jul 23, 2010 at 11:38 AM, deepak dhananjaya
wrote:
> Thank you! It worked.. I have to get my basics of regular expre
Thank you! It worked.. I have to get my basics of regular expressions
rite!!
On Jul 23, 8:33 pm, Shawn Milochik wrote:
> You have three regular expressions. Two of them require digits, and
> one requires *only* /record/, with no additional arguments.
>
> So /record/john/ does not match any of tho
Regexes are tricky if you're new to them.
^record/$ matches 'record/'
^record/(\d{3})/$ matches 'record/, then three digits, then '/'
^record/(?P\d+)/$ matches 'record/', then one digit
stored as a value that can be passed to django, then '/'
Check this out:
http://www.regular-expressions.info
You have three regular expressions. Two of them require digits, and
one requires *only* /record/, with no additional arguments.
So /record/john/ does not match any of those.
Shawn
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
My URLS.PY
has
urlpatterns = patterns('',
(r'^record/$', 'phonebook.record.views.showlist'),
(r'^record/(\d{3})/$', 'phonebook.record.views.testrecord'),
(r'^record/(?P\d+)/$',
'phonebook.record.views.showRecord'),
#(r'^record/(?P\d+)/$', 'phonebook.record.views.showlist'),
# Ex
On Jul 19, 10:52 am, Ryan Osborn wrote:
> Hi,
>
> I am trying to create a form in which a user can fill out details and
> it will create a parent object and multiple child objects, much like
> the django admin does when you set up a model to be a tabuar inline in
> the admin.py.
>
> I think I ha
I don't really have enough context (or, at the moment, time) to do a
serious review. It may well be that you are safe. iri_to_uri () looks
like the key, since you almost certainly will trip over a value that isn't
eligible as a url (clients cut and paste from MS Word and equivalent
all the time).
This may or may not be the only issue, but it's not really reasonable
to have more than one url pattern with the same "name" ("link-prod").
This can't be "reverse()"ed to come up with one url path one time and
the other on other occasions, and who knows but that the generic views
url generation use
Can anyone help with this?
Thanks,
Ryan
--
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.co
Hi,
I'm having problems with running ./manage.py test. When it is running
some South migrations I'm getting this error: ValueError: Cannot
import the required field 'tagging.fields.TagField'. I don't know how
to fix it.
-Martin
--
You received this message because you are subscribed to the Goog
That probably means that the regex url pattern you defined for
feed_user in your urls.py file doesn't allow '.'
Hope that helps,
Alex
On Jul 22, 11:11 am, Roboto wrote:
> I didn't expect this to occur, but when I attempt
> {% url feed_user entry.username %}
>
> I will get a 500 error when the us
Thomas,
MEDIA_URL isn't always defined in templates. Make sure that you have
the MEDIA context preprocessor installed:
http://docs.djangoproject.com/en/dev/ref/templates/api/#django-core-context-processors-media
Also, when you actually render the template, are you using
RequestContext? If you are
Hi Thomas, as you can see in django docs (http://
docs.djangoproject.com/en/dev/ref/settings/#setting-MEDIA_URL)
MEDIA_URL --> it's just the url where your media (static content)
resides.
it can be a complete url (http://) or a reference to your
current domain (/media/)
So in the templates
Your authentication has failed somehow and authenticate() has returned
an AnonymousUser object.
calling .save() on this raises the exception
(code =
http://code.djangoproject.com/browser/django/trunk/django/contrib/auth/models.py#L399
)
On 22 July 2010 23:33, Jeff wrote:
> Hi,
>
> I get a Not
On Wed, Jul 21, 2010 at 10:33 AM, Michael wrote:
> Is there a way to search on the Foreign Key's __str__ representation
> in admin views? I have the FK listed in the search_fields but it fails
> to find it.
>
>
First, you probably want to be implementing __unicode__ methods for your
models, not _
I have inherited a project with a tight deadline and I am lost for how
to proceed.
There are two tables: Canididates and Race.
The race table holds 145 different races with information about
precincts, winners of different stages of the race (primary, runoff,
gneral)
The Candidates table has 110
On Jul 23, 12:25 pm, Jonhoo wrote:
> There is probably an easy answer to this, but I have been scratching
> my head for a while now: I have two models, Category and Program in a
> one-to-many relationship. I want to list all categories, and all
> programs within each category. I pass Category.obje
Michale many thanks for your help.
I added your suggestions. But that did not change the django GET
request...
It still tries to load the file
http://127.0.0.1:8000/css/base.css
instead of
http://127.0.0.1:80/media/css/base.css
Maybe it helps mentioning that this is with the Development server
I just realized I could use dictsort in the template, but ideally I
would want to sort by two keys, not just one, so it would still be
good if someone had an idea as to how this could be done?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To p
Hello
I have a code like this:
class A(models.Model):
...
class B(models.Model):
a = models.ForeignKey(A)
...
Database router set DIFFERENT databases for reading for this classes
and allowing relations. B.objects.all() result:
SELECT ... FROM A_table LEFT OUTER JOIN B_table ON ... O
Sorry, I just noticed the 80/8000 ports. A better answer anyway would
be to use the media URL:
http://docs.djangoproject.com/en/dev/ref/settings/#setting-MEDIA_URL
-- Casey
On 07/23/2010 08:24 AM, Casey S. Greene wrote:
Maybe I am confused but I think the answer is to put
into the base tem
Maybe I am confused but I think the answer is to put
into the base template?
I believe he said that /media is serving the files.
-- Casey
On 07/23/2010 07:35 AM, Michael P. Soulier wrote:
On 23/07/10 Thomas said:
Hi I am trying to include a css file and I've tried this in
settings.py:
ME
On 23/07/10 Thomas said:
> Hi I am trying to include a css file and I've tried this in
> settings.py:
>
> MEDIA_URL = "http://localhost:80";
> MEDIA_ROOT = '/media/'
>
> I have an apache running there and navigating to http://localhost/media
> works fine.
> In my base template I have this:
>
>
On 23/07/10 Santiago Perez said:
> If you're using MySQL then this should work:
>
> models.User.objects.extra(where=["concat(first_name, ' ', last_name)=%s"],
> params=["John Test"])
>
> Not sure how portable the concat function is or what alternatives are there
> in other backends but shouldn't
is the purpose of execute_manager is same in all the django projects ?
if yes,then what it is and if no then do i have to see the complete
source code of django?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email t
Am 22.07.2010 09:41, schrieb Jonas Obrist:
Hello everyone
We here at Divio [1], the company behind the django-cms [2] are
currently looking for Django developers interested in either working
full time or on a freelance basis for us.
The quick and dirty details:
- You must be fluent in eithe
Hi everybody,
I have 3 models:
built-in User model,
class Project(models.Model):
author = models.ForeignKey(User, verbos_name=_('Author'),
related_name='projects')
title = models.charField(_('Title'), max_length=150)
class Vote(models.Model):
project = models.ForeignKey(Project, verbos
Hi I am trying to include a css file and I've tried this in
settings.py:
MEDIA_URL = "http://localhost:80";
MEDIA_ROOT = '/media/'
I have an apache running there and navigating to http://localhost/media
works fine.
In my base template I have this:
But it's not working as I hoped. So how can I
There is probably an easy answer to this, but I have been scratching
my head for a while now: I have two models, Category and Program in a
one-to-many relationship. I want to list all categories, and all
programs within each category. I pass Category.objects.all() to the
view, and in the view I run
Just wondering where you live ...
If you have rasonably good internet connectivity, I believe that
should be sufficient to become an expert in Python. There are many
free e-books, videos on Python on youtube, vimeo etc from the past
PyCons, Google Engg Edu videos etc.
Oreilly Safari online book s
Hello,
Has anyone tried using plupload with django?
On top of generally missing how to do it exactly (server side of
course), I'm also curious about whether I can prevent storing files in
the filesystem while uploading - i.e. use some in-memory files. I need
it because I don't keep any images on
55 matches
Mail list logo