I am trying to use the application
http://code.google.com/p/django-pagination/, that you proposed in the latest
post.
But getting an exception. Could you help to fix it please?
TemplateSyntaxError at /section/home
Caught an exception while rendering: 'request'
Original Traceback (most recent c
Thanks Karen but I'm just getting a 'NoneType' object has no attribute
'objects' with this code:
def search(request):
query = request.GET.get('q', '')
model = request.GET.get('models', '')
model_class = get_model(blog, model)
results = []
if query:
results = model_class
On Nov 19, 1:28 am, geraldcor wrote:
> Ok,
>
> Here is how I do it if I am using a regular form with a regular view:
>
> profile = request.user.get_profile()
> form = MyForm('company': profile.defaultcompany, 'contact':
> profile.defaultcontact, etc...})
> return render_to_response('forms/submit
Hi,
I'm am green-hand to linux.
When I use /usr/bin/su nobody -c /usr/local/bin/python /home/admin/cc/
manage.py runfcgi
method=threaded host=127.0.0.1 port=12345
it say "This account is currently not available."
Because nobody's shell is /sbin/nologin,I could not use su?
what is the normal way o
On Wed, Nov 18, 2009 at 9:09 PM, neridaj wrote:
> Hello,
>
> I have a select menu which I would like to use as a model selector in
> a view but I keep getting 'unicode' object has no attribute 'objects'
> because I need to cast this to type Model or something similar. How do
> I go about doing th
On Wed, Nov 18, 2009 at 8:28 PM, Alessandro Ronchi <
alessandro.ron...@soasi.com> wrote:
> I get the same problem also with an Assert False (a typical debug symbol
> I've used with mod_python).
>
> http://dpaste.com/16/
>
> no browser and no email, only logs.
>
>
You seem to have put the asse
Hello,
I have a select menu which I would like to use as a model selector in
a view but I keep getting 'unicode' object has no attribute 'objects'
because I need to cast this to type Model or something similar. How do
I go about doing that.
Thanks,
J
--
You received this message because you ar
On Thu, Nov 19, 2009 at 2:02 AM, Karen Tracey wrote:
> On Wed, Nov 18, 2009 at 7:29 PM, Alessandro Ronchi <
> alessandro.ron...@soasi.com> wrote:
>
>>
>>
>> http://dpaste.com/122205/
>> is my log file.
>>
>>
> Traceback shows it is dying during the load of middleware. You would not
> get a prett
On Wed, Nov 18, 2009 at 7:29 PM, Alessandro Ronchi <
alessandro.ron...@soasi.com> wrote:
>
>
> http://dpaste.com/122205/
> is my log file.
>
>
Traceback shows it is dying during the load of middleware. You would not
get a pretty debug page for this even with DEBUG=True and running the
development
On Thu, Nov 19, 2009 at 1:08 AM, Graham Dumpleton <
graham.dumple...@gmail.com> wrote:
>
>
> On Nov 19, 10:48 am, Alessandro Ronchi
> wrote:
> > With mod_wsgi I only get error logged into apache and not on the
> interactive
> > trackback in the browser, also If i set DEBUG=True in my settings.
>
Django users,
I have data that needs to be handled in two different manners,
depending on if the user has certain permissions or not. For example,
if a record is marked "private" and a user is not permitted, I want to
substitute the word "PROTECTED" for a particular field's value.
Now, of course
On Nov 19, 10:48 am, Alessandro Ronchi
wrote:
> With mod_wsgi I only get error logged into apache and not on the interactive
> trackback in the browser, also If i set DEBUG=True in my settings.
>
> Is there any way to handle the django trackback as usual?
Is the error definitely from Django and
On Thu, Nov 19, 2009 at 12:48 AM, Alessandro Ronchi <
alessandro.ron...@soasi.com> wrote:
> With mod_wsgi I only get error logged into apache and not on the
> interactive trackback in the browser, also If i set DEBUG=True in my
> settings.
>
> Is there any way to handle the django trackback as usu
With mod_wsgi I only get error logged into apache and not on the interactive
trackback in the browser, also If i set DEBUG=True in my settings.
Is there any way to handle the django trackback as usual?
--
Alessandro Ronchi
SOASI
Sviluppo Software e Sistemi Open Source
http://www.soasi.com
http:
Hi there!
I have a Django based website with a few dozen users. Only logged
users can enter the website and browse its pages.
I wish I could set up a stats page, i.e. some sort of table listing
how many accesses to the website for a given user. Specifically, I
need:
- per-user number of accesses
On Nov 18, 10:50 pm, Wayne wrote:
> Thanks for your reply.
>
> My situation is a little bit more tricky. I have table A and table B.
> Table B has several columns, two of which are tableID and resourceID.
> Table B is related to table A in the following way:
> select * from table B where b.tableID
Thanks for your reply.
My situation is a little bit more tricky. I have table A and table B.
Table B has several columns, two of which are tableID and resourceID.
Table B is related to table A in the following way:
select * from table B where b.tableID= (table A) and b.resourceID=
(primary key of
On Nov 19, 8:53 am, Alessandro Ronchi
wrote:
> On Wed, Nov 18, 2009 at 10:29 PM, Graham Dumpleton <
>
>
>
>
>
> graham.dumple...@gmail.com> wrote:
>
> > Yes, don't be so concerned in the first instance of trying to squeeze
> > the most out of mod_wsgi configuration. You will get much more
> > dr
Oh, I see it's much easier to solve this problem by overriding the
admin index view by putting something like this in the main URLconf:
(r'^admin/$', 'admin_views.dashboard'),
and then putting my dashboard view (and other custom views) into an
admin_views.py file in the site root. As described he
Ok,
Here is how I do it if I am using a regular form with a regular view:
profile = request.user.get_profile()
form = MyForm('company': profile.defaultcompany, 'contact':
profile.defaultcontact, etc...})
return render_to_response('forms/submit.html', {'form': form},
context_instance=RequestContex
On Nov 18, 9:45 am, CDR wrote:
> Hello,
>
> I've encountered this database exception error: "ORA-01830: date
> format picture ends before converting entire input string."
>
> the sql that produced it was:
>
> sql
> u'INSERT INTO "CBR" ("ORG_ID", "BCID", "NAME", "TCC", "TDC", "TFC",
> "STARTPERIOD"
I am working on a web site in a windows development environment, but
the hosting plan that my client is currently using runs a Linux
server. Can anyone tell me if there are significant hardships in
making this transition between Windows development vs. Linux
deployment. Thanks for reading.
--
You
On Wed, Nov 18, 2009 at 10:29 PM, Graham Dumpleton <
graham.dumple...@gmail.com> wrote:
>
> Yes, don't be so concerned in the first instance of trying to squeeze
> the most out of mod_wsgi configuration. You will get much more
> dramatic gains by improving your database queries/performance and pag
Hi-
I'm very new to Django, and trying to set up a site with a customized
admin section. Specifically, I'm trying to override the default admin
index page with stats & useful links. This will require more than just
modifying the template, so I'm trying to create a new AdminSite
instance as describe
On Nov 19, 7:36 am, Alessandro Ronchi
wrote:
> I'm running several django applications on different vhosts on a virtual
> server.
> In that virtual server I have enough ram and cpu and I want to get the
> fastest configuration for mod_wsgi.
>
> I don't have much cuncurrent users on the same vir
I'm running several django applications on different vhosts on a virtual
server.
In that virtual server I have enough ram and cpu and I want to get the
fastest configuration for mod_wsgi.
I don't have much cuncurrent users on the same virtual host, but I have a
lot of files for every page so I sh
I would say template tags are the nice little framework for doing
this.
you could create a tags the looks in a certain path for files ending
in '.js' based on the model or application and join it with
settings.MEDIA_URL.. have it return a string of text or a list of
strings that you can iterate ov
I'm making a game link site, where users can post links to their
favorite web game.
When people post games they are supposed to check what category the
game falls into.
I decided to allow many categories for each game since some games can
fall into many categories.
So the question is, how do I han
On Nov 18, 6:46 pm, Wayne wrote:
> Hi,
>
> I am working with a legacy database which does not set foreign key
> constraints at all between tables. I am wondering if I can still
> create Inline admin interface by relating two objects through
> different methods. If it is doable, what is the best wa
Hi,
I am working with a legacy database which does not set foreign key
constraints at all between tables. I am wondering if I can still
create Inline admin interface by relating two objects through
different methods. If it is doable, what is the best way of doing it?
Thanks,
Wayne
--
You recei
Its not clear how you differentiate one measure as speed or another as
dir. Assuming only one has a link to another measure then you could
do something like:
results = Measurand.objects.exclude(entry__isnull=True).select_related
()
for speed in results:
speed_avg = speed.avg_value
dir_av
When using fields provided by this app there is no add link displayed
above the widget. This is very unhandy because it's impossible to add
a new related item, while editing the post. How can i accomplish this?
I also had problems selecting objects when the foreignkey is to the
same model, it does
Hello,
I've encountered this database exception error: "ORA-01830: date
format picture ends before converting entire input string."
the sql that produced it was:
sql
u'INSERT INTO "CBR" ("ORG_ID", "BCID", "NAME", "TCC", "TDC", "TFC",
"STARTPERIOD", "ENDPERIOD", "STATUS")
VALUES (1, 1, Monthly
Adam and Skylar,
The ISP's support just replied to my ticket. They set the urls.py as
urlpatterns = patterns('',
(r'^wkw1/$', 'sw1.wkw1.views.index'),
(r'^admin/$', 'django.views.generic.simple.redirect_to', {'url': '/
admin/wkw1/lawyer'}),
(r'^admin/wkw1/$', 'django.views.generic.sim
On Wed, Nov 18, 2009 at 2:01 AM, Ilya Polosuhin wrote:
> Just use "initial" keyword on creation form
> class myForm(forms.Form):
> test = forms.CharField(label = _('test'), max_length=255, required =
> True)
>
> myForm(initial = {'test': 'test string'}).
>
> If you use form that generated
On Nov 16, 2009, at 12:12 PM, despy wrote:
> Hi,
>
> I'm trying to get my head around a complex aggregate query and I could
> do with some help. Say I have the following models
>
> StockMarket
> |
> Stock
> |
> StockPrice
>
> If StockPrice has price and date fields, and one price entry for ever
> 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
On Nov 18, 2009, at 6:06 AM, Zeynel wrote:
> I've been trying to redirect
>
> /admin/ to /admin/wkw1/lawyer
>
> The suggestions from my previous post
> http://groups.google.com/group/django-users/msg/67c4594a4083bd45
> did not work.
>
> I read the redirect section in the documents as suggested
> 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
Hi,
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.
Here is my code:
class ContactForm(BetterModelForm):
class Meta:
model = Disposal
fieldsets = (('row1', {'fiel
Ok, so the model, the formfield and the widget each take a 'choices'
attribute. You have to specify the choices on the formfield for any
choices to show up.
incidentally the styling of CheckboxSelectMultiple seems to be
buggered in the admin, on a Mac at least (FF and Safari)
On Nov 18, 12:06 pm
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
Hi there,
I'm using a ModelForm and had the wish to use fieldsets.
After a short search I've found this:
http://pypi.python.org/pypi/django-form-utils/0.1.5
Seems to be what I want. So I've installed it and changed my form from
ModelForm to BetterModelForm.
It works so far, but when I try to cr
On Wed, Nov 18, 2009 at 3:53 AM, victor wrote:
> Hi, All.
>
> I'm newbie to DJango / BSD lincense.
>
> I have to create web application + desktop widgets. Web application
> will use django, and desktop widget will use django ORM. Can I do this
> under djnago license:
>
> 1) Desktop widget is clos
thank you sir i found the solution
--
View this message in context:
http://old.nabble.com/How-to-use-subqueries-in-django-tp26387486p26408019.html
Sent from the django-users mailing list archive at Nabble.com.
--
You received this message because you are subscribed to the Google Groups
"Djang
>>> urls.py:
>>> urlpatterns = patterns('',
>>> (r'^polls/', include('mysite.polls.urls')),
>>> (r'^site_media/(?P.*)$', 'django.views.static.serve',
>>> {'document_root': '/mysite/media/'}),
>>> )
Since I always start Django in its "root" directory, I put something like:
On Wed, Nov 18, 2009 at 2:15 AM, Radhikavk wrote:
>
> in one query they have giver or conditions
> but i need
> i wil have one common query like
> list=rooms.objects.all() # this is common query i m using
>
> and if the condition given like room status,type etc then i need to append
> those wher
On Wed, Nov 18, 2009 at 12:12 AM, Denis Bahati wrote:
> Hi All,
> I have created a login screen for users of the site which is like User
> Profile and uses the username and password from django users. When i try to
> login to my view i get the error below.
>
> Environment: Request Method: POST Re
Thanks Jeremy, got it.
jeremyrdavis schrieb:
> The document root specified in urlpatterns should match the directory
> where your files are located. You have "/mysite/media/" in your
> urlpatterns and "C:\django_projects\mysite\media" in your post. Make
> sure those match.
>
>
> On Nov 18, 6:56
how do you make them similar? because its also a problem to with TinyMCE.
On Wed, Nov 18, 2009 at 4:13 PM, jeremyrdavis wrote:
> The document root specified in urlpatterns should match the directory
> where your files are located. You have "/mysite/media/" in your
> urlpatterns and "C:\django_pr
The document root specified in urlpatterns should match the directory
where your files are located. You have "/mysite/media/" in your
urlpatterns and "C:\django_projects\mysite\media" in your post. Make
sure those match.
On Nov 18, 6:56 am, "Benjamin W." wrote:
> Hi there,
>
> I'm new to djang
Hi Francois -
there is no script for parsing. I'm importing CSV files right into
the database through the import function in myphpadmin. I've
populated the following tables:
product_price
product_product
product_productpricelookup
product_product_category
the items are not showing in the /admi
Hi there,
I'm new to django and got my first little problem.
I want to use a css file in my template. So I read this:
http://docs.djangoproject.com/en/dev/howto/static-files/
I set up everything, but I don't get the file.
My config:
urls.py:
urlpatterns = patterns('',
(r'^polls/', includ
I am trying to use a CommaSeparatedIntegerField in one of my
models... there doesn't seem to be a suitable widget for editing this
field though?
Seems like one of the 'select multiple' widgets would be an obvious
choice. SelectMultiple seems the default widget for it in admin, but
it renders an e
Hello Djangoists,
I am looking for a consultant who knows how to configure Django in
relationship to Apache. This is a paid gig. please contact me at my e-
mail hnara...@hanzinet.com we can discuss details.
Brief statement of the problem
I have had problem configuring Django to handle two projec
I've been trying to redirect
/admin/ to /admin/wkw1/lawyer
The suggestions from my previous post
http://groups.google.com/group/django-users/msg/67c4594a4083bd45
did not work.
I read the redirect section in the documents as suggested
http://docs.djangoproject.com/en/dev/ref/generic-views/#djan
On Wed, Nov 18, 2009 at 8:25 AM, Fm wrote:
> Hi all,
> I have write a script in /etc/rc.d/init.d so that Django can start
> with my server.
> It may look like
> start () {
>echo -n $"Starting $prog: "
> /usr/local/bin/python /home/admin/cc/manage.py runfcgi method=threaded
> host=127.0.0.1 po
Hi all,
I have write a script in /etc/rc.d/init.d so that Django can start
with my server.
It may look like
start () {
echo -n $"Starting $prog: "
/usr/local/bin/python /home/admin/cc/manage.py runfcgi method=threaded
host=127.0.0.1 port=12345
}
Then I can see
ps aux|grep manage
root 2478
Hi, All.
I'm newbie to DJango / BSD lincense.
I have to create web application + desktop widgets. Web application
will use django, and desktop widget will use django ORM. Can I do this
under djnago license:
1) Desktop widget is closed source.
2) Sell web application / desktop widget (maybe also
Thank you for replies :-)
I forgot to mention important thing:
Those website modules will probably be run on separate hosts (they can
be put on different hosts or virtual hosts, but still use the same
database)
.. so one point in "What is common between them": "global
configuration (database uri,
what's your model like? What's your import script like? What's your sheet like?
We need an idea of what you're trying to do before we can help.
I've personally always preferred writing a parser for the xls file (usually in
csv form instead of xls, though)
and directly create/use/save the model ob
Just use "initial" keyword on creation form
class myForm(forms.Form):
test = forms.CharField(label = _('test'), max_length=255, required =
True)
myForm(initial = {'test': 'test string'}).
If you use form that generated from model:
class myForm(forms.Form):
class Meta:
model = myMod
Hi all,
Let's say I have a django app that feeds content to multiple sites. I
have an admin user for "Site1" and an admin user for "Site2". I would
like to set things up so that the guy from "Site1" can't see/edit the
content for "Site2".
What's the best way to set this up?
Thanks for your hel
65 matches
Mail list logo