Hi
I was using the email ID as the username as shown below in my view.py
view.py
--
def signup(request)
..
username=emailid ;
valid_user = authenticate
(username=username,password=password )
..
and it works fine for me
Django version being the development version
# djang
Hi,
I'm getting the error 'str' object has no attribute 'creation_counter'
in Django admin when adding an Inlines option to an admin.ModelAdmin
class... and I don't understand why.
Traceback:
File "C:\python25\lib\site-packages\django\core\handlers\base.py" in
get_response
86.
In unit tests i need to load few fixtures i have done as below
class TestQuestionBankViews(TestCase):
#load this fixtures
fixtures = ['qbank',]
def setUp(self):
login = self.client.login
(email="m...@gmail.com",password="welcome")
def test_start
have you gone through the below url:
http://www.b-list.org/weblog/2007/nov/01/django-tips-template-loading-and-rendering/
On Jun 22, 5:49 pm, z0n3z00t wrote:
> I have a common site that is used by different clients. Each client
> wants to be able to custom-brand the site to their liking.
>
> H
Upon further reading I decided that while I do need the developer
tools, that wasn't keeping me from doing this. (still downloading, by
the way.)
I ran the command: sudo python setup.py install
it ran fine, and among the things it told me:
copying build/scripts-2.5/django-admin.py -> /usr/local/
On Tuesday 23 June 2009 09:14:01 adelaide_mike wrote:
> form = MyModelForm(initial={'myforeignkeyfieldname': myvalue})
assuming the foreignkey value exists, then you would have to insert it's id
into the field myforeignkeyfieldname_id.
--
regards
kg
http://lawgon.livejournal.com
--~--~
Usually Foreign keys are displayed as drop down select list where user
can choose one is multiple options.
Foreign keys are usually initialized with list of tuples [(internal
value,display),(interavalue1,displayvalue2)..]
if you want to present just prepare the list of tuples and give it to
I decided to start over. Threw out the Python and Django folders, re-
downloaded Python and read the instructions on installing again. When
I ran the ./configure command, I got the error that there is no
acceptable C compiler in the $PATH. I looked around online and the
problem may be that I don't
Having failed to get any takers to my earlier posts on this, I will
keep it v. short:
How do I preset a foreign key value in a Model Form?
form = MyModelForm(initial={'myforeignkeyfieldname': myvalue})
does not do it.
Surely this can be done?
Mike
--~--~-~--~~~---~
I am having trouble pickling, and then saving to the DB, django models
with Unicode text in them. The site is for Spanish speakers, so we
need our ñs, és and ös.
I implemented an unlimited undo feature for a Django site, using this
PickleField snippet:
http://www.djangosnippets.org/snippets/513/
This is the motivation for me to write this piece of middleware :
http://yml-blog.blogspot.com/search/label/Internationalisation
--yml
On Jun 22, 5:52 pm, Olivier wrote:
> Hello everyone,
>
> I'm currently using django localization on my site to manage both
> english and french. I'm using templa
Have you tried creating a symbolic link from within the MEDIA_ROOT to
the directory you want to use?
On Jun 22, 5:04 pm, Nick wrote:
> Hi,
>
> I need to be able to upload using the admin interface to outside of
> MEDIA_ROOT. For example, my MEDIA_ROOT is "/home/site.com/media/" but
> I want to
Has anyone gotten the MaxMind GeoIP functionality working on Windows?
I'm having a tough time getting the dll compiled from source and can't
seem to find it anywhere.
--
--Leo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goo
On Mon, Jun 22, 2009 at 5:30 PM, pr wrote:
> Yes, I know what you mean, but It's small project with one programmer.
> I want to know about speed and stability in production mode above
> rules of 'programming-tao' :-)
Well, there's also the fact that:
1. Using a profile means relying on documente
On 22 Cze, 23:14, James Bennett wrote:
> No, it's a very bad method. Consider what happens if two people want
> to add fields of the same name; trying to stick them in the User model
> will obviously fail and break at least one person's code.
Yes, I know what you mean, but It's small project with
Hi group!
I've a problem with AdminSite. I don't know how can I get 3 admin sites
differents and if it's posible to do it.
I've a project with two applications, and I want one admin site for each one
and the other to manage the project and applications (at the project level).
I've been readin
On Mon, Jun 22, 2009 at 4:01 PM, pr wrote:
> Is it a good way to extend Django User model using add_to_class()?
> I have to add only two extra fields to the User model and I think that
> using Profile Model to do this is unnecessary.
No, it's a very bad method. Consider what happens if two people
Hi,
Is it a good way to extend Django User model using add_to_class()?
I have to add only two extra fields to the User model and I think that
using Profile Model to do this is unnecessary.
My way:
# Accounts models.py
User.add_to_class('field1', models.CharField(max_length=255))
User.add_to_cla
Oh yes, I should have known that:
* you must have inlines for this to work.
* the if line should be: if formset.cleaned_data[0]['yourfield'] ==
yourfield_value:
end of update...
On Jun 22, 1:11 pm, hadaraz wrote:
> Hi,
>
> I recently needed to override a manytomany field on the save_model()
On Mon, Jun 22, 2009 at 3:36 PM, nevvkid wrote:
>
> Hello together,
> i wonder if it's possible to add a custom filter to a join "ON". E.g.
> a query:
>
> SELECT * FROM `table` INNER JOIN `table_attribute` ON (`table`.`id` =
> `table_attribute`.`lamp_id` AND foo=bar);
>
> Please have a look at "f
Hello together,
i wonder if it's possible to add a custom filter to a join "ON". E.g.
a query:
SELECT * FROM `table` INNER JOIN `table_attribute` ON (`table`.`id` =
`table_attribute`.`lamp_id` AND foo=bar);
Please have a look at "foo=bar".
There is a method "filter" for django models, but that'
On Jun 20, 3:35 pm, Ramiro Morales wrote:
> On Fri, Jun 19, 2009 at 5:15 PM, Joshua Russo wrote:
>
> > When I installed Libiconv (1.9.2) and gettext (0.13) on my XP Pro
> > machine and tried to run makemessages it initially gave me an error
> > message saying that it could not find iconv.dll. I
On Mon, Jun 22, 2009 at 3:04 PM, IanR wrote:
>
> I have a model with a ManyToManyField. I want to return all the
> instances where this M2M field has specific instances of the table
> that the M2M field points at.
>
> For example. Model.objects.filter(m2mfield__id=1,m2mfield__id=2), so
> in the
I have a model with a ManyToManyField. I want to return all the
instances where this M2M field has specific instances of the table
that the M2M field points at.
For example. Model.objects.filter(m2mfield__id=1,m2mfield__id=2), so
in theory this would return results in which the objects with pri
Hi,
I need to be able to upload using the admin interface to outside of
MEDIA_ROOT. For example, my MEDIA_ROOT is "/home/site.com/media/" but
I want to upload to "/home/uploads/". Whenever I try to do this by
setting an absolute upload path I get a SuspiciousOperation error.
I'd like to do this
On Jun 20, 3:35 pm, Ramiro Morales wrote:
> On Fri, Jun 19, 2009 at 5:15 PM, Joshua Russo wrote:
>
> > When I installed Libiconv (1.9.2) and gettext (0.13) on my XP Pro
> > machine and tried to run makemessages it initially gave me an error
> > message saying that it could not find iconv.dll. I
On Mon, Jun 22, 2009 at 1:58 PM, Sean Brant wrote:
>
> This is best explained with an example.
>
> i have a model for Stats
>
> class Stat(models.Model):
>key = models.CharField(max_length=50)
>value = models.TextField()
>pub_date = models.DateTimeField()
>
> so if i create a few stat
I figured it wasn't a bug and I just had to do the right escape sequence,
but Karen mentioned that it might be a bug. Guess not. Hope this helps
someone else in the future.
Greg
On Mon, Jun 22, 2009 at 12:19 PM, Erik Vorhes wrote:
>
> On Mon, Jun 22, 2009 at 12:52 PM, Greg Corey wrote:
> > Kare
This is best explained with an example.
i have a model for Stats
class Stat(models.Model):
key = models.CharField(max_length=50)
value = models.TextField()
pub_date = models.DateTimeField()
so if i create a few stat objects lets say these.
stat1 = Stat(key='total_books_sold', value
Hi,
I want to get total price (quantity*price) in this example for objest
list (not one) of A class
class A(models.Model)
name = models.CharField(max_length=255)
class B(models.Model)
quantity = models.PositiveIntegerField()
price = models.DecimalField(max_digits=10, decimal_places=2)
a
Hi,
I want to get total price (quantity*price) in this example for objest
list (not one) of A class
class A(models.Model)
name = models.CharField(max_length=255)
class B(models.Model)
quantity = models.PositiveIntegerField()
price = models.DecimalField(max_digits=10, decimal_places=2)
a
On Mon, Jun 22, 2009 at 12:52 PM, Greg Corey wrote:
> Karen, the double % ( i.e. 'discount%%') worked. Is this a big enough bug
> that it should be reported? I'm not sure what is a bug and what is just my
> ignorance. Thank you sooo much for the help.
The first % escapes the second % sign, and th
On Monday 22 June 2009 10:27:22 am Vlad(L) wrote:
> Mike, excuse that I occupy your time.
>
> All has made also, but is not present Image.
> I will write more in detail. When I instal, for example, "{{MEDIA_URL}} {{art.image}}" width=200;/> image it is not displayed
> on html page, but the place u
Karen, the double % ( i.e. 'discount%%') worked. Is this a big enough bug
that it should be reported? I'm not sure what is a bug and what is just my
ignorance. Thank you sooo much for the help.
Greg
On Fri, Jun 19, 2009 at 8:09 PM, Greg Corey wrote:
> I will try that tomorrow and let you know.
Hi.
I want group many functions in a single transaction. Let's say that I
have a function that calls other functions that manipulate some
database objects. If I catch an exception in the first function, I
want to rollback all changes made by this function as well as the
changes made by the called
Mike, excuse that I occupy your time.
All has made also, but is not present Image.
I will write more in detail. When I instal, for example, image it is not displayed
on html page, but the place under a figure and together with a red
dagger in a corner is displayed. If here it is possible to load
Hi
Further to the above discussion,
I did implement the code and it worked for me for the authentication
while using the email id as the username
(username=emailid ; valid_user = authenticate (username=username,
password=password )
# django-admin.py --version
1.1 beta 1 SVN-10957
1.) The pro
On Monday 22 June 2009 09:14:41 am Vlad(L) wrote:
> art.html
>
> {% for art in art %}
> {{ art.title }}
> {{art.anonce }}
>
>
> {% endfor %}
>
>
This will add the media url that you set for MEDIA_URL in settings.py (as long
as the context processor for media is also set)
an ex
Fortunately there other sites that offer a list of plugins, for
example: http://djangozen.com/plugins and http://djapp.org. The former
has every plugin from djangoplugables on it.
On 22-Jun-09, at 8:25 AM, Dunsun wrote:
>
> Hi,
>
> I am not able to access djangoplugables.com.
> It has been d
Hello everyone,
I'm currently using django localization on my site to manage both
english and french. I'm using template tags blocktrans and block but
both the french & english pages have the same url. I'm wondering if
the search engines can work with this configuration and index the two
versions
Hi,
I am not able to access djangoplugables.com.
It has been down for 2 days.
--~--~-~--~~~---~--~~
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
Ok!
views.py
from booksite.books.models import Article
from django.template import RequestContext
def art(request):
art = Article.objects.all()
return render_to_response('art.html', {'art': art},
context_instance=RequestContext(request))
art.html
{% for art in art %}
On Monday 22 June 2009 08:06:25 am Vlad(L) wrote:
> Mike, I work on Django 1.0.2 - in this version in settings.py is not
> mentioned at all about Media context processor and RequestContext. To
> me they need to be added in addition most???
It's not mentioned in the settings.py file, but that's why
Hi,
It's easy to receive test coverage information from Django tests. (See
below if you search for a solution...)
But is it possible to receive the same kind of coverage information
from test tools like Windmill (or Selenium)?
I believe, it's probably difficult because these tools execute again
Thank you guys!
Graham,
I tried the conf you described and it is working great :)
I'm also found this thread where you also participated and was very
useful:
http://markmail.org/message/62cb2sdj54yey7qz#query:wsgi.url_scheme+page:1+mid:l72acuzuldfpmbdw+state:results
Kenneth,
thanks for the lin
Mike, I work on Django 1.0.2 - in this version in settings.py is not
mentioned at all about Media context processor and RequestContext. To
me they need to be added in addition most???
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
On Jun 19, 7:08 pm, Joshua Russo wrote:
> I'm trying to use the makemessages command to create .po files and I'm
> running into a problem scanning .html files. I'm running XP Pro and
> using libiconv (1.9.2) and gettext (0.13).
>
> None of the {% trans 'text' %} entries are being picked up in the
another note: it doesn´t matter if I restrict the tests to "myapp" or
any other app (e.g. "tagging" or "sorl-thumbnail") I´ve installed.
with every test, all tables are created/removed.
On 22 Jun., 14:50, patrickk wrote:
> unfortunately, I´m still stuck with it ...
>
> here´s my tests.py:
>
>
Hi,
I recently needed to override a manytomany field on the save_model()
method in the admin. However, this is not possible because it will get
overwritten later with the original values. I asked if this will
change in the future on the django-developers list:
http://groups.google.com/group/djang
unfortunately, I´m still stuck with it ...
here´s my tests.py:
import unittest, os
class BaseTest(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_fileobject(self):
pass
even with this stripped-down version, _all_ tests are perfo
I have a common site that is used by different clients. Each client
wants to be able to custom-brand the site to their liking.
How it works: I provide a default theme for the site, i.e. templates
and media, that clients can easily export and customise to their
liking. All default template files
that´s it. thanks a lot.
On 22 Jun., 13:28, Russell Keith-Magee wrote:
> On Mon, Jun 22, 2009 at 6:42 PM, patrickk wrote:
>
> > this is the first time I´m using the test-framework, so it might be a
> > really stupid question.
>
> > when using
> > python manage.py test myapp
> > or
> > python ma
On Mon, Jun 22, 2009 at 6:42 PM, patrickk wrote:
>
> this is the first time I´m using the test-framework, so it might be a
> really stupid question.
>
> when using
> python manage.py test myapp
> or
> python manage.py test myapp.BaseTest
> I´m getting lots of output for other apps than "myapp" - i
On Monday 22 June 2009 03:04:03 am Vlad(L) wrote:
> Unfortunately, it is impossible. Through a browser has looked html
> code - p>
>
> And how should be correctly registered MEDIA_URL in my case if I work
> on built in server Django?
In your settings.py check the context processors and make sure
def art(request):
art = Article.object.all()
retrun % (art)
art.allow_tags = True
try this .Add this in your model or if in admin then pass object .then use
list_display to display the image.see docs for more help:
http://docs.djangoproject.com/en/dev/ref/contrib/admin/
On Mon, Jun 22, 2009 at
this is the first time I´m using the test-framework, so it might be a
really stupid question.
when using
python manage.py test myapp
or
python manage.py test myapp.BaseTest
I´m getting lots of output for other apps than "myapp" - it seems that
tests are running for every installed app (and not ju
It so needs to be made?
def art(request):
art = Article.objects.all()
return render_to_response('art.html', {'art': art})
art.allow_tags = True
I so have written, but all the same it is impossible
http://127.0.0.1:8000/article/media/1.jpg
It can is necessary to make, that the
not got ur question.If u want to display image then set allow_tags=True.
On Mon, Jun 22, 2009 at 3:34 PM, Vlad(L) wrote:
>
> Unfortunately, it is impossible. Through a browser has looked html
> code - p>
>
> And how should be correctly registered MEDIA_URL in my case if I work
> on built in se
Unfortunately, it is impossible. Through a browser has looked html
code -
And how should be correctly registered MEDIA_URL in my case if I work
on built in server Django?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gro
2009/6/21 Alessandro Ronchi
>
> it gets into the except and tries to open another User with the same id!
>
It seemed to be a very big int for uid that caused a truncation when saving
into database.
--
Alessandro Ronchi
Skype: aronchi
SOASI Soc.Coop. - www.soasi.com
Sviluppo Software e Sistemi
Yes, just don't do the extends and include all the HTML you need in the
template.
Tim.
>
> Hello.
>
> Is there any way to render a template, omitting the "extends" tag?
> >
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goo
Hello.
Is there any way to render a template, omitting the "extends" tag?
--~--~-~--~~~---~--~~
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 un
62 matches
Mail list logo