I'm generating html forms from models using ModelForm. When I do
something like :
>>> article = Article.objects.get(pk=1)
>>> form = ArticleForm(instance=article)
the generated form doesn`t have a hidden field for the primary key.
Why? What`s the best way to add it?
--~--~-~--~~-
Oh.
Boy do I feel stupid.
Thanks for all your help. I'll try to be less careless next time.
On Oct 22, 8:43 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Tue, 2008-10-21 at 23:33 -0700, guruyaya wrote:
> > This is actually worse
>
> You mean top-posting? Yes, it's a terrible habit and y
> HI all,
>
> I've just starting using django and am really impressed. In my simple
> app I want to retrieve a single "article" from a db and then display
> it broken into reasonable length pages (either based on word count or
> a specific markup in the text). I'd really appreciate any pointers
On Oct 22, 9:07 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> > HI all,
>
> > I've just starting using django and am really impressed. In my simple
> > app I want to retrieve a single "article" from a db and then display
> > it broken into reasonable length pages (either based on word coun
Thanks,
added a new attribute. Someone already told me about the limited
functionality of syncdb and alternative methods.
Once again thanks very much!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gro
oh right, cool. Thanks a million. so after splitting like you suggest I
could use pagination?
On Wed, Oct 22, 2008 at 9:10 AM, Daniel Roseman <
[EMAIL PROTECTED]> wrote:
>
> On Oct 22, 9:07 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> > > HI all,
> >
> > > I've just starting using django
a. Can template tags take arguments (not a string)
{% formatDateTime_5 value %}
where value is a variable
time data did not match format: data=value fmt=%Y-%m-%dT%H:%M:%S+
b. Can template tags take objects as arguments.. tat is if the above
is possible..
Regards,
~ramyak/
--~--~-~-
Hi Ramyak,
> a. Can template tags take arguments (not a string)
> {% formatDateTime_5 value %}
> where value is a variable
> time data did not match format: data=value fmt=%Y-%m-%dT%H:%M:%S+
Yes.
>
> b. Can template tags take objects as arguments.. tat is if the above
> is possible..
Yes.
I have recently changed the layout of my code. Putting all my apps
into an apps sub-directory to make things a bit cleaner. Basically the
same layout as
http://code.djangoproject.com/browser/djangoproject.com/django_website/apps
To run my tests I have to go into the apps sub-directory and run it
I am probably turning blind.. but I am still not able to figure out
why string "value" is being passed instead of value "value"
I have the following template
{% for value in list %}
{%
formatDateTime_5 value %}
Awesome.. Worked.. Thanks !!
~ramyak/
On Oct 22, 3:52 pm, bruno desthuilliers
<[EMAIL PROTECTED]> wrote:
> n 22 oct, 12:14, ramya <[EMAIL PROTECTED]> wrote:
>
> > I am probably turning blind.. but I am still not able to figure out
> > why string "value" is being passed instead of value "value"
>
On Wed, Oct 22, 2008 at 12:30 PM, Brandon Taylor
<[EMAIL PROTECTED]> wrote:
>
> The error is:
> Reverse for '' with arguments '()'
> and keyword arguments '{}' not found.
...
> I see there is an closed ticket: http://code.djangoproject.com/ticket/8571.
> I have cleared out all of my .pyc files as
n 22 oct, 12:14, ramya <[EMAIL PROTECTED]> wrote:
> I am probably turning blind.. but I am still not able to figure out
> why string "value" is being passed instead of value "value"
http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#passing-template-variables-to-the-tag
class Forma
On Oct 20, 2008, at 12:22 PM, M Godshall wrote:
> Is anyone familiar with a django or python tutorial that shows how
> to implement
> some kind of file upload progress bar? Ideally I'd like to use
> jquery, but I'm open to anything at this point. Any links or code
> examples would be greatly
Brandon Taylor wrote:
> I see there is an closed ticket: http://code.djangoproject.com/ticket/8571.
> I have cleared out all of my .pyc files as suggested, but I'm still
> getting the template error. Can anyone offer any advice?
I had a similar problem which was resolved after I had cleared `url
Hello Gerard,
Thank you so much for your suggestion. I have tried working in the
direction suggested by you.
The next step of difficulty that I find is that there are lot of
materials available on the internet in this regard but I could not
find some really good working examples and tutorials wi
PonasNiekas wrote:
> I'm about to write an app, which is going to do long running (~1 to
> ~60 minutes) calculations (meanwhile, the user who triggered the
> calculation will get message like "calculation in progress" or smth).
>
> I'm wondering what is the right place or best practice to do such
Hi,
I am trying to make a view function to get the posted values and
make some comparison (if x.value >= y.value)..
where x is the model that I got it's values from the post
and y is the other model .
example:
def comp(request):
form = ItemForm()
if request.method=="POST":
for
On Oct 20, 2008, at 8:11 AM, truebosko wrote:
> What is happening: The custom upload handler works, data is being
> sent, the session is being set WITHIN the handler but when I call the
> function from Javascript to fetch the progress (or even from a simple
> manual GET) it does not return anythi
jrivero wrote:
> Is possible obtain the comments of django.contrib in reversed order?
>
> In old version:
> {% get_free_comment_list for workgroups.workgroup group.id as
> comment_list reversed %}
>
> But in new version the templatetag not have control of this parameter.
> The method for order is
Hi
very cool..thx for putting this together. You have saved me some time!
Ian
--
http://ianlawrence.info
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
something like this?
(don't now if you want the form from an instance or not, but assumed so, as
you are trying to change data, not?)
def comp(request, obj_id):
instance = get_object_or_404(Model, obj_id)
form = ItemForm(instance=instance)
if request.method=="POST":
form = ItemForm(r
Well, I guess the question was just too stupid or unclear, but I have
figured it out now myself. For the benefit of Goolge users, here is
my answer. It is actually really easy:
class SearchForm(forms.Form):
names = forms.CharField(label= _("Names"))
places = forms.CharField(label = _("
On 22 oct, 14:11, Anurag <[EMAIL PROTECTED]> wrote:
> Hello Gerard,
>
> Thank you so much for your suggestion. I have tried working in the
> direction suggested by you.
> The next step of difficulty that I find is that there are lot of
> materials available on the internet in this regard but I cou
Getting a very erratic Exception:
ViewDoesNotExist: Could not import supplier.views. Error was: cannot
import name Buyer
What is stage is Buyer (model Class) does exist and the exception is
only thrown once in a while. Could it be that there are too many
ForeignKey relationships. i.e. the Buyer
Hello,
I have just started developing with Django on Apache and have ran into
a very annoying issue that I can not seem to find the answer to.
I set variables in my views and some get updated through the template
immediately and others do not. I have to wait 15 seconds for the page
to refresh.
On Wednesday 22 October 2008 07:25:52 pm GPSGuy wrote:
> I have just started developing with Django on Apache
restart apache on every code change - not difficult - just up-arrow and press
enter
--
regards
KG
http://lawgon.livejournal.com
--~--~-~--~~~---~--~~
Y
Strange error I haven't seen before - configuring a new django
development server and have installed Django v 1.0
In a app admin.py file I've specified a straightforward geo admin
class to handle the geodjango enabled models:
from django.contrib.gis import admin
from models import Category, CSit
Hi Russ,
I found what was causing the error. I work on an iMac at home and a
MacBook Pro at work, and forgot that I was using trunk on my iMac
where I was having the issue.
The version of trunk I had checked out contains a "urls" folder in
contib.comments that wasn't deleted in svn because of .p
just found this ticket (http://code.djangoproject.com/ticket/8165)
which is probably the reason why (re-)ordering edit-inlines is so
complicated.
On Oct 21, 3:43 pm, patrickk <[EMAIL PROTECTED]> wrote:
> does anyone know about a clean way to order edit-inlines using the
> admin-interface?
>
> 1.
Thanks Ariel - that worked great
Al
On Oct 21, 8:02 pm, "Ariel Mauricio Nunez Gomez"
<[EMAIL PROTECTED]> wrote:
> There are many ways to fix the projection issue, this is one (probably not
> the best)
>
> On your view code:
> sites_list=sites_list.transform(900913)
>
> Best,
> Ariel.
>
> On Tue,
Hi Dmitry,
After some digging, I found that folder as well. Now everything's
working correctly again.
Cпасибо,
Brandon
On Oct 22, 7:08 am, Dmitry Dzhus <[EMAIL PROTECTED]> wrote:
> Brandon Taylor wrote:
> > I see there is an closed ticket:http://code.djangoproject.com/ticket/8571.
> > I have cl
Hi all,
I am being considered for a project that would involve re-writing an
application which is currently in MS Access/VBA. The application is an order
entry/shop management software for a small vertical market. I am strongly in
favor of using Django for the project and one of the principles is
Hi all,
I'm referring to this thread from a couple of months ago:
http://groups.google.com/group/django-users/browse_frm/thread/1f4bb991f9f0f7b5?hl=en&tvc=1
I'm still having problems with the NoReverseMatch exception coming up
with seemingly-random behavior.. or at least inexplicable to me.
Eve
that would be great but i can't allow my users access to http.conf as
i said i am a shared reseller so i am offering django to my clients.
the only way i can do it is by writing a fcgi file and pointing to it
with .htaccess but it seems as if it doesn't want to work.
On Oct 21, 8:34 pm, Adam Nel
On Wed, Oct 22, 2008 at 10:57 AM, Alberto Piai <[EMAIL PROTECTED]>wrote:
>
> Hi all,
>
> I'm referring to this thread from a couple of months ago:
>
> http://groups.google.com/group/django-users/browse_frm/thread/1f4bb991f9f0f7b5?hl=en&tvc=1
>
> I'm still having problems with the NoReverseMatch ex
[EMAIL PROTECTED] wrote:
> HI all,
>
> I've just starting using django and am really impressed. In my simple
> app I want to retrieve a single "article" from a db and then display
> it broken into reasonable length pages (either based on word count or
> a specific markup in the text). I'd really
Also, can you recreate the problem on the most recent trunk or 1.0.X branch
code? Your line numbers from the traceback don't match up with current so
I'm guessing you are using 1.0? There have been at least a couple of fixes
in the reverse url area (though I don't know that any sound like a good
Hello,
It is actually that I want to develop a Graphical User Interface for
submitting some jobs (presently doing it as command line interface
only). I would like to use Python-CGI for it.
I would be thankful if someone could suggest me some focused tutorial/
book/web-link etc with regard to this
I am trying to convince the php programmers that there are viable
python solutions. I do have the ability to restart the web server
every time I make a change, but I would quickly fall out of good
graces with the other developers. I don't need to give them any
fuel...
--~--~-~--~~---
Option One: Reloading Wrapper
I now that there is caching going on, but I am still not sure why. I
did find a work around, though I would still like for someone to
explain what is going on underneath.
The work around if from:
http://groups.google.com/group/django-users/browse_thread/thread/f44ee
What are the pluses and minuses of using a Many-to-Many Intermediary
Model vs just putting a foreign key to the "owning" model in the
"owned" model?
Example: http://dpaste.com/86133/
Seems like you can do the same things either way, no? Any catches in
the M2M field?
(P.S. they both have the sa
If you do decide to split up the text, it would be worthwhile getting
to know some of the built-in template filters:
http://docs.djangoproject.com/en/dev/ref/templates/builtins/#truncatewords
Playing around with filters like truncatewords, wordcount, and
wordwrap might give you some ideas.
--~-
i found lots of snippets to download,but the server always says it is
down.
--~--~-~--~~~---~--~~
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
T
Taking an example from Chapter 7 of the Django Book:
from forms import PublisherForm
def add_publisher(request):
if request.method == 'POST':
form = PublisherForm(request.POST)
if form.is_valid():
form.save()
return HttpResponseRedirect('/add_publisher
On Wed, Oct 22, 2008 at 11:31 AM, GPSGuy <[EMAIL PROTECTED]> wrote:
>
> Option One: Reloading Wrapper
> I now that there is caching going on, but I am still not sure why. I
> did find a work around, though I would still like for someone to
> explain what is going on underneath.
>
>
Apache does no
Hi everybody,
I set apache authentication against django's user database. and I want
to limit a location to a group of people of my django staff.
I set this in apache's config file like this:
SetHandler cgi-script
# authentication method
Hi,
v got this error, tried almost everything to get it right, but no effect.
Can anynone pls help me with that?
It happens when i submit the form:
class AddPartnerForm(WTForm):
def __init__( self, user, *args, **kwargs ):
super( AddPartnerForm, self ).__init__( *args,
Option One: Reload Page
Same as before, but on this one you can use a reload page to
explicitly tell it when to reload the views.
file:urls.py
from django.conf.urls.defaults import *
from myproject.views_dev import *
import datetime
urlpatterns = patterns('',
(r'^developer1/Development/Relo
On Wed, Oct 22, 2008 at 11:53 AM, urukay <[EMAIL PROTECTED]> wrote:
> Hi,
>
> v got this error, tried almost everything to get it right, but no effect.
> Can anynone pls help me with that?
> It happens when i submit the form:
>
> class AddPartnerForm(WTForm):
>
>def __init__( self, user,
Thanks for the information Karen.
The sever is dedicated for development and I have freedom to do pretty
much anything I want to it as long as I don't impact they others guys
too bad. Anyway, I have just started working on this and didn't
realize that using the Django Server was the preferable m
Thanks Rock, that was it. I had to change my TIME_ZONE setting in my
project's settings.py.
On Oct 18, 10:11 am, Rock <[EMAIL PROTECTED]> wrote:
> A very common problem is that the timezone or system clock is off.
> Most Blog implementations allow you to create a blog entry "in the
> future" so
Dmitry Dzhus wrote:
> I've spend a lot of time playing with different approaches to breaking
> big text into pieces in the past. Now I'm quite sure that any solution
> which tries to split a text _automagically_ sucks no matter what is it
> based on — word count, paragraphs, anything. You'll have
Hi Alfonso,
The OSMGeoAdmin depends on a proper installation of the GDAL
libraries. I think you need to confirm that GDAL is properly installed
on your server, per the docs at: http://geodjango.org/docs/install.html#id9
Cheers,
Dane
On Oct 22, 7:19 am, Alfonso <[EMAIL PROTECTED]> wrote:
> Str
ah...yes, I've missed that :-( Thanks a lot :-)
--
View this message in context:
http://www.nabble.com/Truncated-incorrect-DOUBLE-value-tp20113907p20115508.html
Sent from the django-users mailing list archive at Nabble.com.
--~--~-~--~~~---~--~~
You receive
On Oct 22, 5:10 pm, Ardesco <[EMAIL PROTECTED]> wrote:
> Taking an example from Chapter 7 of the Django Book:
>
> from forms import PublisherForm
>
> def add_publisher(request):
> if request.method == 'POST':
> form = PublisherForm(request.POST)
> if form.is_valid():
>
When I get an error on viewing a snippet I copy the URL into Google
and click the Cached version.
On Oct 22, 5:08 pm, Gmail <[EMAIL PROTECTED]> wrote:
> i found lots of snippets to download,but the server always says it is
> down.
--~--~-~--~~~---~--~~
You receiv
On Oct 22, 3:56 pm, "Matthew Talbert" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I am being considered for a project that would involve re-writing an
> application which is currently in MS Access/VBA. The application is an order
> entry/shop management software for a small vertical market. I am st
Have you written a unit test that executes the view? If so, and if it
doesn't always happen, you can run the unit test over and over quickly
to see if it has something strange to do with the order of how things
are important or something crazy like that.
By the way, writing tests can often help fi
Peter that is a great Idea, I never thought of that.
Vitaly Babiy
On Wed, Oct 22, 2008 at 1:26 PM, Peter Bengtsson <[EMAIL PROTECTED]> wrote:
>
> When I get an error on viewing a snippet I copy the URL into Google
> and click the Cached version.
>
> On Oct 22, 5:08 pm, Gmail <[EMAIL PROTECTED]>
On Oct 22, 1:23 pm, Net_Boy <[EMAIL PROTECTED]> wrote:
> Hi,
> I am trying to make a view function to get the posted values and
> make some comparison (if x.value >= y.value)..
> where x is the model that I got it's values from the post
> and y is the other model .
>
> example:
>
> def comp
I don't see what splitting it up into "sub apps" has anything to do
with it?
What happens when you add the related_name attribute to your model
fields?
Here's some code from one of my apps:
class M(models.Model):
...
from_user = models.ForeignKey(User, null=True,
related_name='from')
Lol, Bennet is probably freaking out right now.
Peter Bengtsson wrote:
> When I get an error on viewing a snippet I copy the URL into Google
> and click the Cached version.
>
> On Oct 22, 5:08 pm, Gmail <[EMAIL PROTECTED]> wrote:
>
>> i found lots of snippets to download,but the server always s
On Oct 22, 8:24 am, MrMuffin <[EMAIL PROTECTED]> wrote:
> I'm generating html forms from models using ModelForm. When I do
> something like :
>
> >>> article = Article.objects.get(pk=1)
> >>> form = ArticleForm(instance=article)
>
Change it's widget to hidden I think should work
>>> from django
It took about 15 seconds with Google to find these:
http://www.devshed.com/c/a/Python/Writing-CGI-Programs-in-Python/
http://www.cs.virginia.edu/~lab2q/lesson_7/
http://gnosis.cx/publish/programming/feature_5min_python.html
Anytime you find yourself asking for materials, Google first! Then,
if
Thanks for the quick response! Worked like a charm.
On Oct 22, 1:25 pm, Peter Bengtsson <[EMAIL PROTECTED]> wrote:
> On Oct 22, 5:10 pm, Ardesco <[EMAIL PROTECTED]> wrote:
>
>
>
> > Taking an example from Chapter 7 of the Django Book:
>
> > from forms import PublisherForm
>
> > def add_publisher(
The reason I ask about whether this problem is eliminated by using
MySQL is that according to the Django docs:
sqlsequencereset [appname appname …]
Prints the SQL statements for resetting sequences for the given app
names.
You’ll need this SQL only if you’re using PostgreSQL and have inserted
d
It's definitely possible. Here's an example:
from django.contrib.auth.models import User
staff = User.objects.create_user(username='s', password='s',
email='[EMAIL PROTECTED]')
#staff.is_staff = True
client = Client()
assert client.login(username='s', pass
Not down but you get lots of errors. They're probably working on it. I
hope.
On Oct 22, 5:08 pm, Gmail <[EMAIL PROTECTED]> wrote:
> i found lots of snippets to download,but the server always says it is
> down.
--~--~-~--~~~---~--~~
You received this message becau
On Wed, Oct 22, 2008 at 2:16 PM, cfobel <[EMAIL PROTECTED]> wrote:
> Does anyone definitively know whether MySQL automatically increments
> its sequences (or whatever their equivalent name is) even if records
> are manually inserted with a higher ID?
Seems to:
mysql> describe color;
+---+
Hello Django-Gurus,
I am writing an application that uses the Django's inbuilt
authentication system. I want to seprate my next application but want
to keep using the same authentication. How Can I do that ?
Example:-
Mysite (Authentication)
-- Blog (App#1)
-- Forum (App#2)
-- XYZ (App
Hi,
i have a model which defines a ImageField with
a path which exists in the media root.
Then i created a form which is bound to the Model
with Modelform.
All the fields in the Form are working as expected
despite the Image field.
I mean, i can choose an image, but it wont
upload to my path, n
Hello,
On Wed, Oct 22, 2008 at 5:15 PM, Karen Tracey <[EMAIL PROTECTED]> wrote:
> Other than the actual server code, are there any differences in config between
> when you see this error and when you do not? For example, DEBUG setting,
> caching, etc.?
The only difference is the FORCE_SCRIPT_NA
Nevermind my Mail,
right after i sent this message it works.
I dont know what went wrong exactly
but right now i can see all of a sudden like
10 pictures i was loading up.
Greetings
Sven
Sven Richter wrote:
> Hi,
>
> i have a model which defines a ImageField with
> a path which exists in the m
which one is the Django community moving toward to, mercurial or git?
if Django is to be moved...
--~--~-~--~~~---~--~~
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
You can already use git with an SVN server
2008/10/22 Rit Lim <[EMAIL PROTECTED]>
>
> which one is the Django community moving toward to, mercurial or git?
> if Django is to be moved...
> >
>
--~--~-~--~~~---~--~~
You received this message because you are su
I personally would recommend git.
Vitaly Babiy
On Wed, Oct 22, 2008 at 4:01 PM, john Moylan <[EMAIL PROTECTED]> wrote:
> You can already use git with an SVN server
>
>
>
> 2008/10/22 Rit Lim <[EMAIL PROTECTED]>
>
>
>> which one is the Django community moving toward to, mercurial or git?
>> i
Wiadomość napisana w dniu 2008-10-22, o godz. 21:54, przez Rit Lim:
> which one is the Django community moving toward to, mercurial or git?
> if Django is to be moved...
Subversion is best suited for such centralized development as we have
in Django, but you are free to use whatever you want.
Hi,
I was following tutorial from official docs step by step.
So on part 4, at writing and processing simple form I am stuck with
something. (here —
http://docs.djangoproject.com/en/dev/intro/tutorial04/#write-a-simple-form).
I am writing my results view and pointing at it from polls/urls.py.
A
The OP wrote:
>> which one is the Django community moving toward to, mercurial or git?
>> if Django is to be moved...
Because Subversion is fairly popular, but mercurial and git have
svn interfaces. Thus the Django community seems to be "core
Django development is in Subversion, but interface
That was a really good post - thanks :) I know you don't *have* to
use anything from the app you include or even *have* to include
everything in an app you write. But I think that I just have this
idea in my head that I can't let go of that each part should be able
to be inherited from - not jus
On Wed, Oct 22, 2008 at 5:15 PM, gryzzly <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I was following tutorial from official docs step by step.
>
> So on part 4, at writing and processing simple form I am stuck with
> something. (here —
> http://docs.djangoproject.com/en/dev/intro/tutorial04/#write-a-simp
On Oct 23, 3:01 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Wed, Oct 22, 2008 at 11:31 AM, GPSGuy <[EMAIL PROTECTED]> wrote:
>
> > Option One: Reloading Wrapper
> > I now that there is caching going on, but I am still not sure why. I
> > did find a work around, though I would still like
Hey all,
I recently ported a half dozen homebrewed applications from 0.96 to
1.0 (awesome!) and now I'm in the process of bumping them over from
MySQL to Posgres so I can get ripping on GeoDjango (double awesome!).
This seemed like a great chance to give manage.py's ingenious
"dumpdata" command
thank you a lot for a quick response; I am sorry for posting
traceback, and not actual error message.
So here what it gives me:
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/polls/1/results/
Django Version: 1.0-final-SVN-unknown
Python Version: 2.5.2
Installed Applications:
On Oct 23, 2:00 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> that would be great but i can't allow my users access to http.conf as
> i said i am a shared reseller so i am offering django to my clients.
Apache/mod_wsgi can be used in a similar vein to FASTCGI, with user
code running in s
On Wed, Oct 22, 2008 at 6:14 PM, perchance <[EMAIL PROTECTED]> wrote:
>
> [trimmed]
> python manage.py dumpdata app_label --traceback --indent 4 > fixtures/
> app_label.js
>
> And the traceback I get looks like this, with a sanitized model name
> substituted for the real thing.
>
> """
> Traceback
Hi Karen, I am sorry, the previous post is irrelevant. What you have
seen is a result of changing of results view that I was doing before,
to test what is going on. (btw, I've noticed that firefox caches an
error output, can I do something about it?) Thanks
So relevant error output looks like th
Thanks for the reply. I did not syncdb with any blank=True or
null=True options on the foreignkeys, so the MySQL table does not
allow null values. I just ran some group and counts from the mysql
shell and it does indeed show that a number of records have a zero in
their fk_id field. So I'm now lea
On Wed, Oct 22, 2008 at 6:30 PM, gryzzly <[EMAIL PROTECTED]> wrote:
>
> Hi Karen, I am sorry, the previous post is irrelevant. What you have
> seen is a result of changing of results view that I was doing before,
> to test what is going on. (btw, I've noticed that firefox caches an
> error output
On Wed, Oct 22, 2008 at 6:37 PM, perchance <[EMAIL PROTECTED]> wrote:
>
> Thanks for the reply. I did not syncdb with any blank=True or
> null=True options on the foreignkeys, so the MySQL table does not
> allow null values. I just ran some group and counts from the mysql
> shell and it does indee
most probably, yes.
core
contrib
db
dispatch
etc...
are all django's apps/modules
and that is probably what was running
surprisingly I don't see tests.py in core, db etc.
those tests must live elsewhere.
there are tests for some of the contrib apps
also don't name a templatetag the same name as
perhaps when you create-save the models (Providers, Customers etc.) it adds
that User to the appropriate group.
but I'm not sure I would use groups. That would make the most sense if
there were people with overlapping roles. somebody who is Agent + Provider
you could use the permissions system.
the easiest way is to pass in the context to the template tag :
@register.inclusion_tag("edit_link_tag.html",takes_context=True)
def edit_link_tag(context,obj,name=None):
"""returns a link to edit the model if you have permission to do so
"""
user = context['user']
and so on
look at RequestFactory:
http://groups.google.com/group/django-developers/browse_thread/thread/db86050095ebe5db?pli=1
which would mean not calling post, but calling the view directly
I've written a custom Unit test class just for views that's proving quite
useful, but it doesn't yet do this reque
I'm creating a site in Django and have run into an interesting problem
that I can't seem to find the solution to. Basically, I have models
for my app called "Product" and "Category" and in the admin in the
list of categories instead of the category name, it has "Category
object"... same thing in
On Wed, Oct 22, 2008 at 7:54 PM, jb. <[EMAIL PROTECTED]> wrote:
>
> I'm creating a site in Django and have run into an interesting problem
> that I can't seem to find the solution to. Basically, I have models
> for my app called "Product" and "Category" and in the admin in the
> list of categorie
You know, I think that did it. For anybody who ever follows in these
footsteps of error and misdeed, here's what I did to sort out my
tables.
ALTER TABLE app_model CHANGE fk1_id fk1_id int(11) NULL;
ALTER TABLE app_model CHANGE fk2_id fk2_id int(11) NULL;
ALTER TABLE app_model CHANGE fk3_id fk3_i
You know, I think that did it. For anybody who ever follows in these
footsteps of error and misdeed, here's what I did to sort out my
tables.
ALTER TABLE app_model CHANGE fk1_id fk1_id int(11) NULL;
ALTER TABLE app_model CHANGE fk2_id fk2_id int(11) NULL;
ALTER TABLE app_model CHANGE fk3_id fk3_i
Thanks Karen... for some reason I was spacing that aspect of the model
creation. I knew it was something simple.
jb.
On Oct 22, 6:09 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Wed, Oct 22, 2008 at 7:54 PM, jb. <[EMAIL PROTECTED]> wrote:
>
> > I'm creating a site in Django and have run i
1 - 100 of 114 matches
Mail list logo