On Sunday, 16 October 2011 23:43:56 UTC+1, youpsla wrote:
>
> Hello,
> I'm new to Django and I've only a medium background in funtionnal
> programming in Python.
>
> I'm currently reading and working on the Django tutorial. I've few
> questions on a example of code because things are not so cle
Hi, I am new to Django AND PostgreSQL. I want to setup a PostgreSQL
backend.
I have created a database
createdb myproject
Then, as superuser in psql:
CREATE USER george WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE money TO george;
Then I added this info in settings.py
Bu
Hello i am progressing well on the tutorial here:
https://docs.djangoproject.com/en/1.3/intro/tutorial02/
however, I am stuck on Make the poll app modifiable in the admin.
I have created an admin.py file within my polls directory. with the
suggested code. However I keep getting this error ImportEr
"models" is a module that contains classes Model and CharField.
Person inherits from Model.
first_name and last_name are instances of CharField.
There's no functional programming here.
-WN.
On Sun, Oct 16, 2011 at 6:43 PM, youpsla wrote:
> 1 from django.db import models
> 2
> 3 class Person(
On Mon, 2011-10-17 at 03:00 -0700, Nico wrote:
> So I tried the command line:
>psql myproject george -W
> This prompted my for the password of george and then returned an
> error:
>psql: FATAL: Ident authentication failed for user "george"
find pg_hba.conf and change 'ident' to 'password
On Mon, Oct 17, 2011 at 11:00 AM, Nico wrote:
> Hi, I am new to Django AND PostgreSQL. I want to setup a PostgreSQL
> backend.
>
> I have created a database
> createdb myproject
> Then, as superuser in psql:
> CREATE USER george WITH PASSWORD 'password';
> GRANT ALL PRIVILEGES ON DATABASE
On Mon, Oct 17, 2011 at 11:58 AM, kenneth gonsalves
wrote:
> On Mon, 2011-10-17 at 03:00 -0700, Nico wrote:
>> So I tried the command line:
>> psql myproject george -W
>> This prompted my for the password of george and then returned an
>> error:
>> psql: FATAL: Ident authentication failed f
Thanks you 2 for your answers.
I think I've understood now. Again I apologize for the newby Python
question but I've read three times "Dive in Python" and it hasn't made
me thnigs clear. That's the reason why I've posted.
I thought there was a hierarchy like this models.Model.CharField
That
hello again, sorry for eventually annoying. But later in the Django
tutorial,
there is this code:
from django.conf.urls import patterns, include, url
.
urlpatterns = patterns('',
(r'^polls/$', 'polls.views.index'),
..)),
)
What I un
On Monday, 17 October 2011 12:04:41 UTC+1, youpsla wrote:
>
> Thanks you 2 for your answers.
>
> I think I've understood now. Again I apologize for the newby Python
> question but I've read three times "Dive in Python" and it hasn't made
> me thnigs clear. That's the reason why I've posted.
>
>
On Monday, 17 October 2011 12:18:00 UTC+1, youpsla wrote:
>
> hello again, sorry for eventually annoying. But later in the Django
> tutorial,
>
> there is this code:
>
> from django.conf.urls import patterns, include, url
> .
> urlpatterns = patterns('',
On Mon, 2011-10-17 at 12:04 +0100, Simon Riggs wrote:
> > find pg_hba.conf and change 'ident' to 'password' on the lines at
> the
> > end of the file
>
> Changing the rules in that way would break all existing connections.
I do not understand
>
> You should always use md5 rather than password, s
On Mon, Oct 17, 2011 at 7:05 AM, Daniel wrote:
> Hello i am progressing well on the tutorial here:
> https://docs.djangoproject.com/en/1.3/intro/tutorial02/
> however, I am stuck on Make the poll app modifiable in the admin.
>
> I have created an admin.py file within my polls directory. with the
>
Thanks for the feedback!
I have edited /etc/postgresql/8.4/main/pg_hba.conf and added the
following line at the bottom:
local myproject george trust
(by the way; I am using a Kubuntu workstation)
It should give me local access using a trusted connection for the
databa
Have you sent a HUP signal to the postmaster or restarted the service
since making those changes?
Regards, Phil
On 17/10/2011 13:45, Nico wrote:
Thanks for the feedback!
I have edited /etc/postgresql/8.4/main/pg_hba.conf and added the
following line at the bottom:
local myproject george
Hello Omer --
I believe you have two options. You could use the AttributeValue
approach I described earlier. You could add features to take care of
'data types' and the like. The work may be quite tedious, but it has
the advantage of not being clever. In other words, you would do the
work to imple
Yes, I have restarted the service.
Of course :)
Nico
On Oct 17, 2:47 pm, Philip Mountifield
wrote:
> Have you sent a HUP signal to the postmaster or restarted the service
> since making those changes?
>
> Regards, Phil
--
You received this message because you are subscribed to the Google Group
thanks for your reply.
1. yes i am following the tutorial explicitly.
2. yes, i haven't removed it.
3. yes using 1.3
I did manage to find a workaround though. I simply executed the
commands via the python shell (run-> shell).
the error i was getting was when i went to run->run module. Can you
plea
The order of configuration in the file is also important; on a
connection attempt the records are examined sequentially. Perhaps you
problem lies here if you just added the new details to the bottom of the
config file.
Regards, Phil
On 17/10/2011 14:01, Nico wrote:
Yes, I have restarted the
Thank you very much!
I choose the first option for now.
If I have any problems, I will write them here
On Oct 17, 2:51 pm, Stuart wrote:
> Hello Omer --
>
> I believe you have two options. You could use the AttributeValue
> approach I described earlier. You could add features to take care of
> 'd
Even better, use django-form-utils!
https://bitbucket.org/carljm/django-form-utils/overview
Cheers,
AT
On Sun, Oct 16, 2011 at 7:57 PM, Mario Gudelj wrote:
> I think you need this
> https://docs.djangoproject.com/en/dev/topics/forms/modelforms/
>
>
> On 16 October 2011 18:24, bovender wrote:
Hello Daniel
thanks for your answer and sorry for my english. As you said, it could be a
problem of translation !!! :-)
I really appreciate your help, I'm doing lots of progress in my python
object programming curve ...
OK, then to be sure how Python works ... let see this code:
1 from django.
Hi Phil,
Thank you!
I moved the line a few positions up and it now works.
All people who responded to my question, thanks very much!
Kind regards,
Nico
On Oct 17, 3:08 pm, Philip Mountifield
wrote:
> The order of configuration in the file is also important; on a
> connection attempt the recor
Did either of you read the OPs email? He is not looking for forms...
OP:
There is nothing built in, but you can easily iterate through a
model's fields, they are all available in the _meta attribute on a
model instance:
>>> u = User.objects.get(id=1)
>>> for field in u._meta.fields:
... print
Hey,
I have a FormView and a Form. I want to put in some logic that will
take place before the Form is even displayed. I know I could throw
this in a decorator and wrap the View but there's only a couple of
views that need this specific functionality and didn't see a need for
a whole new decorator
Maybe some place inside get(), dispatch() or get_form_kwargs()?
Cheers,
AT
On Mon, Oct 17, 2011 at 3:57 PM, Kurtis wrote:
> Hey,
>
> I have a FormView and a Form. I want to put in some logic that will
> take place before the Form is even displayed. I know I could throw
> this in a decorator an
Hi folks,
I have been looking around all over to find a high quality DMS to plug into
my Django application. I'd like to be able to upload and download .docx or
.pdf files, edit the metadata, and also be able to serve the content of the
files on the front end. If the plugin allows for preview, tha
Thanks for the response!
Where can I get more guidance about how to use the website you
reference? I go there and see nothing about django and am unsure how
to proceed.
On Oct 14, 1:07 pm, aledr wrote:
> You can get it directly from the Python repo[1].
> Otherwise you need python-distribute or
Dear Folks,
I am using a number of subdomains for my website and decided to create
a custom url tag and try as shown on
http://stackoverflow.com/questions/3461806/django-subdomains-and-mod-rewrite-urls-messing-up-on-deployment-setups
My template tag being used in my template like this:
About
Us
It is the openSUSE software repos site. You can check how to usage it here[1].
Choose the correct folder from the openSUSE version you are using.
[1]: http://en.opensuse.org/SDB:Zypper_usage
On Mon, Oct 17, 2011 at 4:37 PM, Andrew Johnson
wrote:
> Thanks for the response!
>
> Where can I get mor
Ok, sorry I thought I was starting to understand it a little better,
but now I think I took a step backwards, so if it is ok with you let's
step back and take it a step at a time.
So, my first step is wondering if I really need a manager or not??
I was thinking from your first response to me that
class FarmersMarket(ModelForm):
class Meta:
model = models.FarmersMarket
exclude = ('location',)
def clean(self):
place, (lat, lng) = _g.geocode(self.cleaned_data['address'])
self.cleaned_data['location'] = Point(lng,lat)
return self.cleaned_data
Here's m
Hello,
I have following view in views.py:
.
class ArticleArchiveIndexView(ArticleViewAbstractClass,
ArchiveIndexView):
queryset = Article.live.all()
date_field = 'pub_date'
context_object_name = 'articles_list'
paginate_by = ARTICLES_PER_PAGE
..
How do I use 'paginate_by'
Thanks again for your reply. On the django installation guide is
says:
A Django package is available for openSUSE Linux in the openSUSE
Build Service. The current package can be installed by subscribing to
the devel:languages:python project and typing 'zypper install python-
django'. Alternati
In case of openSUSE 11.3, as root type:
zypper ar
http://download.opensuse.org/repositories/devel:/languages:/python/openSUSE_11.3/devel:languages:python.repo
In case of openSUSE 11.4, as root type:
zypper ar
http://download.opensuse.org/repositories/devel:/languages:/python/openSUSE_11.4/deve
Ok. page_obj is what I need.
On Oct 17, 10:34 pm, Andriyko wrote:
> Hello,
>
> I have following view in views.py:
> .
> class ArticleArchiveIndexView(ArticleViewAbstractClass,
> ArchiveIndexView):
> queryset = Article.live.all()
> date_field = 'pub_date'
> context_object_name = '
I've done it before using a post save signal, although I had lat,lng = NULL
in the schema so that differs from your request here. After saving, I would
issue an update. I forget why I didn't use a pre-save signal.
Aside from signals, you may also be able to use a model field default with a
calla
Ah! Thanks everyone for the feedback.
The reason I was confused may be stupid, but FWIW here it is: Underneath the
Search input area, there's a popup menu that says "Django 1.3". My eye went
over there and registered the 1.3 without figuring out that it refers to
what is being searched in. I re
Actually, it seems like the search popup should focus on whatever
documentation you're looking at. So, instead of saying "Django 1.3" I would
argue that it should have said "Django Dev". That would mean that it was
defaulting to the use it would probably be put to, and simultaneously tell
the r
Dear all,
I'm having a problem doing the section "LayerMapping" of the GeoDjango
official Tutorial [1].
After creating load.py in the world directory. Leaving as specified:
"the transform keyword set to False because the data in the shapefile
does not need to be converted -- it's already in WGS84
Hi everyone,
I got a surprise when using treemenus, where it worked really well on
my local dev (django-server) , but disappeared on live (nginx using
mod_wsgi on debian).
I installed the treemenu app, imported the data (menu items) from a
datadump of my local app, and uploaded the templates that
On Tue, Oct 18, 2011 at 1:57 AM, Kurtis wrote:
> Hey,
>
> I have a FormView and a Form. I want to put in some logic that will
> take place before the Form is even displayed. I know I could throw
> this in a decorator and wrap the View but there's only a couple of
> views that need this specific fu
Hi,
With the new way of handling static files in Django 1.3 what would
happen if two applications have identically named static files? E.g.:
|___ app1
| | static
| |_ styles.css
|___ app2
| static
|_ styles.css
T
The first app in INSTALLED_APPS wins, just like how name conflicts with
templates work.
You can use the following command to check what static file gets picked:
https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#findstatic
--
You received this message because you are subscribed to t
Just a simple thought, if you'd prefer to avoid JavaScript/client-side
scripting entirely, and only code using Python. It might be an idea
to look at Pyjamas to generate your page. It technically uses Ajax,
but from the programmers point of view, it feels more like coding a
desktop application.
Just a general tip for folks. Always namespace your template and static
files to avoid problems.
Toodle-loo..
creecode
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://group
This is rather common when moving over from the dev server to a
production environment. Sometimes it can be tricky to map all the
static URL paths in the web server serving the static content, such as
the JavaScripts which treemenus uses. I haven't used treemenus
before, but from past experiences
Hello everyone!
I have been using Django for about a year now and feel that I want
to take my experience to the next level. I have created a few website
using Django to test my skills, although not for anyone specific. I
am creating this thread as I will like to ask current Django website
deve
48 matches
Mail list logo