Re: Name of button pressed not in request.POST

2008-10-21 Thread Glen
I know this is an old thread. However, I found it when searching online when I had the same problem. I did quite a bit of other searching before I finally realized what was happening. Yes, I see the same behavior where the 'submit.x' and 'submit.y' values were in the request.POST dictionary, but

Admin | Lookup via foreign key | Expected Behavior or Bug?

2009-01-07 Thread Glen Jarvis
bug (i.e., foreign key lookups do not work).Any help you can give would be great. Then I would know that I need to go read something to learn from a mistake, or I need to break this down into a test case for a bug reproduction.I've tested this against the latest trunk with the same result

Django Templates: Dynamically addressing 2-D Dictionary

2009-02-04 Thread Glen Jarvis
rence, but when trying to use the variables alpha=2, and beta=63, this lookup fails. I'm beating my head up against the wall with this. Could anyone send me some guidance? Thank you in advance, Warmest Regards, Glen Jarvis -- 415-680-3964 g...@glenjarvis.com http://www.glenjarvis

Re: Django Templates: Dynamically addressing 2-D Dictionary

2009-02-04 Thread Glen Jarvis
so before). But, I wasn't certain that, if I did so, it wouldn't be "overkill" for this project. But, now I know there is no variable lookup at all, I can work on creating my template tags. Thanks again for the help, I couldn't find an answer doing any KB or google

HIPAA, Django and User Authentication/Security

2009-03-12 Thread Glen Jarvis
t; or "denial" from HIPAA's point of view? I can find no specific links to Django from hippa.org. Which governmental agency site should I be searching for with regard to Open Source and security? Thanks in advance for any direction you can lead me in (where to go or who to t

Design Question

2009-05-11 Thread Glen Jarvis
ce is something we're going to have to live with in this design. When I start getting into this kind of place, I think it's time for me to stop, put the keyboard down, and think... This is a very common design pattern: what do most people do? Thanks for listening and any fresh p

Re: Design Question

2009-05-12 Thread Glen Jarvis
/en/1.0/ref/forms/api/#django.forms.Form.prefix > > sdc That is exactly what I needed. I knew this was common enough there had to be something! Thanks, Glen -- "You must be the change you wish to see in the world." -M. Gandhi --~--~-~--~~~---~--

Already invented wheel: Django Bioinformatics?

2009-05-27 Thread Glen Jarvis
to see if I could do this project). Thanks in advance for collaborating/sharing Cheers, Glen -- g...@glenjarvis.com "You must be the change you wish to see in the world." -M. Gandhi --~--~-~--~~~---~--~~ You received this message because

Re: Do you think Django's future is threatened by JS frameworks in both client & server?

2014-10-29 Thread Glen Jungels
I have to agree that debugging javascript does stink. However, the javascript frameworks (Node, Angular, etc) differ in that the execution is done client side whereas for Django, any PHP framework and Microsoft ASP/C#, the execution is backend on the web server. Depending on the circumstance, the

Re: Cant get to admin login page

2014-06-10 Thread Glen J
I have this exact same problem. I'be checked both settings.py and urls.py and done a syncdb and still get nothing but the welcome page. Any other ideas on what to check? On Thursday, June 6, 2013 5:53:12 PM UTC-4, Rebecca wrote: > > I'm on part 2 of the django book tutorial ( > https://docs.dj

Admin site doesn't work

2014-06-10 Thread Glen J
displays is the welcome site indicating that Django is working. Like the other person posting, I am simply following along (or trying) with the Django tutorial. What else can I look at to get to the bottom of this? Any help would be much appreciated! Glen -- You received this message because

Re: Admin site doesn't work

2014-06-11 Thread Glen J
I did spot in the database that I wasn't sure of is in my django_site table it has example.com. Not sure why it is there as I never did that. On Tuesday, June 10, 2014 10:10:47 PM UTC-4, Glen J wrote: > > I read another post on here about how their Django site admin site would > not

Re: Admin site doesn't work

2014-06-11 Thread Glen J
e page. On Wednesday, June 11, 2014 7:27:12 AM UTC-4, Sanjay Bhangar wrote: > > hey Glen, > > Sorry if this is a silly question - but are you sure you are visiting > /admin on your site? > If you are and still getting this error, can you please paste the > contents of your u

Re: Admin site doesn't work

2014-06-11 Thread Glen J
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'mysite', # Or path to database file if using sqlite3. # Th

Re: Admin site doesn't work

2014-06-12 Thread Glen J
Running on linux mint. I'll keep plugging away and see what I can find. On Thursday, June 12, 2014 3:56:08 AM UTC-4, Sanjay Bhangar wrote: > > Hey Glen, > > Hm, whatever it is, is not apparent to me, sorry :/. The only thing I > can think of is possibly inconsistent indent

Re: PostgreSQL, queries, speed

2014-06-16 Thread Glen Jungels
You should definitely be able to accomplish what you are needing with a stored function in PostgreSQL. By sending only a single request and letting the database server do the processing for you, you'll minimize how much work the web server has to do. That said, writing a stored function/procedure

RE: Database problem in Django

2014-06-18 Thread Glen Jungels
It will be different depending on the database (assuming you are asking about the query only). You will need to do an order by on either your auto incremented field or dat field plus something like a limit 2 (Postgres and I believe MySQL) or top 2 for something like SQL Server. On Jun 18, 2014 8:1

Re: Database problem in Django

2014-06-18 Thread Glen Jungels
Erik is certainly right on this. All queries are point in time and in databases with large numbers of inserts per second, getting the true last two inserts will be relative to when the query starts. On Jun 18, 2014 9:33 AM, "Erik Cederstrand" wrote: > Den 18/06/2014 kl. 14.31 skrev

Re: Angular and Django

2014-06-22 Thread Glen Jungels
When I am finally able to get django to work, I plan on doing this. I think the client side processing of Angular will be a nice complement to Django on the back end. On Jun 22, 2014 5:12 AM, "zweb" wrote: > > I was looking at Angular and looks like it does many of the thing Django > Templates d

Using the Models from two Different Projects in a single script

2019-01-15 Thread Glen D souza
Hi, I have two different django projects which each project having different model Lets say projects to be p1 and p2 Now i have to populate the data from p1 model to a model in p2 ( note p1 and p2 models are different, i just have to use some data from p1 model to move to p2) Now in order to

Re: Can't access my django runserver

2018-06-30 Thread Glen D souza
I think there is a ' , ' missing after 'DIRS' in Templates settings On Saturday, 30 June 2018, Umar Kambala wrote: > > this are my codes... > > # SECURITY WARNING: don't run with debug turned on in production! > DEBUG = True > > ALLOWED_HOSTS = ['127.0.0.1', '.pythonanywhere.com'] > ALLOWED_HOST

Re: Django foreign-key cannot assign must be a instance

2018-07-17 Thread Glen D souza
I would suggest you to try this code sav_list = List(id=4, item_name ='name1', item_desc='desc1', location='location', reason='rfp', pid=Order.objects.get(poid = 3)) Instead of passing integer 3 to pid, try to the pass the order Object which has the poid = 3 On 17 July 2018 at 17:33, Sainath B

Re: Model formset not saving

2018-07-17 Thread Glen D souza
have you tried form.save(commit = True) ? On 18 July 2018 at 01:27, wrote: > Is there a paid support option to get help? I've been trying to ask for > help on IRC for a while but all I've gotten is insults. > > On Monday, July 16, 2018 at 6:06:00 PM UTC-4, cbpa...@gmail.com wrote: >> >> I'm u

Re: App Registeries not ready

2018-08-15 Thread Glen D souza
1.open your django project 2.open the terminal in pycharm, it is located at bottom left corner 3. in the terminal change the directory to the location where manage.py is located 4. type the following python3.7 manage.py shell On Thu, 16 Aug 2018 at 10:20, Vikrant Gupta wrote: > I did according

Re: TypeError: view must be a callable or a list/tuple in the case of include().

2018-08-25 Thread Glen D souza
url(r'^$', 'blog.views.home', name='home') You are passing a string as view by quoting blog.views.home remove the quotes and try, i.e url(r'^$', blog.views.home, name='home') On Fri, 24 Aug 2018 at 03:17, herve kabore wrote: > this is the urls.py > > > from django.conf.urls import url > fro

Single Django App using Multiple Databases

2018-10-02 Thread Glen D souza
Hi, I am working on a project where i am using a single django app which is backed by different databases. Let me explain the use case clearly, I have a app say app1, and app1 data is located in two different databases say db1 and db2 data present in the db1 and db2 are different, lets say db1 h

Re: Blog app Error: NoReverseMatch at /post/14/

2018-10-11 Thread Glen D souza
Hi, Try after name-spacing url patterns i.e app_name = 'blog' urlpatterns = [ path('', PostListView.as_view(), name='blog-home'), path('user//', UserProfileListView.as_view(), name= 'user-profile' ), path('user//posts/', UserPostListView.as_view(), name= 'user-posts'), path('user

Re: Blog app Error: NoReverseMatch at /post/14/

2018-10-12 Thread Glen D souza
try renaming path('post//comment/', views.add_comment, name= 'add-comment'), to path('post//comment/', views.add_comment, name='add-comment'), On Fri, 12 Oct 2018 at 12:36, Robert CR wrote: > i fixed the error, thanks. But there is already a new one when i try to > add a comment. D: > > [image:

Re: Blog app Error: NoReverseMatch at /post/14/

2018-10-12 Thread Glen D souza
*def add_comment(request, slug):* *post = get_object_or_404(Post, slug=slug)* *if request.method == 'POST':* *form = CommentForm(request.POST)* *if form.is_valid():* *comment = form.save(commit=False)* *comment.post = post* *comment.save()

Re: Use tables from a database without creating models

2018-10-16 Thread Glen D souza
Hi, If the Data Base is already present then Django provides an handy command which will translate your Database schemas into Django models You have to run python manage.py inspectdb It will auto generate the models based on the Schema. Best way to access the data present in the db in the Djang

Re: Help with data bound ModelChoiceField

2018-12-13 Thread Glen D souza
In the First Screenshot the code is def __str__(self): return "Customer" + "self.id" Remove the quotes from "self.id" def __str__(self): return "Customer" + self.id On Wed, 12 Dec 2018 at 10:47, wrote: > > TY madjardi for all your input! I continued to search and found what I > wanted. But

Re: Saving data fails because of null constraint when data is not null

2018-12-22 Thread Glen D souza
if you check the error message DETAIL: Failing row contains (3, 1, Consultation OPD, 135, 135, null, 1). There are total of 7 values Check your model class CGHSRates(models.Model): rid = models.AutoField(primary_key=True) serial = models.IntegerField(default=0) name = models.CharField(max_lengt