Now's a good time to try the new testing framework's test client
http://www.djangoproject.com/documentation/testing/#test-client
login as whomever, send some URLs, check the results. I know it ain't
quite what you're looking for, but it may help.
--~--~-~--~~~---~--~
On Mar 5, 6:45 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> Hmm ... for consistency's sake, we should change that. We do seem to be
> pretty much always resolving unquoted tokens as variables in the current
> context. The only real exception I can find is the "ssi" tag (you have
> to gloss
I'm building up menus in django, and wanted a construct like this:
{% for item in menu %}
{{item.label}}
but that doesn't work, because there's no view "item.view"
so point 1, looks like a shortcoming in the syntax of the URL tag.
With most tags, an unquoted item gets looked up, and a quoted it
http://www.djangoproject.com/documentation/generic_views/ has this
example:
... redirects from /foo// to /bar//:
urlpatterns = patterns('django.views.generic.simple',
('^foo/(?P\d+)/$', 'redirect_to', {'url': '/bar/%(id)s/'}),
)
What replaces the '%(id)s' section, the generic view package,
On Feb 14, 12:12 pm, "walterbyrd" <[EMAIL PROTECTED]> wrote:
> CMSes like joomla and drupal have a rich assortment of plugins/modules/
> extensions for stuff like: blogs, forums, galleries, news aggregators,
> ecommerce, document management, and so on.
>
> How difficult would it be to get that sor
There's a thread from June 28 '06 on this list about changing MySQL's
storage engine from InnoDB to MyISAM for a particular table/model.
Now, an InnoDB table respects foreign keys, and a MyISAM table ignores
them. An "ALTER TABLE ... ENGINE = MyISAM" statement will fail if the
table has any forei
IIRC, Django's admin can't handle a field with null=True and
blank=False (which is a bit of a shame...) Try adding blank=True to
your model's field?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gro
Feb 7, 3:03 pm, "yary" <[EMAIL PROTECTED]> wrote:
> ... If I could get some guidance as to writing the test
> (as mentioned in the 2nd half of my original message) I'd me much
> obliged, and will get to work on patching #2720.
I think I can figure it out, will ping
Thanks for the ref. That patch doesn't address the problem of a
ManyToMany field referring to not-yet-created tables, and the patch
breaks my project. If I could get some guidance as to writing the test
(as mentioned in the 2nd half of my original message) I'd me much
obliged, and will get to work
On Feb 7, 1:22 pm, [EMAIL PROTECTED] wrote:
> Thanks for the link!
> Would I really have to set up my backend app as a Django App?
> Is it required to due to some meta-programming magic?
> ie I'd rather not have to run our app via manage.py/django-admin.
let me see if I understand your situation-
I was looking at the Django-created database structure for my project
in a tool that shows all the foriegn-key relationships with nice
little lines (aka ER diagram). It looked very sparse. Most of my
relationships weren't showing up.
A little digging shows me that MySQL (windows, 5.0, InnoDB tabl
On Jan 31, 8:59 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On 2/1/07, yary <[EMAIL PROTECTED]> wrote:
> > Quick question- how do I find the verbosity in which my tests are
> > running? something like "from import verbosity"?
>
Quick question- how do I find the verbosity in which my tests are
running? something like "from import verbosity"?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, se
On Jan 23, 6:10 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote (in different order):
> One of the goals of the fixtures framework is to rename 'initial data'
> to 'custom SQL' - the goal here being to move the loading of initial
> data out of SQL statements into a database independent fixtu
I'm setting up some group permissions in management.py but am running
into (I think) order-of-signalling issues. When I get my post_syncdb
signal, my apps models are in the database, but the custom permissions
(class Meta: permissions =...) aren't created. Also by looking at the
verbose output of
Does this post still hold true-
http://groups-beta.google.com/group/django-users/msg/05ed44bf585a2d09?
that is, can I separate a models file into separate modules so long as
I set the __all__ variable in modules/__init__.py and keep the modules
in the models directory? It doesn't seem to be work
You can set up your main site urls.py to read something like:
urlpatterns = patterns('',
(r'^app1/', include('app1.urls')) # Pass to app1
(r'^app2/', include('app2.urls')) # Pass to app2
)
and within app1, have a urls.py like this:
urlpatterns = patterns('',
(r'^view/(?P\d+)', 'vi
While we're on the subject of null vs '' (empty string), here's a
perverse case:
class TestSlug(models.Model):
sluggy=models.SlugField(maxlength=17,
primary_key=True,blank=True,null=False, editable=True)
name=models.CharField(maxlength=40)
def __str__(self): return "'%s': %s" %(self.sluggy,
I'm not in front of the dev machine, but I created the model in 0.95,
so maybe that's a dev feature. Or I may have had a typo in a model the
first time through- in fact I recall that I had a space in 'class Model
C', so if the 'name clash' detection requires all models to be created
at once, that'
Russell Keith-Magee wrote:
> On 11/3/06, yary <[EMAIL PROTECTED]> wrote:
> >
> > The idea here is that adding a 'realation_model' option to ManyToMany
>
> This idea has been suggested previously, and has been rejected
> previously - it has some problems
> ...I've submitted this to trac, was rejected by akismet as spam.
It's time django's trac used a local 'dspam' instance instead of
relying on askimet's, because most trouble tickets don't resemble blog
comments.
--~--~-~--~~~---~--~~
You received this message be
My previous brainstorm relied on magic- Models that look like fields?
auto-synthesized composite classes!? Django went through a magic
removal, adding magic won't fly.
An antidote to magic is explicitness. Let's try the previous example
from a different angle, spelling everything out.
class Repo
Wow, I hate being verbose and wrong at the same time in public. Take my
previous post with a grain of salt while I rethink it! sorry...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post t
Russell Keith-Magee wrote:
...
> That said, 'm2m with intermediate' is a relatively common use case, so
> if you have any neat ideas on how to represent such a structure, feel
> free to suggest them. The idea has been discussed before, but no
> obvious solution has emerged (the real sticking point
yary wrote:
> Do you have an example of any project in the wild, using the django
> admin, with a field "null=True, blank=False, editable=True"? I'm
> curious to know the use of such a beast in an actual implementation.
to clarify,I do think it is useful to have
James Bennett wrote:
> On 10/25/06, yary <[EMAIL PROTECTED]> wrote:
> > Seems that if someone says a field can be null, that implies the admin
> > interface should let it be null.
>
> I really, really, really don't like having a system assume that one
> thing I
A field specified like {{{foo=ForeignKey(Bar,null=True)}}} does not
allow blanks in the admin interface.
Specifying {{{foo=ForeignKey(Bar,null=True,blank=True)}}} allows
blanks.
Seems that if someone says a field can be null, that implies the admin
interface should let it be null.
If for some r
Hi, new to Django-
I have my data model all created. I can run syncdb once, and it creates
my database schema:
C:\webapp\Site>python manage.py syncdb
Creating table auth_message
Creating table auth_group
Creating table auth_user
Creating table auth_permission
Creating many-to-many tables for Gro
28 matches
Mail list logo