Hi guys,
Trying to teach myself a bit about creating custom fields (for both
forms and models) for Django. Starting off with a somewhat contrived
storing a street address in one field.
I seem to have gotten the model field working, as I can run python
manage.py shell and successfully fill out th
On Sun, Nov 29, 2009 at 8:30 PM, Gloria wrote:
> Here's the line from my model:
> class UserProfile(models.Model):
>some other fields...
>privacy_options = models.ManyToManyField(PrivacyOption,
> blank=True, null=True, db_table = 'usr_privacy_selection')
>
> Here's the bit from my form:
>
Here's the line from my model:
class UserProfile(models.Model):
some other fields...
privacy_options = models.ManyToManyField(PrivacyOption,
blank=True, null=True, db_table = 'usr_privacy_selection')
Here's the bit from my form:
class ModifyProfileForm(forms.Form):
some other fields..
Karen, restarting apache worked instantly. I'm not used to having to
do that. Normally it's the browser caching the old page that drives
you crazy. Fortunately I have some aliases for starting, stopping,
restarting etc that make this really painless.
The idea of using the dev server has a lot o
On Sun, Nov 29, 2009 at 6:45 AM, caliman wrote:
> Hi!
>
> In my project most of my views requires the user to be logged in but
> in some i don't for example the login view wich only displays a login
> form. When I'm going to the login form as a non logged in user I get
> an error:
> "Error was: '
On Sun, Nov 29, 2009 at 8:06 PM, Guze wrote:
> I have spent time
> looking at the django project tutorials, but they are pretty tied into
> the development webserver which I cannot run since I have to browser
> (or monitor or keyboard) connected to that hardware server.
You do not need a monit
You simply can't call request.user.get_profile() on an anonymous user.
caliman wrote:
> Hi!
>
> In my project most of my views requires the user to be logged in but
> in some i don't for example the login view wich only displays a login
> form. When I'm going to the login form as a non logged in u
I've been using the book "Python Web Development with Django" to get
up to speed on this amazing framework. Although I'm new to python, I
have plenty of experience with other languages like C and lately PHP,
as well as running my own linux servers using apache2 for websites.
I've been flipping pag
在2009-11-30 09:36:28,"Steve Holden" 写道:
On Sun, Nov 29, 2009 at 8:33 PM, Nick Arnett wrote:
On Sun, Nov 29, 2009 at 4:01 PM, Steve Holden wrote:
Not at all. The client will typically use an "ephemeral" port (one it obtains
by saying to its local TCP layer "gimme a port number, I don'
On Sun, Nov 29, 2009 at 9:18 PM, digicase wrote:
> I received a good email From Remi at WF which told me all I needed to
> know. The outage was unacceptable but hopefully lessons have been
> learned.
Do you mind sharing what he said? I'd be curious to know if any new
controls have been put into
On Nov 29, 5:52 pm, Atamert Ölçgen wrote:
> On Saturday 28 November 2009 07:28:27 digicase wrote:> I am sad to report
> this, as up until now I had complete faith and
> > trust in them. That has been lost over the past few days. Support were
> > not transparent, status updates rare and vague.
>
>
On Sun, Nov 29, 2009 at 8:33 PM, Nick Arnett wrote:
> On Sun, Nov 29, 2009 at 4:01 PM, Steve Holden wrote:
>
>
>>
>>> Not at all. The client will typically use an "ephemeral" port (one it
>> obtains by saying to its local TCP layer "gimme a port number, I don't care
>> what it is"). The connect
On Sun, Nov 29, 2009 at 4:01 PM, Steve Holden wrote:
>
>
>> Not at all. The client will typically use an "ephemeral" port (one it
> obtains by saying to its local TCP layer "gimme a port number, I don't care
> what it is"). The connection (any connection) has *two* endpoints, and the
> port numb
In the doc (http://docs.djangoproject.com/en/dev/ref/models/options/
#order-with-respect-to) it is mentioned that order_with_respect_to
marks an object as "orderable" with respect to a given field.
What exactly does that mean? Can someone give me an example of how
this could be used?
The doc's
Hi Tim,
Thanks for the response.
My Test model:
class Test(models.Model):
text = models.CharField(max_length=50)
image = models.ImageField(upload_to="upload/test_images/",
blank=True, null=True)
#also tried with FileField
def __unicode__(self):
return self.text
c
On Sun, Nov 29, 2009 at 6:56 PM, Nick Arnett wrote:
>
>
> On Sun, Nov 29, 2009 at 2:24 PM, The New Hanoian wrote:
>
>> Hi,
>>
>> I'm learning Django. In the tutorial i find that the client IP address
>> can be retrieve through HttpRequest.META["REMOTE_ADDR"]. But I
>> couldn't find a way to retri
On Sun, Nov 29, 2009 at 2:24 PM, The New Hanoian wrote:
> Hi,
>
> I'm learning Django. In the tutorial i find that the client IP address
> can be retrieve through HttpRequest.META["REMOTE_ADDR"]. But I
> couldn't find a way to retrieve the client port number. I think it
> should be obvious. Am I m
For in-page charts, I use flot, as Javier suggested. I plan to look
into pycha based on Skylar's suggestion, though. There is no need for
client-side chart drawing with my use case.
On Nov 25, 3:31 pm, Javier Guerra wrote:
> reportlab allows you to generate PDFs, which can be as high quality as
This /is/ outside the scope of Django.
"Database normalization" and "Database design" are the google query
you're looking for to learn more about this, though. Here are some
links that may steer you in the right direction:
http://en.wikipedia.org/wiki/Database_normalization
http://databases.about
On Mon, Nov 30, 2009 at 1:45 AM, Joshua Kramer wrote:
> Hello,
>
> What document or example code should I consult to learn how to tap
> into admin.py to output specific data based on a model? For example,
> if I have an application and a handful of models, if I do "admin.py
> sqlall" then I get o
Hi,
I'm learning Django. In the tutorial i find that the client IP address
can be retrieve through HttpRequest.META["REMOTE_ADDR"]. But I
couldn't find a way to retrieve the client port number. I think it
should be obvious. Am I missing something?
--
You received this message because you are sub
Hi,
I tried to post this two hours ago, but it did not show up. So sorry
if this is the second copy.
I use "checkboxed" ModelMultipleChoiceField w/o any problems. Here is
a snippet:
class PictureForm(ModelForm):
tags = ModelMultipleChoiceField(queryset=Tag.objects.all(),
widget=CheckboxSelec
I have ModelMultipleChoiceField working for me OK, but I am not sure I
understand your question. Could you be a bit more specific?
This is a snippet from my code which may or may not help:
class PictureForm(ModelForm):
tags = ModelMultipleChoiceField(queryset=Tag.objects.all(),
widget=Checkbo
On Sun, Nov 29, 2009 at 9:52 AM, Gloria wrote:
> Thanks for the response. I am trying to do this on the server side.
> Here is more detail.
> I am initializing it to all unchecked checkboxes in my forms.py.
> Then, in my view, I am trying to have HTML generate a "checked" value
> for certain chec
On Nov 28, 11:07 pm, Preston Holmes wrote:
> My expectation was that it was possible to 'stream' a response back to
> a browser from a view, where that response is 'trickled' onto the
> browser page. I had done this a while back in cherrypy and it worked
> as expected.
>
> a super simple view d
This is probably outside Django. But I am checking out since I am building
it with Django.
I am building a specialized closed group social networking web site for
special set of medical practitioners. Idea for my client is to be a mini-
LinkedIn of sorts for this small community.
We want to captu
Fantastic! I think I was overthinking my problem. Thanks a lot!
On Nov 29, 10:36 am, rebus_ wrote:
> BTW here is an example:
>
> When you click this
> link:http://en.wikipedia.org/wiki/Fragment_identifier#Processing
>
> your browser will open uphttp://en.wikipedia.org/wiki/Fragment_identifierp
Thanks for the response. I am trying to do this on the server side.
Here is more detail.
I am initializing it to all unchecked checkboxes in my forms.py.
Then, in my view, I am trying to have HTML generate a "checked" value
for certain checkboxes, based on some user data I received in that
view.
Ho
Hello,
What document or example code should I consult to learn how to tap
into admin.py to output specific data based on a model? For example,
if I have an application and a handful of models, if I do "admin.py
sqlall" then I get output that consists of SQL statements used to
generate the model i
I'm trying to install app engine with django 1.1 on windows.
When launching the app engine I'm getting the following error:
http://slexy.org/view/s21oLrbkHh
The steps I do are:
1.) Create new app via launcher
2.) Copy my code (Which is empty django project)
My main.py code: http://slexy.org/view/
On Sat, Nov 28, 2009 at 3:05 PM, Gloria wrote:
> Hi all,
> I've spent way too much time getting trying to get this widget to work
> the way I am envisioning.
> In the forms, I want to initialize it, but in the view I need to
> determine which boxes are checked.
> Has anyone done this without writ
BTW here is an example:
When you click this link:
http://en.wikipedia.org/wiki/Fragment_identifier#Processing
your browser will open up
http://en.wikipedia.org/wiki/Fragment_identifier page and then scroll
down to the Processing title without wikipedia even knowing that you
specifically want to s
I have seem to overcomplicated and I hope i understand your question right :)
You just need to render the template with your titles and content (i
guess you call it resources).
If you have a link such as link anywhere
on your site, once you click on it you should return HttpResponse and
render yo
2009/11/29 Kai Timmer :
> 2009/11/29 rebus_ :
>> Have you tried using fieldsets [1] in you ModelAdmin. Also you can
>> override save_model method on the ModelAdmin to set values for some
>> object attributes when the object is being saved [2].
>
> I don't see how I can use fieldsets to achieve this
did you named your project as 'mysite' and your app as 'polls' ...
also make sure __init__.py exists inside directory polls (manage.py should
create that ).
hope that helps,
--Vardhan
On Sun, Nov 29, 2009 at 7:12 PM, Baba Samu wrote:
> Hi,
>
> Following the tutorial when i have "python mana
I do not know how to do this in admin,
but in your own form do this
peter = article( author = "Peter" )
myform = TheFormClass ( instance = peter )
hope that helps,
--Vardhan
On Sun, Nov 29, 2009 at 8:41 PM, Kai Timmer wrote:
> 2009/11/29 rebus_ :
> > Have you tried using fieldsets [1]
Hmm, still not clear. My url is simply this:
(r'^resources/$', views.resources)
I have read that I need to use HttpResponseRedirect to make use of
#anchor tags. Is this not the case?
Thanks for your help!
On Nov 29, 8:38 am, rebus_ wrote:
> 2009/11/29 Andy :
>
>
>
>
>
> > I have a model name
2009/11/29 rebus_ :
> Have you tried using fieldsets [1] in you ModelAdmin. Also you can
> override save_model method on the ModelAdmin to set values for some
> object attributes when the object is being saved [2].
I don't see how I can use fieldsets to achieve this. I thought with
the fieldsets I
Hi,
You mentioned that you could have used a m2m between Connector and
Cable, but it sounded that you opted out. I could be wrong, but to get
the desired report to display, I think you may need to revisit your
models.py and use the "_set" used in m2m relationships.
_mario
On Nov 28, 11:50 pm,
I am using the Google Visualization API myself, it's pretty nice. I
wrote a blog post with a little how to:
http://www.bolhoed.net/blog/using-the-google-visualization-api-in-django/
However, I also used FusionCharts in the past and that's got my vote
too :)
On Nov 25, 9:07 pm, "S.Selvam" wrote:
>
2009/11/29 Andy :
> I have a model named Articles with title and content fields. Each
> page of my site should display a list of the titles, linked with
> anchor tags to the corresponding area of the Resources page which
> displays all the titles and content. I am having trouble figuring out
> ho
2009/11/29 Kai Timmer :
> Hello,
> I'm new to django, so this question may look a bit stupid, but I
> couldn't find the information in the documentation.
>
> I have a pretty simple model which looks like this:
> class article(models.Model):
> headline = models.CharField(max_length=140)
> newsentr
Thanks Karen yet again.
Am I right in thinking that this cannot be a symetrical arrangement
ie:
connector can access values from cable(s)
and
cable can access values from connector(s)
It does not appear to be possible to put a ManyToManyField in both the
"parent' models, because one must be decl
Hi,
Following the tutorial when i have "python manage.py sql polls" i get
error message "No module named polls"
I have modified settijng.py to.
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'mys
Hello,
I'm new to django, so this question may look a bit stupid, but I
couldn't find the information in the documentation.
I have a pretty simple model which looks like this:
class article(models.Model):
headline = models.CharField(max_length=140)
newsentry = models.TextField()
pub_date = m
On Saturday 28 November 2009 07:28:27 digicase wrote:
> I am sad to report this, as up until now I had complete faith and
> trust in them. That has been lost over the past few days. Support were
> not transparent, status updates rare and vague.
I have been following web44 issues from RSS and it sur
I have a model named Articles with title and content fields. Each
page of my site should display a list of the titles, linked with
anchor tags to the corresponding area of the Resources page which
displays all the titles and content. I am having trouble figuring out
how to pass the #title info.
We're using AnyChart. It is similar to Fusion Charts in that it is an
XML data source that is rendered on the client side with a Flash SWF.
http://www.anychart.com
I don't think AnyChart has a free version, so you'll have to look into
the licensing arrangements to see if it is worth it for you
Hi Karen,
thanks for investigating...
I solved the problem.
There were 2 reasons:
- php code non passing correct encoded POST
- urllib.unquote_plus not working as expected
and not for last that the raw_post_data is not decoded and a POST var is...
(my blindness)
Thanks again for your help.
-- H
Hi!
In my project most of my views requires the user to be logged in but
in some i don't for example the login view wich only displays a login
form. When I'm going to the login form as a non logged in user I get
an error:
"Error was: 'AnonymousUser' object has no attribute 'get_profile'" The
error
On Nov 28, 11:15 pm, "R. Gorman" wrote:
> I've got a real stumper. Well, a stumper for me; I'm hoping someone
> has some insight. Here's the view I'm calling:
>
>
> games = Game.objects.all()
> return render_to_response('season_schedule.html',
> {games:"object_list"},context_instance = Re
2009/11/28 John Leith :
> I have a problem with the CSRF framework, and i'm just checking here
> to see if anyone else ran into this problem and hopefully found a
> solution. Here is my problem:
>
> I have a login form on the base template of my site. The home page is
> just a flatpage. My login pr
We started playing with FusionCharts, they have a free version which
is pretty slick. It's flash based, and not sure about the printing
aspect yet. It's generated with some XML and an SWF file.
J
On Nov 25, 12:07 pm, "S.Selvam" wrote:
> Hi all,
>
> This is my first post here andi am new to dj
Me too, I'm not having any issues. I just installed on 10.6 by
downloading 1.1.1 and running the install command sudo python setup.py
install and no issues. After install I run django-admin.py --version
and it shows 1.1.1
You'll need to give us more info to help.
Are you using sudo? What versi
I suspect that the query isn't being executed, cause you're not
accessing any elements?
have you tried to print games and see what comes out?
passing {games:"object_list"} seems like it should make sense, but
since I'm not an expert on Python or django, I'd imagine that the
"object_list" isn't be
55 matches
Mail list logo