ems/quirks known?
-Skylar
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send e
This is still a good question :)
On Thursday, March 11, 2010 5:57:13 AM UTC-8, Wayne wrote:
>
> Hi Karen,
>
> Many thanks for your reply.
> Now our business requirements do not allow either empty string or null
> value for this particular charField column (name =
> models.CharField(max_length=512,
I may have found a bug. I made a test case here:
https://github.com/skyl/django/commit/556df1c46146c2fc9c4022d838fa23f652f0ea8d
The final assertion fails. Is this a bug or do I misunderstand how this
should work?
Thanks
--
You received this message because you are subscribed to the Google Gro
what's wrong with just defining form_valid sth like:
form_valid(self, form):
self.object = form.save(commit=False)
#ponies
self.object.save()
return HttpResponseRedirect(self.get_success_url())
does that not work?
--
You received this message because you are subscribed to the
instead of calling super, you could just call FormMixin.form_valid directly,
yes?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
Using *args and **kwargs might work
then maybe
self.website = kwargs.get('website', 'default.com')
On Sep 28, 1:45 pm, adj7388 wrote:
> Django newbie issue. Just trying to understand. I'm setting up a
> simple UserProfile class to link to User (as described in several
> places in documentation)
Overriding __init__ might be a little shady, but you probably can get
away with it if you use *args and **kwargs
On Sep 28, 1:45 pm, adj7388 wrote:
> Django newbie issue. Just trying to understand. I'm setting up a
> simple UserProfile class to link to User (as described in several
> places in do
User.objects.get(pk=Session.objects.get(pk=session_id).get_decoded()
['_auth_user_id']) via @SmileyChris
On Sep 28, 9:36 pm, Danny Bos wrote:
> Heya,
>
> I've got a Django application talking to an iPhone sending photos and
> User data back and forth. I figured the best way to approach this
> (te
widget=forms.CheckboxSelectMultiple
)
class Meta:
model = Asset
fields = ('languages',)
Adding a hidden garbage field works. Seems like it's just a little
edge-case bug/gotcha.
On Sep 28, 8:49 am, Brian Neal wrote:
> On Sep 27, 11:35 am, Skylar Sav
I have some modelforms within a . Each form has one
checkboxselectmultiple that is not required. If I post nothing (all
checkboxes are empty) then all of the forms are invalid. If I post
anything then all of the forms are valid. This anything could be that
one of the forms has a box checked, or
http://docs.djangoproject.com/en/1.2/topics/db/queries/#spanning-multi-valued-relationships
On Jul 10, 12:33 am, Skylar Saveland
wrote:
> If I chain my .filter()s
>
> Collection.objects.filter(collection_revisions__articles=article).filter(co
> llection_revisions
the second query should read:
Collection.objects.filter(collection_revisions__articles=article,
collection_revisions__revision_tag="p")
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegrou
If I chain my .filter()s
Collection.objects.filter(collection_revisions__articles=article).filter(collection_revisions__char_fi="p")
collection_revisions is related_name, FK to Collection.
articles relname, m2m with collection_revision (with a through table).
I get ~20 results with this query::
mod_python is dead.
you can just serve your static files .. statically. usually you might
point at a cdn or put nginx in front although you could set /media or /
ash/media to serve statically with apache.
On Jun 24, 5:47 pm, commonzenpython wrote:
> i have been playing with django using mod_pyt
I have:
class Foo(models.Model):
...
class Bar(Foo):
class Meta:
proxy=True
class Baz(Foo):
...
my baz instances have a `foo_ptr` attr on them and my bar instances do
not. The only reason I can think of that this is is b/c Bar is a
proxy. Is this correct? Is there some docu
I would guess that you are trying to access /index with the webserver
user but that is owned by another user and the user that owns the web
process has not the sufficient permissions to do the attempted
operation. Set the permissions on the directory accordingly, perhaps
ownership as well. You co
class Material(models.Model):
products = ManyToManyField('Product', related_name='materials')
class Products(models.Model):
...
class ProductForm(forms.ModelForm):
class Meta:
model = Product
fields = ('materials', )
I want to do this.
I saw this discussion:
http
I presume that you mean date formatting in the templates:
http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
you can use the strftime format bits iirc:
http://docs.python.org/library/datetime.html#strftime-and-strptime-behavior
you can set the default with a setting
http://docs.
I was about to need to do something along these lines, so I used
inspectdb to look at Moodle. I was going to connect django and moodle
to the same DB since moodle was going to be a certainty in the
position that I didn't end up taking:
http://github.com/skyl/django-moodle
This is a really basic,
the object is being created or updated. Check out the post_save
> documentation:http://docs.djangoproject.com/en/dev/ref/signals/#django.db.models.si...
>
> On Apr 23, 3:32 pm, Skylar Saveland wrote:
>
>
>
>
>
> > On Apr 23, 3:27 pm, Jim N wrote:
>
> > > H
.
On Apr 23, 4:32 pm, Skylar Saveland wrote:
> Looking at the source for execute on django-trunk in
> django.db.backends.oracle
>
> If you have a param, you will have an arg for the query (type:
> string).
>
> http://docs.djangoproject.com/en/dev/topics/db/sql/#executing-custom
Looking at the source for execute on django-trunk in
django.db.backends.oracle
If you have a param, you will have an arg for the query (type:
string).
http://docs.djangoproject.com/en/dev/topics/db/sql/#executing-custom-sql-directly
... your params should be a list of things to interpolate into
http://docs.djangoproject.com/en/dev/ref/contrib/webdesign/#ref-contrib-webdesign
On Apr 23, 3:41 pm, Brad Buran wrote:
> Is there any easy way of generating dummy content for models in Django? As
> I'm learning how to use Django, I often find myself deleting the sqlite
> database and running sy
http://docs.djangoproject.com/en/dev/topics/db/queries/
On Apr 23, 11:11 am, Pep wrote:
> Hi everybody !
>
> I have two tables on my database : one for the products (named
> Product) and one for my clients (name Client).
> In Client, there is a row named 'products' where I put all the client
> p
Yes. The filter method returns a queryset which is a lazy database
object that will query the database to get the queryset. You would
have to save the object for the queryset to return it. You could
however get all of the objects which are not your select objects
MyModel.objects.exclude(pk__i
On Apr 23, 3:27 pm, Jim N wrote:
> Hi,
>
> I have overridden the default save() on a model so that I can update
> some counts every time a save occurs. Unfortunately, I don't want to
> perform these actions every time the model is updated, which seems to
> happen.
>
> Is there another approach
This might be the wrong way to help you if you want something super-
gui-fabulous. But, I have a dusty old project that is not gaining any
traction to make a nice IDE out of vim. If you don't know/like vim
and have no desire to learn then I might just be wasting your time.
http://github.com/skyl
{% for k, v in d.items %}
{{k}} {{v}}
{% endfor %}
On Feb 14, 1:58 pm, Madis wrote:
> Why will this not work or how should i write it to work:
>
> I have the following dictionary:
> projects = {u'NetMinutes': {'chains': [u'Arendus', u'Uuslahendus']},
> u'Veel': {'chains': []}}
>
> Now in a templa
In case anyone else runs across this, the answer appears to be:
disable csrf protection while testing.
On Jan 8, 7:04 pm, Skylar Saveland wrote:
> I wondering what I'm doing wrong here. These views work as expected
> with a browser. I was looking to improve my test coverage.
>
&g
t_response.status_code
200
>>> post_response = c.post( reverse('create', kwargs={'typ':'residential'}), {
... 'username':'1...@14.com', 'username2':'1...@14.com',
'password1'
help_text is safe by default? Might be of some use.
aa56280 wrote:
> The "safe" filter works on a string, not the entire form. So you'll
> have to apply it to the label of the field:
>
> {{ form.tos.label|safe }}
>
> Hope that helps.
>
>
>
> On Dec 4, 11:55 am, Viktor wrote:
> > ahoj,
> >
> > I
Wait, this is a better question than I thought on first glance. Not
entirely sure, sorry for the terse first response.
Skylar Saveland wrote:
> Former
>
> Continuation wrote:
> > When a ModelForm object calls save(), does it first clean the form
> > data using form.cleaned_
Former
Continuation wrote:
> When a ModelForm object calls save(), does it first clean the form
> data using form.cleaned_data? Or do I need to call form.cleaned_data
> explicitly?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
I thought that it was best practice to not put python code in /var/www
and to own the code with an unprivileged user. Doesn't seem like it
is necessarily germane to the present topic but perhaps something to
think about.
Am I wrong? Are there exceptions? I think I have seen some high
profile web
Are you using python-path arg to WDP? Also, you might do some
sys.path hacking in the .wsgi script.
neridaj wrote:
> Hello,
>
> I'm trying to deploy my project to my server and I don't understand
> why django isn't finding modules I've added to my pythonpath. When I
> try to access my site I get
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
> Paragraph(rack.nick, normalstyle, bulletText=None),
Yep, rack.nick is None here it would seem. Like Karen said, don't
have nullable CharField if you can help it; blank=True is good and
then and empty will be "". I have a dirty hack for you that should
'work'.
Paragraph( rack.nick if rack
>
> I'm reading a string value that is stored in my database. This string
> the main content of my webpage and it contains contents like
> javascript, css styling, and django template tags/filters.
>
> After I load string value by {{ stringValue|safe }} filter, everything
> is added to the page ju
On Nov 27, 1:27 am, Yang Zhang wrote:
> What's the easiest way to have error lists describe fields using their
> labels instead of their names? Thanks in advance.
I don't think that I understand your question. Is there something to
it that isn't covered in
http://docs.djangoproject.com/en/dev/
> each user has their own table in the
> db for transactions, and they can do whatever they want to their own
> data. i wouldn't want them to be able to touch anyone else's tables,
> but it seems like django has a permissions system to restrict that.
ha, reading lists on mobile ... I didn't even s
> I don't
> believe you can do inline formsets with generic views, which is
> unfortunate, but it's not hard with a simple custom view.
well, perhaps not automagically, but you can just send extra_context
and then do a little bit of custom work ``if request.method == POST``.
--
You received this
Yep, still a bad idea. Permissions are by table not by row. Use
generic views for basic CRUD.
Count László de Almásy wrote:
> i've seen notes in some django documentation that implies that using /
> admin/ for non-trusted users is not a good idea. which is unfortunate
> since it seems like the a
You're primary question is a little tough, ther are a couple of ways
to go. I just wanted to mention that your slug might not be unique
the way you have it and you could get IntegrityError. Also, your
get_absolute_url would be better served with permalink. Your primary
question, well, I'm just a
You might also check out pycha?
S.Selvam wrote:
> On Thu, Nov 26, 2009 at 2:01 AM, Javier Guerra wrote:
>
> > On Wed, Nov 25, 2009 at 3:07 PM, S.Selvam wrote:
> > > I need to show some data as a chart.
> > >
> > > I would like to achieve a high quality rendering.
> > >
> > > Is reportlab or mat
> I need to import contacts of given email id/pwd from gmail,yahoo,hotmail
> for django app. Please suggest?
yaho:
http://developer.yahoo.com/auth/
http://www.amaltas.org/show/using-yahoo-bbauth-with-django.html
goog:
http://code.google.com/p/gdata-python-client/
Not sure about hotmail.
--
What are the details of the error?
On Nov 18, 7:06 am, Zeynel wrote:
> I've been trying to redirect
>
> /admin/ to /admin/wkw1/lawyer
>
> The suggestions from my previous
> posthttp://groups.google.com/group/django-users/msg/67c4594a4083bd45
> did not work.
>
> I read the redirect section in the
> that was my mistake - had an error in the template - it wors no.
> But according to this, I've another problem - fields which are foreign
> keys don't get rendered.
Typos? Wrong names? Maybe try to define the fields explicitly with
the widgets and choices that you want (but then the save metho
My buddy did a talk on generically importing data from excel for
pyatl.
http://www.mefeedia.com/watch/25167971
You can check out some code here:
http://code.google.com/p/django-batchimport/
Not sure how it will do with this satchmo business.
> there is no script for parsing. I'm importing CSV
If you haven't already, you could instantiate one in the shell and
render/inspec it there. You will at least be able to see what might
be a problem with your class/python-code vs what might be wrong at the
template level.
On Nov 18, 9:27 am, Benjamin Wolf wrote:
> Hi there,
>
> I'm using a Model
Why store it in the database? You might be able to avoid this
directly if you use a model method for this attribute.
Continuation wrote:
> I'm working on an auction app.
>
> In an Auction object I store the current_high_bid for that auction.
>
> When a new_bid comes in, I:
> 1) retrieve the cur
Doesn't work on my mobile browser.
Dimitri Gnidash wrote:
> Hey guys,
>
> For all those of you interviewing or being interviewed, I created a
> quick list of sample interview questions.
> While not comprehensive, it is a good start to review these before the
> interview, if anything, to gain a pe
inspectdb might be of some interest
John K wrote:
> Hello all,
>
> We are auditing several web frameworks and will ultimately choose one
> that will replace Wordpress (Wordpress hosted on our servers). So far,
> Django fits the bill.
>
> Has anyone had any experience migrating a Wordpress site to
If you are not in a virtualenv with -no-site-packages then you should
be able to just:
sudo aptitude install python-mysqldb
sridharpandu wrote:
> Thanks. That was quick. I use Ubuntu 9.04 (jaunty). I am unable to
> figure out the location of MySQLdb. A "WHEREIS MySQLdb" at the command
> prompt
Well, after further review it looks like changing the data and running
syncdb with initial_data is probably the culprit.. makes sense?
On Sep 18, 1:28 pm, Skylar Saveland wrote:
> I have a model on which django-mptt works with the simple test data.
> However, when I load the productio
I have a model on which django-mptt works with the simple test data.
However, when I load the production data (where I have seen that
get_ancestor is not working) to my dev machine, get_ancestor returns
[].
In [5]: for p in Page.objects.filter(parent__isnull=False):
...: print p, p.get_anc
You could document this experience once you get it running; sounds
useful.
On Jun 30, 1:00 am, John Hensley wrote:
> On 6/28/09 10:20 PM, Annie wrote:
>
> > I'm trying to this to work: users can download their files from their
> > account page from a url like
> > this:http://example.com/account
http://darkporter.com/?p=7
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to
django
sky...@abc255:/$ sudo updatedb
[sudo] password for skylar:
sky...@abc255:/$ locate pg_hba.conf
/etc/postgresql/8.3/main/pg_hba.conf
sky...@abc255:/$ sudo vim /etc/postgresql/8.3/main/pg_hba.conf
There should be some lines something like this (for local access):
local all postgres
It looks pretty good to me. Are you trying this in a shell? If not
that might help you debug. You are missing a ')' at the end of
>>>reader = csv.reader(open("mysite\restaurants.csv")
that is probably actually your problem ;-). I was experiencing some
strange behavior as I was playing with t
On May 24, 3:21 am, Kegan wrote:
> I am always using Django trunk and Python 2.5.4. And having no
> problem.
>
> I am thinking of switching to Python 2.6 (just to use latest python
> version). Anyone is already doing this in development? production? Any
> problem?
>
> Thanks.
2.6 works for me.
-
> each be on their own domain when finished, and they will both have
> their own auth models (to use both sites, you need an account on each
> site).
Sounds like two different settings files to me but I would be
interested to hear what others have to input.
--~--~-~--~~~--
> if I start a tuple with ( ('john","adams"))
Also, this is the same as ('john', 'adams')... it is just a tuple and
not a tuple within a tuple
( ('john', 'adams'), ) (note the comma .. something of an idiom ..
parenthesis do not create the tuple but rather the comma) would be a
tuple containing
> I'm using the built-in password_change view. Is there an easy way to
> specify a minimum password length for the new password? (Other than
> using javascript in the template)
Well, you probably want your server-side to match whatever validation
on the client-side and you want it to work without
> why follow their steps? just follow the steps in the django tutorial.
+1, I say use VPS and learn unix. However, if we are talking
webfaction you will have to go the web dashboard and click things.
(yuck)
and then you will have some sort of virtual environment that is unlike
a VPS or your hom
> I meant for webfaction - I use webfaction, but do not use their django set up
> method. I set it up like I would set up django on my own box - using the
> latest svn trunk and configuring apache. It certainly doesn't take 21 minutes.
I seem to always jump in the middle of a thread and say somet
Is this something having to do with pools?
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send
I get rendered
Id also
User
### The mostly relevent part of views.py:
from django.forms.models import inlineformset_factory
@login_required
def pickup(request):
try:
profile = request.user.get_profile()
except:
return HttpResponseRedirect('/profile/')
PickUpFormSet =
in the first paragraph. In the
> for loop, all the paragraphs get assigned the same id='preview', which
> they should not, as the DOM gets confused. ID of a node must be unique
> throughout the document.
>
> On Jan 25, 4:44 am, Skylar wrote:
>
> > I have a simpl
I use multiple tabs/terminals of vim. I usually have one that is
settings.py and webserver configuration and then another one tabbed
with:
|urls|views|style.css|base.html|theOneIamWorkingOn.html|.
Then models/forms/admin usually gets a workspace of their own. Never
used an IDE for anything but
I have a simple page with not much css and just trying to iterate over
some videos and get them all to display on the same page. They seems
to be stacking on top of eachother rather than each having it's own
space. This is not really a Django issue but I'm wondering if anyone
has had a similar i
I think getting the firebug plug-in for firefox and playing around and
looking at other people's code has been most beneficial to me
recently.
On Jan 21, 3:52 am, Gath wrote:
> Guys,
>
> Its seems the best way to do templates in Django is via plain html and
> css, but am having a problem in unde
My solution is that I have a site-enabled nginx host listening on
http://media.site/ which has a document root at say /var/www/site/.
I set my MEDIA_URL = http://media.site/. I import MEDIA_URL into
views and send it to the template with say render_to_response().
So, in the stylesheet link for
Using runserver or what deployment?
On Jan 11, 4:15 am, afrobeard wrote:
> Hi,
>
> I was wondering if anyone has taken a look at Live Contacts API
> athttp://msdn.microsoft.com/en-us/library/bb463989.aspx
>
> I can get through step 1 i.e. Delegated Authentication. An exception
> is being raised
+1, Perhaps building a fully-working site using all parts of Django,
implementing interesting and useful features. Also setting-up with reverse
proxy/static server with lean, fast networking. Depends on how long the
class is I suppose.
On Tue, Dec 9, 2008 at 3:32 PM, Jane <[EMAIL PROTECTED]> wro
74 matches
Mail list logo