So my questions are simple:
What are your opinions on the best methodologies and practices for
developing django apps and projects?
What sort of planning do you do for an application or project?
What development techniques do you use to help conceptualize an
evolving project/app?
For example:
Hi,
I'm fairly new to Django and unittest and I seem to be having a
problem getting manage.py to execute all of my tests. I can only get
it to execute one test at a time by specifying the test method. When I
just specify the TestCase class expecting it to execute all of the
test methods, it
Hi everyone,
I git cloned django friends from the github url provided. Then I installed
it with "sudo python setup.py install".
I also added "friends" to the INSTALLED_APPS.
That all went fine. However running syncdb gave me this error:
$ python manage.py syncdb
Skipping creation of
I've got a view that returns a generic list. It contains the following
fields:
school, wins, losses, pf, pa, rating
I want to add a field called rank that assigns the values 1 through
whatever for each of the records returned. Is this possible using the
templating engine or do I have to write
Thanks, Sid; I'll try it.
On Oct 17, 7:57 am, Sid wrote:
> I guess you're using SQLite as your database. It's a file permission
> error.
>
> If you're on linux try "chmod 777 test.db" to change the file
> permissions. And also!!, keep in mind that the directory that the
I have a .97 app that I'm trying to migrate to 1.1.
The current hangup is that forms that were generated by
generic.create_update were using oldforms under the covers and
automatically put the class="vDateField" in place that let the
javascript do it's magic and make the calendar selection
Hi,
I am having difficulty getting fastcgi on apache 2 working on my
personal centos 5.3 computer.
I have been trying to get this to work for 21 days.
May I have help?
--
I do the following.
service httpd restart
[r...@localhost mysite]# ./manage.py runfcgi method=threaded
On Sat, Oct 17, 2009 at 1:42 PM, Raashid Malik wrote:
> I have a custom page e.g home and i want to have login functionality on this
> page. I m using django registration module for django login and
> registrations process. Now i m totally blank on how to implement this. Plz
>
I would really want to add some sort of filtering to that
http://img.skitch.com/20091017-mfs2mbhbuudk2rgquium1bu61d.png
On Sat, Oct 17, 2009 at 10:00 PM, Oleg Oltar <oltarase...@gmail.com> wrote:
> I tried to do it. It works really nice.
>
> I wonder how can I query all a
I tried to do it. It works really nice.
I wonder how can I query all articles related to the current one in a
view... Need some examples.
Also currently I see all articles in a listbox...And as far as I have more
then 200 in the database it's quite hard to select something. Maybe its
possible
I have a custom page e.g home and i want to have login functionality on this
page. I m using django registration module for django login and
registrations process. Now i m totally blank on how to implement this. Plz
help
Thanks,
Raashid Malik
Hi gang,
I know that Django do not support stored procedures/function, but is
here still a chance to handle this stuff in Django?
I found this http://www.djangosnippets.org/snippets/272/, have somebody
experience with this?
Thanks for advices,
cheers Tom.
--
Tom
On 17 oct, 16:01, rvandam wrote:
> I started with a parent template with a menu included. The links in
> the menu are relative. This works fine for statical template pages,
> but things go wrong when i add dynamic pages. For example a page with
> forms only works from a
On 17 oct, 17:59, hao he wrote:
> with the follow code/config,one request lead to view function was
> execute twice。
>
> --
> template:
>
If that's copy-pasted from your code
On 17 oct, 17:45, Oleg Oltar wrote:
> Hi
>
> I am trying to create a model for Article site. I want to link each article
> with 3-5 related articles, so what I am thinking of is creating code this
> way:
>
> class Article (models.Model):
> # Tiny url
>
On 17 oct, 15:26, David wrote:
> Finally I solved it, and my first suspicion of me being to stupid
> proved to be true.
> I've put my url-settings in the projects-url-file, instead of the
> app's.
Don't feel stupid - we all do this kind of mistakes, and sometimes
even
On 16 oct, 11:09, David wrote:
> > The "interesting discussion" was actually a practical example of a
> > setup that is known to work and really helps avoiding typos.
>
> Of course I included your suggestion before I was replying.
Sorry to ask but since you didn't mention
I've had that problem when a stylesheet import in my document head
used an empty string for the path -- the browser called the same URL
as for the document in an attempt to import the stylesheet.
On Oct 17, 11:59 am, hao he wrote:
> with the follow code/config,one request
with the follow code/config,one request lead to view function was
execute twice。
--
url config:
url(r'^ader/basic/(?P[0-9]+)/
$',ader_basic,name='ad_ader_basic'),
with the follow code/config,one request lead to view function was
execute twice。
--
url config:
url(r'^ader/basic/(?P[0-9]+)/
$',ader_basic,name='ad_ader_basic'),
Hi
I am trying to create a model for Article site. I want to link each article
with 3-5 related articles, so what I am thinking of is creating code this
way:
class Article (models.Model):
# Tiny url
url = models.CharField(max_length = 30, unique=True)
is_published =
Thanks for the suggestion, I'm vaguely familiar with lazyness, and I
think at the moment my template tag is actually ok. It just returns a
queryset of the latest objects for a particular model to the context.
I was just surprised to see debugging output from the template tag
when as far as I was
Hi David,
It sure is getting clearer! So the only 'dirty way' to get the path shorter
in the template tag would be to make them available in the project package
(or app package), which indeed sounds like complications in the long run.
The more I think of it, the name-tag on the views does
I started with a parent template with a menu included. The links in
the menu are relative. This works fine for statical template pages,
but things go wrong when i add dynamic pages. For example a page with
forms only works from a subdirectory like /forms/ and al my relative
links dont work
Finally I solved it, and my first suspicion of me being to stupid
proved to be true.
I've put my url-settings in the projects-url-file, instead of the
app's.
However, now I can sleep again :)
Thanks everybody for looking into this, and at least I've learned
about clean setting-files!
I had a dim memory about this and found this link
http://www.objectmatter.com/vbsf/docs/maptool/ormapping.html which
describes three
ways (which as I recall are the standard ways) to map an object
hierarchy onto relational tables.
None of the ways seem very pretty but as Kurt says there is
Finally I solved it, and my first suspicion of me being to stupid
proved to be true.
I've put my url-settings in the projects-url-file, instead of the
app's.
However, now I can sleep again :)
Thanks everybody for looking into this, and at least I've learned
about clean setting-files!
Hi Gerard,
Views and not found by the template loader but the the PYTONPATH..
For "project.myapp.views.customer_edit", it finds a project package in
your PYTHONPATH and follow the path up to "customer_edit" function.
Just using "customer_edit" is a shortcut for the same thing.
"customer_edit" is
Hi David,
Thanx for the feedback. The keyword in your sentence below would be *only* i
assume. Meaning if not named explicitly, there's no way to get the reverse
lookup to work (with the brief notation)?
Still makes me wonder where the template loader gets it's information from
to be able to
Hi,
You can use {% url customer_edit customer.id %} only if customer_edit
is declared as the name of view in urls.py.
See http://docs.djangoproject.com/en/1.1/topics/http/urls/#id2 for more details.
David
On Sat, Oct 17, 2009 at 11:10 AM, Gerard wrote:
>
> Hi All,
>
>
Hi,
Have you installed all the dependancies listed in the README file and
declared the django apps in your settings.py?
Note that the project is now hosted on github. You may want to grab
the lastest version there.
David
On Fri, Oct 16, 2009 at 8:18 PM, lafada
Hi Thierry,
The actual url used (and working) is: http://192.168.1.81:8000/customer/2/edit
Without the end slash.
Gerard.
Thierry wrote:
> Hi,
>
> Could it be that you are missing trailing slashes in customer add/edit/
> delete url patterns?
> E.g try:
> (r'^customer/(?P\d+)/edit/$',
Try setting the SESSION_COOKIE_DOMAIN setting to something like ".mysite.com
"
So, in settings.py
SESSION_COOKIE_DOMAIN = ".mysite.com"
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
Great. Sorry for sending this twice. I thought it got deleted so
I sent it again. Looks like it was delayed for ~2 days : (
But I'm still greatful for any advice : )
On Oct 17, 2:19 pm, nausikaa wrote:
> Hi
>
> I'm writing a web interface where users (in groups with
Hi,
Could it be that you are missing trailing slashes in customer add/edit/
delete url patterns?
E.g try:
(r'^customer/(?P\d+)/edit/$', 'customer_edit'),
instead of:
(r'^customer/(?P\d+)/edit$', 'customer_edit'),
Thierry.
On 17 oct, 14:12, Gerard wrote:
> Hi Boyombo,
>
>
Hi
I'm writing a web interface where users (in groups with different
rights) can login and view and edit db entries.
At the moment the authentication functionality is in
myproject/
auth.py
The authenticate method in auth.py does ldap authentication.
Now my question:
Would it be better to
Hi Boyombo,
The error I get when using {% url customer_edit customer.id %} is:
NoReverseMatch at /customer/2
Reverse for 'customer_edit' with arguments '(2L,)' and keyword arguments
'{}' not found.
# The project url.py:
from django.conf.urls.defaults import *
urlpatterns = patterns('',
I guess you're using SQLite as your database. It's a file permission
error.
If you're on linux try "chmod 777 test.db" to change the file
permissions. And also!!, keep in mind that the directory that the DB
file is should also be writable. So do a chmod on the dir as well to
test it out.
-Sid
Hi,
I've this admin.py:
from chessemail.GAME.models import Game
from django.contrib import admin
class GameAdmin(admin.ModelAdmin):
list_display = ('id', 'white', 'black', 'time_days_W',
'time_days_B', 'move_game', 'last_move_W', 'last_move_B', 'is_active')
Hi Gerard,
can you what is your url conf like and the error message you get?
On Oct 17, 10:10 am, Gerard wrote:
> Hi All,
>
> I've been trying to figure out why this works:
>
> {% url project.myapp.views.customer_edit customer.id %}
>
> And this does not:
>
> {% url
On Oct 15, 5:13 pm, bruno desthuilliers
wrote:
> On 15 oct, 18:28, ringemup wrote:
>
> > I don't think I've seen the two-function technique used much, if at
> > all.
>
> To be true, I never saw it anywhere except in some of my own code. But
> I
Hi,
I did not see any section of Django documentation related to attaching
managers to models outside of model definition.
My current case is a manager defined in a separate module (long story
short: to avoid circular imports), that I expected to attach to a
model with a naive statement:
Hi All,
I've been trying to figure out why this works:
{% url project.myapp.views.customer_edit customer.id %}
And this does not:
{% url customer_edit customer.id %}
I could go for url() in my patterns and decouple view and pattern name, but
is it not possible to tell the template loader
Thanks Javier,
This is the perfect translation of the SQL I came up with.
I was almost there, but just afraid of having to play with 'extra' and
raw SQL.
Thierry.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
44 matches
Mail list logo