Hello Russell
On Jul 16, 12:49 am, Russell Keith-Magee
wrote:
> Sure, this _could_ be done. You can write and install custom
> serializer - you just need to work out exactly how a random database
> object is realized as a JavaScript object. The existing serializers
> should give you a reasonabl
This seems like a simple question, but it's been bugging me for days
now. I have two models, Events and Categories, where Events has a FKF
to Categories. I'm using django-Agenda, an add-on that I've modified
with the categories model, so all the views/urls are perfect in every
other way except the
>Is syncdb supposed to fully sync the database to the model
>definitions?
syncdb does not do that. I also often got confused about syncdb, but
now I never forget that syncdb currently does not help propagate
_modifications_ to models to your database. If you add a new model or
delete an existing
After switching OFF firepy (!!!) everything works OK.
It seems to me that it's a firephp addon bug when it receives great
array of data.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
Joshua Russo wrote:
> This thought struck me most when I was going through the testing
> documentation, in the section regarding the testing of models. It
> seems to me that very little logic generally goes into the model
> classes. At least for me, I have far more logic in admin.py and
> views.py
1.Simply extend the User model by using UserProfile Technique
More details :
http://www.b-list.org/weblog/2006/jun/06/django-tips-extending-user-model/
2.You can also customize your authentication needs
More details :
http://groups.google.com/group/django-users/browse_thread/thread/c943
On Wed, Jul 15, 2009 at 8:33 PM, Ben wrote:
> Is syncdb supposed to fully sync the database to the model
> definitions? If so I would call this a bug.
You would need to delete the tables and run syncdb again to get it to
add any model level changes
OR
look up http://code.google.com/p/django-evo
I'm using the admin site. I noticed that I couldn't leave an
IntegerField empty even when I had "year = models.IntegerField
(blank=True)". I googled and found out I should set null=True as well.
I did this, ran syncdb, and it didn't fix the issue.
I am using sqlite3 with a temporary database. I r
Hopefully my last question on this,
How do I get back to the page with the form, perhaps with a "Thank
You" message, without having the POST still available if you hit
refresh.
I figured I'd use 'reverse' but not quite sure why it isn't
working ...
Here's where I am now:
#views.py
def record_de
thank you lan.
i solve the problem with your idea.
On Jul 15, 11:44 pm, Ian Kelly wrote:
> On Jul 15, 7:07 am, Karen Tracey wrote:
>
> > On Wed, Jul 15, 2009 at 4:18 AM, pho...@gmail.com wrote:
>
> > > the code of models:
> > > mgsyxs = models.DecimalField(decimal_places=-127, null=True,
>
Basically, you want to test anything that might break if another part
of the code is changed that interacts with it, might break if the
application takes an alternative flow (maybe finally hits the 'else'
of that if/else statement), or could possibly receive invalid input.
Unfortunately, t
Russ, this makes a lot of sense, thanks so much.
I'll give it a go now ...
d
On Jul 16, 10:49 am, Russell Keith-Magee
wrote:
> On Thu, Jul 16, 2009 at 8:36 AM, The Danny Bos wrote:
>
> > Any ideas on this one guys?
>
> > I gave up on it last night.
> > I feel way off ...
>
> Ok - some back
On Thu, Jul 16, 2009 at 8:36 AM, The Danny Bos wrote:
>
> Any ideas on this one guys?
>
> I gave up on it last night.
> I feel way off ...
Ok - some back tracking.
Your first approach (no forms) should have worked. The reason you
didn't get any errors is that your code is explicitly ignoring _al
Any ideas on this one guys?
I gave up on it last night.
I feel way off ...
d
On Jul 15, 11:33 pm, The Danny Bos wrote:
> Agreed, I should get used to using Forms.
> So I gave it a go, the new problem I have is out of my three fields,
> two need to be hidden and have values automatically ass
> I'm in the process of implementing testing (both doc tests and unit
> tests) though I'm having some conceptual difficulty. I'm not sure how
> far to take the testing. I'm curious what people concider an
> appropriate level of testing.
Uh oh, be ready for a huge thread. This is one of those une
I'm in the process of implementing testing (both doc tests and unit
tests) though I'm having some conceptual difficulty. I'm not sure how
far to take the testing. I'm curious what people concider an
appropriate level of testing.
This thought struck me most when I was going through the testing
doc
On Thu, Jul 16, 2009 at 3:12 AM, jfine wrote:
>
> Hi
>
> Django can, of course, serialize database objects into JSON:
> http://docs.djangoproject.com/en/dev/topics/serialization/
>
> I'd like to turn that JSON into JavaScript objects. I'd like, of
> course, a Formula object to be turned into a
Ya I was :-O
That article was immensely helpful.
Thanks for your help Almir.
Sincerely,
Sonal
On Jul 15, 2:54 pm, Almir Karic wrote:
> IMHO you are vastly over complicating things
> :),http://www.b-list.org/weblog/2006/nov/16/django-tips-get-most-out-gen...
> this should help you
>
> python/dj
IMHO you are vastly over complicating things :),
http://www.b-list.org/weblog/2006/nov/16/django-tips-get-most-out-generic-views/
this should help you
python/django hacker & sys admin
http://almirkaric.com & http://twitter.com/redduck666
On Wed, Jul 15, 2009 at 1:42 PM, Sonal Breed wrote:
>
>
Never mind.
If you wish to understand the regex stuff (and you really have to :),
read this tutorial:
http://www.regular-expressions.info/tutorial.html
On Jul 15, 2:50 am, theiviaxx wrote:
> awesome, thats exactly what i needed. im still trying to figure out
> regex stuff.
>
> Thank you!
>
--
Hello Almir,
Thanks for your comment. I added following in my wrapper view:
@login_required()
def story_index(request, username, d={}):
Stroy Index"""
d['this_user'] = user = get_model(User, username=username)
if not user: return find_user(username)
d["story_index"] = Story.objects.
On Wed, Jul 15, 2009 at 06:35:06AM -0700, LeeRisq wrote:
>
> So I'm hitting a beginner's snag here. I have six models that I need
> to contain essentially all the same attributes. I created a base class
> and then created the child classes respectively. Some of the child
> classes will contain ad
Good afternoon.
Here's the username field from the latest Django trunk's
django.contrib.auth.models module:
username = models.CharField(_('username'), max_length=30, unique=True,
help_text=_("Required. 30 characters or fewer. Alphanumeric characters only
(letters, digits and underscores).
Oops. Pressed the button too soon.
> Django can also, of course, serialize a whole database into JSON. A
> more ambitious task is to turn that JSON into a linked collection of
> database objects.
Should be JavaScript objects (of course).
--
Jonathan
--~--~-~--~~~--
I should add my django versions too
dev: 1.1 beta 1 SVN-11082
Deploy: 1.1 beta 1
On Jul 15, 12:12 pm, Some Guy wrote:
> Hi,
> I seem to have a problem where various contrib elements are throwing a
> template error "dict objects are unhashable"
> I'm seeing it in admin, comments, etc. Both on
Hi
Django can, of course, serialize database objects into JSON:
http://docs.djangoproject.com/en/dev/topics/serialization/
I'd like to turn that JSON into JavaScript objects. I'd like, of
course, a Formula object to be turned into an 'instance of the Formula
class'. (The quotes are because
Hi,
I seem to have a problem where various contrib elements are throwing a
template error "dict objects are unhashable"
I'm seeing it in admin, comments, etc. Both on my dev setup and
deployed.
The line of code always seems to be File "/Library/Python/2.5/site-
packages/django/utils/datastructur
I would make an wrapper view that sets up the queryset and calls the
generic view.
python/django hacker & sys admin
http://almirkaric.com & http://twitter.com/redduck666
On Wed, Jul 15, 2009 at 11:28 AM, Sonal Breed wrote:
>
> Hi all,
> I am using django.views.generic.date_based.archive_index
On Jul 14, 8:23 am, Benjamin Kreeger
wrote:
> I was using PostgreSQL at first, but then I found information about
> reading data across databases only with MySQL, so I'm using MySQL for
> the time being.
>
> Now, I don't have a database set for P1 yet because it's just
> displaying reStructured
Hi all,
I am using django.views.generic.date_based.archive_index in my url
patterns as below:
story_info_dict = {
'queryset': CareStory.objects.all(),
'date_field': 'date_created',
}
urlpatterns = patterns('',
..
(r'^story/index/?$',
'django.views.generic.date_based.archive_
I will keep you posted, Joost, on this issue...
On Jul 15, 2:43 am, Joost Cassee wrote:
> On Jul 14, 10:51 pm,SonalBreed wrote:
>
> > After I made TINYMCE_COMPRESSOR as False, I could get tinymce toolbar.
> > However, the style dropdown is showing empty, and there are couple of
> > other things
On Wed, Jul 15, 2009 at 12:56 PM, Fred
Chevitarese wrote:
> Record this !!! And put on Youtube for us!!! Whe´re in Brazil!!!
>
> Thanks! ;)
>
> 2009/7/15 Alex Gaynor
>>
>> PyOhio:
>> Dates: 25th - 26th July
>> More info: http://www.pyohio.org/Home
>>
>> Later this month will be the 2nd Python reg
Hi all,
Registration: Just a reminder that early-bird registration ends this
Sunday. The prices will increase around $80 after that (http://
www.djangocon.org/conference/pricing/).
Call for Proposals: The deadline for you to get your talk submissions
in is August 7th (http://www.djangocon.org/co
Record this !!! And put on Youtube for us!!! Whe´re in Brazil!!!
Thanks! ;)
2009/7/15 Alex Gaynor
>
> PyOhio:
> Dates: 25th - 26th July
> More info: http://www.pyohio.org/Home
>
> Later this month will be the 2nd Python regional conference in
> Columbus, OH. This year the conference will featur
PyOhio:
Dates: 25th - 26th July
More info: http://www.pyohio.org/Home
Later this month will be the 2nd Python regional conference in
Columbus, OH. This year the conference will feature two full days of
talks as well as sprints. There will be general web framework talks,
including one by Mark Ramm
On Wed, 2009-07-15 at 09:38 -0700, Caitlin Colgrove wrote:
> I have two instances of django running under apache. One in /portal
> and one in /beta/portal. They use two different code bases and two
> different databases, although some of the data is replicated between
> the two. If I am logged
I want to create a new type of field for django models that is
basically a ListOfStrings. So in your model code you would have the
following:
models.py:
from django.db import models
class ListOfStringsField(???):
???
class myDjangoModelClass():
myName = models.CharField(
I have two instances of django running under apache. One in /portal
and one in /beta/portal. They use two different code bases and two
different databases, although some of the data is replicated between
the two. If I am logged in to one Django instance it interferes with
the other. Presumably
On Wed, Jul 15, 2009 at 11:35 AM, Emily Rodgers <
emily.kate.rodg...@googlemail.com> wrote:
>
>
>
> On Jul 15, 4:19 pm, Emily Rodgers
> wrote:
> > On Jul 15, 2:46 pm, "Richard E. Cooke" wrote:
> >
> > > OK. Before I get flamed!
> >
> > > I neglected to search THIS group before I posted.
> >
> >
On Jul 15, 4:19 pm, Emily Rodgers
wrote:
> On Jul 15, 2:46 pm, "Richard E. Cooke" wrote:
>
> > OK. Before I get flamed!
>
> > I neglected to search THIS group before I posted.
>
> > So, I see some chatter about being able to instansiate a second DB
> > connector. Great.
>
> > Now, how about
Resolved.
In this method:
formset_funcionario = modelformset_factory
(Funcionario,formset=func_set,max_num=7,extra=1)
Django seems to create a new class dinamycally called: [name_of_model]
Form
In the case above, tha class created would be:
django.forms.models.FuncionarioForm
If I want th
On Jul 15, 7:07 am, Karen Tracey wrote:
> On Wed, Jul 15, 2009 at 4:18 AM, pho...@gmail.com wrote:
>
> > the code of models:
> > mgsyxs = models.DecimalField(decimal_places=-127, null=True,
> > max_digits=126, db_column='MGSYXS', blank=True) # Field name made
> > lowercase.
>
> > i appreciate
also sprach Shawn Milochik [2009.07.15.1722 +0200]:
> > Any reason why you can't do 'sudo -u otheruser bash -l' or even
> > 'sudo su
> > - otheruser'? Seems strange to be able to sudo to root, but unable to
> > sudo to a role account.
>
>
> No, I don't see a reason not to do it that way. I jus
On Wed, Jul 15, 2009 at 10:54 PM, Up2L8 wrote:
>
> Is there any way Ticket #10977 could get rolled up into the 1.1
> release?
>
> Using the intersection and union operators seems borked for some
> applications and it sounds like this should fix it.
I'll take a look tomorrow if I get time, but no
>
> Any reason why you can't do 'sudo -u otheruser bash -l' or even
> 'sudo su
> - otheruser'? Seems strange to be able to sudo to root, but unable to
> sudo to a role account.
No, I don't see a reason not to do it that way. I just can't directly
su to the other user due to the lack of a pas
On Jul 15, 2:46 pm, "Richard E. Cooke" wrote:
> OK. Before I get flamed!
>
> I neglected to search THIS group before I posted.
>
> So, I see some chatter about being able to instansiate a second DB
> connector. Great.
>
> Now, how about where the best examples of that are?
>
> And what impact
On Wed, 2009-07-15 at 10:38 -0400, Shawn Milochik wrote:
> I need to set up a one-click deployment from development to
> production. What tool(s) are currently best-of-breed in the Django
> community? Thanks in advance.
>
I use fabric, but its not exactly best of breed. It does the job quite
On Jul 15, 8:54 am, Up2L8 wrote:
> Is there any way Ticket #10977 could get rolled up into the 1.1
> release?
>
> Using the intersection and union operators seems borked for some
> applications and it sounds like this should fix it.
I guess I should mention that it seems that a workaround exists
I have a Model;
class Funcionario(models.Model):
nome = models.CharField(max_length=200)
email = models.CharField(max_length=100)
data_nasc = models.DateField('Data de Nascimento')
salario = models.FloatField()
observacao = models.CharField(max_length=500)
I have a ModelForm
Is there any way Ticket #10977 could get rolled up into the 1.1
release?
Using the intersection and union operators seems borked for some
applications and it sounds like this should fix it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed
I remember that there were some issues, but unfortunately I didn't
document how I resolved them :(
Juan Pablo
2009/7/14 Kevin :
>
> Thanks a lot Juan! It works fine on my machine. Would you be able to
> share your compilation steps?
>
> On Jul 14, 7:32 am, Juan Pablo Romero Méndez
> wrote:
On Wed, Jul 15, 2009 at 9:31 AM, joep wrote:
>
> I'm new to both python and django, so please excuse my ignorance if
> this is obvious. I have a tagged model which I would like to form a
> tag cloud. I am using the following
>
>t = Tag.objects.cloud_for_model(Post,
>filters=dict(
I need to set up a one-click deployment from development to
production. What tool(s) are currently best-of-breed in the Django
community? Thanks in advance.
The tool must be able to automate the following manual process:
1. Log into the production server via ssh, using a user ID which
requ
I'm new to both python and django, so please excuse my ignorance if
this is obvious. I have a tagged model which I would like to form a
tag cloud. I am using the following
t = Tag.objects.cloud_for_model(Post,
filters=dict(
blog__slug=blog_slug,
pub
I guess you can use the choices in the form that you´ve created!
class AuthorForm(forms.Form):
name = forms.CharField(max_length=100)
title = forms.CharField(max_length=3,
widget=forms.Select(choices=TITLE_CHOICES))
birth_date = forms.DateField(required=False)
Take a l
I have faced with interesting issue: I have some views which process
files (deleting them recursively or saving many files). When I upload
or delete many files response is not received by firefox ... I just
press "Upload files" (sumbit upload form) button, and nothing happens
with this page (but i
Sorry, I was little unclear above. I need to set the default for a
form.
--~--~-~--~~~---~--~~
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 uns
OK. Before I get flamed!
I neglected to search THIS group before I posted.
So, I see some chatter about being able to instansiate a second DB
connector. Great.
Now, how about where the best examples of that are?
And what impact, if any, does this have on the rest of Django?
My boss is star
So I'm hitting a beginner's snag here. I have six models that I need
to contain essentially all the same attributes. I created a base class
and then created the child classes respectively. Some of the child
classes will contain additional attributes to the base class, but the
rest only need what i
Agreed, I should get used to using Forms.
So I gave it a go, the new problem I have is out of my three fields,
two need to be hidden and have values automatically assigned from the
page they're on. This is freaking me out.
Now I have:
# forms.py
class RatingForm(forms.Form):
record = for
The answer is not jumping out at me, so I'm going to post it here in
case its a simple answer.
I want to access an existing DB on a remote server using Postgres. My
boss is not crazy about having Django "polluting" this existing -
large - db with its internal guts.
But I don't see how to specif
On Wed, Jul 15, 2009 at 4:18 AM, pho...@gmail.com wrote:
>
> Hi, all
>
> i have used the command 'manage.py inspectdb' to generate code of
> models.
> then i want to use the code to create dbtable in mysql, and i got
> errormessage:
>Traceback (most recent call last):
> [snip]
> File "C:\Pyt
Wiadomość napisana w dniu 2009-07-15, o godz. 12:24, przez R C:
> I would like to track the viewing history for users to my site to see
> which blog entries are being viewed by whom. And I would like to
> track the user who is viewing it *IF* they are logged in, otherwise I
> would like to ignor
Yes!! That will be good!!
hello gustavo!! I like your blog very much !!! ;)
Fred Chevitarese - GNU/Linux
http://chevitarese.wordpress.com
2009/7/14 Gustavo Henrique
>
> +1, too
>
> I thinks interesting record in video all about that.
> This important for consolidate the Django with all develope
You can set the default choice in the model like this.
SEARCH_CHOICES = (
('G', 'google'),
('Y', 'Yahoo'),
('L', 'Live Search'),
)
Now, your model will be set like this...
class anything(models.Model):
title = models.CharField(max_length = 80)
search_engine = models.CharFiel
On Jul 15, 10:27 am, veasna bunhor wrote:
> Dear All,
>
> I have spent 2 hours to search about how to use Datime Format and Comment
> Spacing in Django, but i still found it . Does anybody know how to do this ?
> Could you please tell me about that?
>
> Best regards,
>
> Veasna
http://docs.djang
On Jul 15, 9:14 am, luca72 wrote:
> Hello and thanks for your help.
> I think that i need context, i attach my test file:
>
> from django.shortcuts import render_to_response
> from off_bert.offerte.forms import RichiestaForm
> from django.http import HttpResponseRedirect
>
> def richiesta(request
Hi,
I would like to track the viewing history for users to my site to see
which blog entries are being viewed by whom. And I would like to
track the user who is viewing it *IF* they are logged in, otherwise I
would like to ignore the user field (see models below)
[models.py]
class Entry(models.
I think that django gae patch does not enable you to use django model
because gae does not use dbms on the backend.
On Wed, Jul 15, 2009 at 7:38 PM, Vishwajeet wrote:
>
> Hi,
>
> Thanks for the link I am using the helper but helper does not suggest
> anything about models other than just saying
On Jul 14, 10:51 pm, Sonal Breed wrote:
> After I made TINYMCE_COMPRESSOR as False, I could get tinymce toolbar.
> However, the style dropdown is showing empty, and there are couple of
> other things I would like to have, like spell checker and color.
> Have to go through tinymce docs, do u have
Hi,
Thanks for the link I am using the helper but helper does not suggest
anything about models other than just saying that you have to change
your model.
On Jul 15, 12:00 am, Matteo Rosati wrote:
> Hello friend,
> maybe you can consider using the Goole App Engine helper for Django.
>
> http://
Dear All,
I have spent 2 hours to search about how to use Datime Format and Comment
Spacing in Django, but i still found it . Does anybody know how to do this ?
Could you please tell me about that?
Best regards,
Veasna
--~--~-~--~~~---~--~~
You received this mess
for file in request.FILES.getlist('file'):
Topic is closed :)
--~--~-~--~~~---~--~~
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 f
Hi, all
i have used the command 'manage.py inspectdb' to generate code of
models.
then i want to use the code to create dbtable in mysql, and i got
errormessage:
Traceback (most recent call last):
File "C:\vincent\wd\django\mysite\mysite\manage.py", line 11, in
execute_manager(settings
Hello and thanks for your help.
I think that i need context, i attach my test file:
from django.shortcuts import render_to_response
from off_bert.offerte.forms import RichiestaForm
from django.http import HttpResponseRedirect
def richiesta(request):
if request.method == 'POST':
form
Hi! I'm trying to use http://www.djangosnippets.org/snippets/583/ and
getting an error 'str' object has no attribute 'name'.
It happens on this line:
logging.debug(request.FILES)
for file in request.FILES['file']:
filename = file.name
Using firepy ( logging.debug) I see this dictionary:
, ]
76 matches
Mail list logo