Newbie - Foreign Key Error

2009-01-08 Thread Tony
Dear List, I'm developing with 1.0.2 and am getting the following error: (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (`project/comment_comment`, CONSTRAINT `in_reply_to_id_refs_id_35b80077` FOREIGN KEY (`in_reply_to_id`) REFERENCES `comment_comment` (`id`))') ..

Re: Newbie - Foreign Key Error

2009-01-09 Thread Tony
letting the DB cascade deletes across models? On Jan 8, 11:17 pm, Tony wrote: > Dear List, > > I'm developing with 1.0.2 and am getting the following error: > > (1451, 'Cannot delete or update a parent row: a foreign key constraint > fails (`project/

Re: Newbie - Foreign Key Error

2009-01-09 Thread Tony
man/5.1/en/update.html + http://www.dbforums.com/mysql/1191227-cannot-delete-update-parent-row-foreign-key-constraint-fails.html On Jan 9, 10:23 pm, Tony wrote: > I read somewhere that InnoDB cant determine the order to apply DB > operations to rows when the request spans multipl

finding current url

2010-07-22 Thread Tony
mainsite.com/someDjangoView. How can I find out if the user typed in siteone.com or sitetwo.com even though they both have the same destination? thanks, Tony -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

scaling my site

2010-07-23 Thread Tony
7;m a little unaware on how to put something into production and how everything connects. I accept and appreciate any advice on the matter. Thanks, Tony -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send em

checking sessions from another domain

2010-07-27 Thread Tony
other domain, keeping in mind they are all pointed to the same website. thanks for any advice, Tony -- 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 t

importing models to script file

2010-08-04 Thread Tony
Hi, Im trying to import my models to another python file that I am making to use the database data. The problem is, I can't import the models for some reason. It keeps saying "ImportError: no module named " The thing is, it works on my home computer when I do it, but when I do it on webfacti

importing models to script file

2010-08-04 Thread Tony
Hi, Im trying to import my models to another python file that I am making to use the database data. The problem is, I can't import the models for some reason. It keeps saying "ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined." The thing is

reading pickled files

2010-08-12 Thread Tony
This is more of a python question but its in my Django project. I am reading a unicode object and an integer from a database into a dictionnary and storing that in a pickled file. Ive confirmed the dictionary is done correctly because i print it out from the pickled file later to check. I also c

reading pickled files cont.

2010-08-12 Thread Tony
I just realized it said the error occurred here: /home/opadmin/webapps/django/lib/python2.6/django/http/__init__.py in _get_content, line 395 So I guess dJANGO has something to do with it -- You received this message because you are subscribed to the Google Groups "Django users" group. To post t

csv files

2010-08-13 Thread Tony
My script right now basically just reads from a csv file and puts it into a dictionary for me. However, when I make my own csv file (just the same as any I have seen), it acts inconsistently. For example, sometimes it starts at the second line and another time it kept starting at the end of the f

Fixture? Testing? how do you do it?

2008-04-01 Thread Tony
would be great. Thanks, Tony --~--~-~--~~~---~--~~ 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

running tests.py

2008-04-02 Thread Tony
.test import TestCase class UserAuthorisationTest(TestCase): def unauthorised_user(self): response = self.client.get('/lib/') self.failUnlessEqual(response.status_code, 302) """ It looks ok to me, but am I missing somet

Re: Fixture? Testing? how do you do it?

2008-04-02 Thread Tony
, "/submission/ > peaceful-haiku/") > > Hope that helps. Obviously, this only works for unit tests. I'm not > entirely sure how you load fixtures for doctests, maybe someone more > experienced would like to tackle that. > > On Apr 1, 12:31 pm, Tony <[EMAIL PROT

Re: running tests.py

2008-04-02 Thread Tony
Ah I see, "tests.py" rather than "test.py" Its an annoying detail that a newbie like me would miss. Thanks. On Apr 2, 10:35 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 4/3/08, Tony <[EMAIL PROTECTED]> wrote: > > > > > H

TestCase: Client Login always false

2008-04-03 Thread Tony
27;, password='apassword') self.failUnlessEqual(response, True) """ I have used Djangos inbuilt user authorisation through the use of "from django.contrib.auth.models import User". I am also using decorators. Where am I going wrong? Thanks in advance, Tony --~--~

Re: TestCase: Client Login always false

2008-04-03 Thread Tony
Ah sweet, thanks DR. It doesn't tell you that in the documentation, but I guess thats the reason for loading fixtures. On 3 Apr, 10:19, Daniel Roseman <[EMAIL PROTECTED]> wrote: > Tony wrote: > > Hi > > > I have tried numerous ways to login through client() but

TestCase: template.name AttributeError

2008-04-03 Thread Tony
I keep getting an AttributeError then I specify "self.assertEqual(response.template.name, 'index.html')" I keep getting... AttributeError: 'list' object has no attribute 'name' Is there something I have missed in the setu

TestCase: problem with returning posted data, it returns excepted data instead

2008-04-06 Thread Tony
for datagroup: ALC' in response.content) """ Its failing on "self.failUnless('Results for datagroup: ALC' in response.content)" because the posted data has not been rendered, so instead its rendering dg="". Anyidea why this is? Is it the way I have wr

Re: Testing Search form processing

2008-04-07 Thread Tony
Ah I know where I have gone wrong now. I should have specified q instead of query in my test function. Its so obvious now. I think I spent too long looking at test function, it made my eyes blurry. Thanks Tony On Apr 7, 10:47 am, Tony <[EMAIL PROTECTED]> wrote: > I have dev

Testing Search form processing

2008-04-07 Thread Tony
turn render_to_response("allsearch.html", { 'results': results, 'query': query, }) """ Thank you in advance for any help. Tony --~--~-~--~~~---~--~~ You received this message becau

Testing dynamic post data

2008-04-07 Thread Tony
ts) new.save() #matches projectid to project.id and filters checks for that project qset = (Q(projectid = project_id)) results = StudyChecksFinal.objects.filter(qset) return render_to_response('selected.html', { 'results

Django and LDAP

2012-09-10 Thread Tony
Hi everybody, I am new to Django and Python, and right now, i am going through the documentation. I have an assignment at my Faculty, where i need to install Django, 389ds LDAP server (where i have to store my users) and i need to somehow connect them two, so i can auth users from LDAP when log

Module or plugin architecture

2011-10-01 Thread Tony
Hello, I am new to Django and I have a question about module or plugin architecture. Is it possible to write a module with Django and add it to a current Django application. Thank you very much. Regards, Tony -- You received this message because you are subscribed to the Google Groups "D

manytomany query problem

2011-06-22 Thread Tony
I have two models with a manytomany through relation (A and B). B has a self referential manytomany relation (a userprofile model). How could I filter objects of model B per each relationship with model A? So lets say 3 arbitrary model A objects have 20 model B object relations each. I want to f

Re: manytomany query problem

2011-06-23 Thread Tony
ou defining the following structure: > > A hasMany B; > B hasMany A; > B hasMany B; > > So you want* A such that A.yourB1.yourB2 exists*? Sorry for the notation. > > > > On Thu, Jun 23, 2011 at 12:03 PM, Tony wrote: > > I have two models with a manytomany through

Re: manytomany query problem

2011-06-23 Thread Tony
nt to return is this: a1 to (b1,), a2 to None, a3 to (b1,). I always want to return all of my model "A" objects, but I want to filter the model "B" objects within each based on who the current user's "friend connections are". How do I do this in code? On Jun 23,

Re: manytomany query problem

2011-06-26 Thread Tony
' do you mean that you want some objects removed (i.e. > filtered), or, do you mean that you want all the A's returned to be in a > list that is sorted? > > > > > > > > > > On Fri, Jun 24, 2011 at 5:55 AM, Tony wrote: > > Nikhil, > > This

Re: manytomany query problem

2011-06-26 Thread Tony
Jun 24, 3:36 pm, Nikhil Somaru wrote: > When you say 'filter' do you mean that you want some objects removed (i.e. > filtered), or, do you mean that you want all the A's returned to be in a > list that is sorted? > > > > > > > > > > On Fri, Jun

Re: manytomany query problem

2011-07-18 Thread Tony
As I still haven't solved this, any suggestions would be appreciated. On Jun 26, 10:16 pm, Tony wrote: > Alex, > I did it your way and although it does return the intersected sets > correctly, it is not exactly what I want because I need those sets to > be returned with their r

list created from a table in my database

2011-01-12 Thread Tony
if I just do queries like modelname.object.filter(...) but the editing part and all that is still sort of up in the air. I appreciate any input on the matter. thanks, Tony -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

custom admin

2011-01-12 Thread Tony
Is there any way to make a custom admin for a site but use parts of the existing admin. It has a lot of good features but there are certaint hings I dont want revealed and yes i know I can limit access, but what if I want to limit lets say, a teacher to only his/her student's information, or i wan

jquery problem

2011-01-16 Thread Tony
I am using a jquery project for forms that someone else created to give myself a jump start on what Im trying to do. Unfortunately, I can't get any other plugins to work that I download. No other jquery plugins seem to work and Im pretty sure I have the directory paths right and everything. I ha

Re: jquery problem

2011-01-17 Thread Tony
ery version > > On Jan 17, 8:48 am, Tony Lambropoulos wrote: > > > Prashanth, > > This has to do with django because they work outside of django. > > > On Mon, Jan 17, 2011 at 6:12 AM, Prashanth wrote: > > > Hi Tony, > > > > On Mon, Jan 17, 2011

variable column name

2011-02-02 Thread Tony
If I return a string variable from a template to a view function, and the string variable is the name of a model (so I dont know which one it is) in a known class for a known object in the database, is there anyway I can change the data for that column without doing a bunch of if statements trying

jquery grid and django

2011-02-03 Thread Tony
I found a plugin that combines the two but you cant look at the source unless you have been approved by the creator. Is there any viable, simple way to use the jquery grid plugin with django fairly quickly? -- You received this message because you are subscribed to the Google Groups "Django use

chrome extension

2011-02-15 Thread Tony
Hi, Is there any way to have a chrome extension with a backend in Django, like for storing data server side and using its views? Or is this not possible? thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t

authentication

2011-03-09 Thread Tony
I have been looking into django-socialauth and am wondering how well it works. Another question I have about it is, if these users log in with their accounts from other sites, what is the best way for me to store their data and keep track of them? Thanks for the help. -- You received this messa

suspiciousoperation with file upload on django-cms

2011-03-22 Thread Tony
lable_name(name) File "C:\Python27\lib\site-packages\django\core\files\storage.py" in get_available_name 73. while self.exists(name): File "C:\Python27\lib\site-packages\django\core\files\storage.py" in exists 196. return os.path.exists(self.path(name)) File "

Re: suspiciousoperation with file upload on django-cms

2011-03-23 Thread Tony
It uses my CMS_PAGE_MEDIA_PATH, which is 'C:\Users\Tony\Documents\My Music\1'. Maybe this is the problem, but I dont know how to explicitely tell Django to use my MEDIA_ROOT. On Mar 22, 8:45 pm, Karen Tracey wrote: > On Tue, Mar 22, 2011 at 5:12 PM, Tony wrote: > >  

embedding tag in another tag

2011-03-23 Thread Tony
I have two tags, and I am trying to put together a dynamic form action url. For the url to come together lke I want, one would be embedded in the other, but when i try to do it this way, I get a parsing error. I've also tried using javascript and variables but the tags dont read the variable like

Re: suspiciousoperation with file upload on django-cms

2011-03-23 Thread Tony
racey wrote: > On Wed, Mar 23, 2011 at 3:26 PM, Tony wrote: > > It uses my CMS_PAGE_MEDIA_PATH, which is 'C:\Users\Tony\Documents\My > > Music\1'.  Maybe this is the problem, but I dont know how to > > explicitely tell Django to use my MEDIA_ROOT. > > Assuming t

Re: embedding tag in another tag

2011-03-23 Thread Tony
able to help. > Sent from my BlackBerry wireless device from MTN > > > > > > > > -Original Message- > From: Tony > > Sender: django-users@googlegroups.com > Date: Wed, 23 Mar 2011 13:06:13 > To: Django users > Reply-To: django-users@googlegroups.com > Subjec

model manager and request

2011-03-30 Thread Tony
Is there a way to use the "request.user" attributes in a custom model manager? So I could filter by certain attributes the current logged in user has? This is the preferable way I would like to filter the objects the user sees, so if there is a way, I would appreciate the help. If there is no wa

Re: model manager and request

2011-03-30 Thread Tony
yeah, shawn said the exact dilemma I am having. I am working with a plugged in app and dont want to change its code and mess with its views and create a new fork, it just seems like small thing to make a change for (and I would probably mess something else up). On Mar 30, 11:58 am, Shawn Milochik

unique identifier to distinguish an instance

2011-04-06 Thread Tony
so I have two models, A and B. B has a foreignkey relationship in it from A (To be clear because I know I dont explain it that well, one A has many Bs). for each group of Bs each A is connected with, I want there to be a way to mark one of the Bs as unique from the rest of them. I added in an ex

Let users either upload a file or provide an URL to a file

2018-01-17 Thread Tony
I would like to let users either upload a video file(to AWS S3) or provide an URL to a video, e.g. Youtube/Vimeo. I found a similar question for Rails: Rails: upload a file OR store a url

Re: Let users either upload a file or provide an URL to a file

2018-01-17 Thread Tony
Thank you so much. I will give that go. On Wednesday, January 17, 2018 at 4:48:24 PM UTC+1, Matemática A3K wrote: > > > > On Wed, Jan 17, 2018 at 11:53 AM, Tony > > wrote: > >> I would like to let users either upload a video file(to AWS S3) or >> provide an U

Re: Let users either upload a file or provide an URL to a file

2018-01-17 Thread Tony
Thank you so much. I will give it a go. On Wednesday, January 17, 2018 at 4:48:24 PM UTC+1, Matemática A3K wrote: > > > > On Wed, Jan 17, 2018 at 11:53 AM, Tony > > wrote: > >> I would like to let users either upload a video file(to AWS S3) or >> provide an U

How to test get_success_url in CreateView in Django

2018-02-07 Thread Tony
I am trying to write a test for the get_success_url method in a CreateView, to make sure it redirects to the newly created page. But the response status code is 200 instead of 302 as I expected. views.py class BlogCreate(CreateView): model = Blog fields = [‘author’, 'title', ’post’]

Not raising exception when using form_class in generic CreateView

2018-02-11 Thread Tony
Hi, I am using a package called Django Embed Video for my project. It comes with a EmbedVideoField for the model and validation for the URL which checks whether the URL is Youtube or Vimeo. It raises exceptions when using generic create view witho

Overrding queryset on a field in form generated with ModelForm

2008-12-10 Thread Tony Chu
d.queryset = desiredQuerySetFromForeignKey Is this a good way to do it? Or is there some reason why this isn't mentioned in the documentations? More importantly, is there a better, more idiomatic 'Django' way to do this? Thanks for your time. Tony --~--~-~--~~

Re: Overrding queryset on a field in form generated with ModelForm

2008-12-26 Thread Tony Chu
the country specified. That would appeared to me to be a fairly common pattern. Yours, Tony On Dec 10, 5:38 pm, Malcolm Tredinnick wrote: > On Wed, 2008-12-10 at 00:18 -0800, Tony Chu wrote: > > Hi All, > > > I was using the ModelForm to generate my first form in Django. >

Developer Designer Job in NYC

2009-04-13 Thread Tony Haile
We're looking for a developer with Django and CSS skills to come work on Chartbeat.com. Chartbeat is a Betaworks company, the people behind Bit.ly, Summize, Tweetdeck and a whole hos of other companies. Email me at tony at betaworks.com. Job description below: Chartbeat provides real

how to control access the urls like : r'django/\w+'

2009-06-18 Thread lee tony
Hi all, I am new to django. Now I have a problem: When someone hasn't the authority to access some urls(like: r'test/\w+'). How can I control it? Should I use the "requst.user.has_perm()" in all apps belonged to "test"? Is there any shortcut? Thanks in advaced! --~--~-~-

Re: multi-db vs. data warehouse

2009-09-23 Thread Tony Schmidt
Hi, Nausikaa. Thanks for your reply. Unfortunately, the legacy systems must remain in place until they are gradually (if ever) phased out. There's a whole bunch of functionality that I don't want to have to recreate in those systems (POS, inventory/accounting, products, etc.). I just want to b

Re: multi-db vs. data warehouse

2009-09-23 Thread Tony Schmidt
ata warehouse approach. I view the multi-db > functionality more as a last resort, where you really don't have an option > to merge the data. It adds a lot of complexity so if you can do without I > would recommend an alternative. > Just my 2 cents > Josh > > On Wed, Sep 23,

Re: multi-db vs. data warehouse

2009-09-24 Thread Tony Schmidt
On Sep 24, 2:36 am, Joshua Russo wrote: > If he wants to discuss it here I can do that too. It was just a little off > topic, but not not too much I suppose. > > On Thu, Sep 24, 2009 at 7:41 AM, nausikaa wrote: > > > Hi Joshua > > > Thanks for sharing your knowledge.

Re: multi-db vs. data warehouse

2009-09-28 Thread Tony Schmidt
case the only solution I would implement is > between the two existing systems. > > As far as OLAP goes, it's not mutually exclusive from ER. It is simply a > method of extracting multidimensional data. An ER model can most certainly > be dimensional, you just need to integrate the

Re: multi-db vs. data warehouse

2009-09-29 Thread Tony Schmidt
Thanks for everyone's feedback. I think it's time to just give it a whirl and see what happens. @Joshua: "With my personal experience I would go with an ETL and copy the desired data directly into your ordering system." I think that's the approach I'm going to take. @David: Thanks for the li

Can a model generate custom SQL when loading/saving a field?

2009-11-12 Thread Tony Czeh
; when the field is loded by the model and "HEX(AES_ENCRYPT(field, salt))" when the field is saved by the model. Is there a way to make this happen, so far I'm not turning up anything. Cheers, Tony Czeh -- You received this message because you are subscribed to the Google Group

Re: Multiple level aggregate

2009-11-16 Thread Tony Czeh
On 11/16/09 1: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 every > day for e

Re: Use Subversion to Download the Latest Django Version

2009-11-17 Thread Tony Czeh
TortoiseSVN is a graphical SVN client. If you right-click you should see an option for Tortoise that, when expanded, contains a check out option. From there, just follow the wizard. Mikey3D wrote: > I just got new computer Win7 64-bit and I downloaded: > > 64 Bit TortoiseSVN-1.6.6.17493-x64-s

Django HTTPS and HTTP Sessions

2009-12-10 Thread Tony Thomas
Hi, I'm using Django 1.1.1 with the ssl redirect middleware. Sessions data (authentication etc.) created via HTTPS are not available in the HTTP portions of the site. What is the best way to make it available without having to make the entire site HTTPS? -- You received this message because yo

Re: Track "before" and "after" state of an object when editing in the Admin?

2010-04-27 Thread Tony Czeh
2m_changed signals that are available. My code will log all changes to models unless the model is included in a DONT_LOG_MODELS tuple in the app settings. Changes to m2m relationships are stored against the model containing the m2m. Hope this helps. Cheers, Tony -- You received this message becau

Re: finding current url

2010-07-22 Thread Tony Lambropoulos
this helps you. > > On Thu, Jul 22, 2010 at 22:58, Tony wrote: > >> Hi, >> So I have many domains pointing to one url. I am using apache in >> conjunction with django. How can I use Django to find out which >> domain name is the one actually being typed in by the

Re: scaling my site

2010-07-23 Thread Tony Lambropoulos
ons/tasks. > > Greg > > > On Fri, Jul 23, 2010 at 12:43 PM, Tony wrote: > >> I have just about finished all the logic for my site. In short, I >> need the site to be pretty fast and a good amount of database storage >> with the possibility of getting more in th

Re: scaling my site

2010-07-23 Thread Tony Lambropoulos
able to store a good amount of data. Thanks by the way for answering my questions so thoroughly. On Fri, Jul 23, 2010 at 2:38 PM, Michael wrote: > On Fri, Jul 23, 2010 at 4:29 PM, Tony Lambropoulos wrote: > >> Well I am new to this, but with a push in the right direction I think i >

django and legacy database

2010-10-08 Thread tony yu
I have a legacy database and have user and password with plain-text or md5 encryption Now, I want an app or function, when the user signup, change or reset the password, the record of legacy databases will change synchronously. I would like to keep the existing account app, how can I do? -- You r

[newbie]Apache Deployment Problem

2008-02-06 Thread Tony Winslow
Hi, all! I installed mod_python and do the configurations as the tutorial on the official site. But mod_python still can not find the mysite.settings module. What might be the problem? --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: [newbie]Apache Deployment Problem

2008-02-06 Thread Tony Winslow
Karen Tracey wrote: > On Feb 6, 2008 9:11 AM, Tony Winslow <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Hi, all! > I installed mod_python and do the configurations as the tutorial > on the > official site. But mod_python still

Re: [newbie]Apache Deployment Problem

2008-02-07 Thread Tony Winslow
Kenneth Gonsalves wrote: > On 06-Feb-08, at 7:41 PM, Tony Winslow wrote: > > >> I installed mod_python and do the configurations as the tutorial on >> the >> official site. But mod_python still can not find the mysite.settings >> module. What might be t

django error about syncdb

2008-05-30 Thread tony yu
when I use syncdb, get the error: [EMAIL PROTECTED] /data/mysite]# python manage.py syncdb Error: One or more models did not validate: auth.group: "admin.list_display" refers to '__ipow__', which isn't an attribute, method or property. pls help me, thanks! --~--~-~--~~~--

Re: django error about syncdb

2008-05-30 Thread tony yu
auth.group: "admin.list_display" refers to '__ipow__', which isn't an attribute, method or property. Karen, thank you. On 5月30日, 下午9时22分, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Fri, May 30, 2008 at 4:55 AM, tony yu <[EMAIL PROTECTED]> wrote: &g

Re: django error about syncdb

2008-06-01 Thread tony yu
when i remove django.contrib.admin from INSTALLED_APPS, run syncdb success. I think django is not Compatible with python 2.5.2? On 6月1日, 上午5时42分, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Sat, May 31, 2008 at 2:07 AM, tony yu <[EMAIL PROTECTED]> wrote: > >

Re: security of django.views.static.serve

2007-04-01 Thread Tony Maher
Malcolm Tredinnick wrote: > On Sun, 2007-04-01 at 19:34 -0700, tonym wrote: > >>Hello >> >>in http://www.djangoproject.com/documentation/static_files/ it states >> >> With that said, Django does support static files during >>development. >> Use the view django.views.static.serve to serve media

Re: Looking for experienced Django backend engineer

2022-07-02 Thread Tony Wong
Yes. Please Good dev is always needed Tony On Sat, Jul 2, 2022 at 3:23 PM Sunday Ajayi wrote: > Hi Tony, > > Apologies for the late response. > But if you still need a dev, I can still share my resume with you. > Regards > *AJAYI Sunday * > (+234) 806 771 5394 >

Re: Looking for experienced Django backend engineer

2022-07-02 Thread Tony Wong
> > > no part time considered, sorry -- 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 view this discussion on the w

Re: Looking for experienced Django backend engineer

2022-07-03 Thread Tony Wong
Just forward to my teammate. Good luck On Sun, Jul 3, 2022 at 2:04 PM Mohammad Foysal wrote: > > I have been working with python for the last two years. so I feel that I > have some transferable skills to the position you are looking for. As a web > application developer I have professional expe

Can't get pagination to work in django.!!!

2012-02-28 Thread Tony Kyriakides
I get this error: Template error In template /home/tony/Documents/vidupdate/templates/index.html, error at line 24 Caught TypeError while rendering: 'Page' object is not iterable 14 {% else %} 15 Register 16 Login 17 {% endif %} 18 feedback 19 Contact 2

Re: Can't get pagination to work in django.!!!

2012-02-28 Thread Tony Kyriakides
{% endif %} Page {{ entries.number }} of {{ entries.paginator.num_pages }}. {% if entries.has_next %} next {% endif %} On Feb 28, 5:01 pm, Tom Evans wrote: > On Tue, Feb 28, 2012 at 2:45 PM, Tony Kyriaki

Re: Can't get pagination to work in django.!!!

2012-02-28 Thread Tony Kyriakides
Sorry tom! Thanks a lot mate you just made my day! On Feb 28, 5:34 pm, Tom Evans wrote: > Hi. Re-read what I said: > > > 24      {% for entry in entries %} > >            ^^^ > > > 25      {{ entry.title }} > > {{ entry.posted }} {{ entry.submitter }} > > 26      {% endfor %} > >

How can I use order_by and filter at the same time? (drives me nuts..!!!)

2012-03-01 Thread Tony Kyriakides
How can I use order_by and filter at the same time? (drives me nuts..!!!) This is what i tried: from django.shortcuts import render_to_response from vidupdate.posts.models import Entry from datetime import datetime #( I even imported the date only) def entry_view(request): entries = Entry.

Re: How can I use order_by and filter at the same time? (drives me nuts..!!!)

2012-03-01 Thread Tony Kyriakides
Tom thanks again for helping :) On Thursday, March 1, 2012 3:21:41 PM UTC+2, Tony Kyriakides wrote: > > How can I use order_by and filter at the same time? (drives me > nuts..!!!) > > This is what i tried: > > from django.shortcuts import render_to_response > fro

how to emulate parallel multi-user usability testing with django and selenium/grid?

2012-04-24 Thread Tony Schmidt
I can get my Selenium tests running fine for one user/ sequentially on Django 1.4 using LiveServerTestCase, but I would like to emulate parallel multi-user testing. I don't think I need real load testing, s

[Django Gig - Sacramento/Bay Area, CA] Help make Django/FOSS a success for independent/local grocery retail

2012-05-25 Thread Tony Schmidt
I can read this list and the docs all I want, but there's no substitute for experienced code review and pair programming. *So we, the Sacramento Natural Foods Co-op, are seeking a (preferably local) Django guru to help bring best practices to our in-house software development. We have a small

should Django groups and permissions be hard-coded or bootstrapped?

2012-10-25 Thread Tony Schmidt
I'm building an app that assumes the existence of certain groups and permissions for its workflow. For example, a "member" can log into the app and view and edit their personal data, but cannot see notes that would typically be displayed on the same screen. An "employee" can see those notes a

why can't I access a dictionary with an initial form field value from my django template?

2011-08-23 Thread Tony Schmidt
I thought this should be the proper syntax in my template: {{ MYDICT.myform.somefield.value }} But I get a "can't parse remainder error." Just putting {{ myform.somefield.value }} gives me "3" and {{ MYDICT. 3 }} gives me the dictionary value I want. Am I missing something? -- You received th

Re: why can't I access a dictionary with an initial form field value from my django template?

2011-08-23 Thread Tony Schmidt
Thanks, Reinout. I wound up creating a custom "getter" filter so I could do {{ MYDICT| get:myform.somefiled.value }} - which I'm surprised isn't a built-in, actually. But I think your suggestion is a good alternative. Tony On Aug 23, 1:40 pm, Reinout van Rees wrote: >

Will template extends break the html structure?

2011-10-19 Thread Tony Guo
Hi,everyone.I have had a strange problem on my homework .I load "index.html" template,which extends "base.html" template,in views,then access it through firefox and firebug show that the markup seems to be broke.However,if loading "base.html" directly instead of "index.html" in views,it works righ

Re: Will template extends break the html structure?

2011-10-19 Thread Tony Guo
It's OK now.The source code is right,but,for using some Chinese character,i have to change the source file from GB2312 to UTF-8(in win7) during which something go wrong and caused such a error.I am using Ubuntu now and everything goes right. -- You received this message because you are subscribed

how to only allow google apps auth from one domain

2012-01-09 Thread Tony Schmidt
I tried django-social-auth and googleappsauth but both allow me to authenticate from any domain. Has anybody had luck setting this up with these, or any other packages? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: how to only allow google apps auth from one domain

2012-01-10 Thread Tony Schmidt
Got it: Hacked the django-social-auth Google back-end to filter by domain. I'll see if the project wants to accept my changes as a setting. On Jan 9, 5:38 pm, Tony Schmidt wrote: > I tried django-social-authand googleappsauth but both allow me to > authenticate from anydomain.  Has

Re: imagefiled don't Work

2012-01-27 Thread Tony Kyriakides
(in the terminal) python manage.py syncdb On Jan 21, 8:57 am, cha wrote: > Hello I reading this > tutorialhttps://pype.its.utexas.edu/docs/tutorial/unit6.html#answers > it's work OK But When I want improve it and add ImageField in Category > Model i have problem with ImageField It's Not uploaded

Template Loader Error: (It's been really frustrating till now..!)

2012-01-27 Thread Tony Kyriakides
monMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware') Template Loader Error: Django tried loadin

newbie- delete confirmation

2013-05-16 Thread tony gair
I'm making a cbv with django braces I'm wanting to delete a record with a confirm form , does anyone know of an exampple to show me how to do this -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receivi

listing objects in a html file

2013-05-28 Thread tony gair
This file is used to print out the name of the premises with an update link , however I wanted to add a list of premises with the in_use flag set to false. Can anyone tell me what I am doing wrong? {% extends "base.html" %} {% block content %} Premises {% unusedpremises = [] %} {% for prem

linking the logged in user to other models to filter query sets -( noobie )

2013-05-29 Thread tony gair
I've done a basic django app with a user which contains an organisation and premises foreign key inside the user model which has been inherited using the features of django 1.5. I use the organisation id and premises id inside other models which I would like to present themselves providing th

Re: linking the logged in user to other models to filter query sets -( noobie )

2013-05-29 Thread tony gair
2 UTC, Tom Evans wrote: > > On Wed, May 29, 2013 at 3:29 PM, tony gair > > wrote: > > > > > > I've done a basic django app with a user which contains an organisation > and > > premises foreign key inside the user model which has been inherited >

django 1.5 abstractuser / accessing information of logged on user

2013-05-30 Thread tony gair
I am using CBV / django braces for authentication. My user authorisation model inherits abstractuser and adds a few fields which are foreign keys to two other models organisation and premises. When a form initialises I want to be able to examine the details of the user logged in , look to see

  1   2   >