Re: group

2022-09-29 Thread Ken Booo
Plss add me in the official group of django pls. I am having 2+ yrs 0f exp . -- 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

Bug Request!

2022-07-25 Thread Ken Booo
Here, I caught a one bug on Django-->4.0.6 There is no argumented support and base_dir is having exemptions causing warnings![image: WhatsApp Image 2022-07-18 at 11.59.01 AM.jpeg] -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Re: Desperately need help.

2021-06-16 Thread Ken Smith
out Is there customers money they just keep getting it in. I take rather that they might be very unscrupulous. Thank you for your input have a great day On Wed, Jun 16, 2021, 1:02 PM Krish M wrote: > Ken, > > Base on what you're asking, and from the source code (view-source) & &g

Re: Desperately need help.

2021-06-15 Thread Ken Smith
nstead. :) > > > If you don't know about the code, maybe you should hire a developer or > learn by yourself. > > El mar., 15 de junio de 2021 3:14 p. m., Ken Smith > escribió: > >> There is the issue to solve that is the result of pressing the button to >

Re: Desperately need help.

2021-06-15 Thread Ken Smith
things don't work. As you probably well know. Have a wonderful day On Monday, June 14, 2021 at 1:13:18 PM UTC-4 Kasper Laudrup wrote: > On 14/06/2021 05.15, Ken Smith wrote: > > I sure hope that somebody can take the time to do this. I'm just > > wondering one of you brilliant progr

Re: need to support anonymous users with a simple one time disclaimer agreement

2019-08-04 Thread Ken Whitesell
gnito mode. (And all of this is discounting any intentional actions to spoof / avoid that disclaimer.) If you have any _real_ requirement for that disclaimer to be acknowledged, then an actual per-user account is the only way to do it. Ken On Saturday, August 3, 2019 at 10:08:35 AM UTC-4, Gre

Re: How to use permissions on a CreateView class?

2019-05-29 Thread Ken Whitesell
Fellipe, In addition to the permissions_required variable, I believe you also need to include the PermissionsRequired mixin in your class definition: https://docs.djangoproject.com/en/2.2/topics/auth/default/#the-permissionrequiredmixin-mixin Ken On Tuesday, May 28, 2019 at 5:54:39 PM UTC-4

Re: how handle high incoming data and sending throttled data to web sockets in django-channels

2019-01-15 Thread Ken Whitesell
We deal with a similar rate of data acquisition, and have taken a different approach. (We get, on average, about 10,000,000 UDP messages / day) We have a very small UDP listener (about 50 lines of Python 3 code), and _all_ it does is receive the message and dump it into a Celery queue. We then

Re: Nullable vs empty strings

2018-05-03 Thread Ken Whitesell
-string-vs-null-value Ken On Thursday, May 3, 2018 at 5:17:35 AM UTC-4, Nick Sarbicki wrote: > > I just saw this in the docs: > https://docs.djangoproject.com/en/2.0/ref/models/fields/#null > > Suggesting that you should never set a CharField to null unless using a

Re: Multiple websocket connection vs single websocket connection when using django channels

2018-04-06 Thread Ken Whitesell
wsers to the server and from the server to the browser all have that key in the JSON. About the most I can say is that it works well for us. Ken On Friday, April 6, 2018 at 5:10:41 AM UTC-4, Robin Lery wrote: > > Hi, > > Suppose an application has features like Chat, Notification and Acti

Re: How to run an external command that must run with the server

2018-04-03 Thread Ken Whitesell
? If the former, then yes, running the management command from supervisor makes sense to me. If the latter, then I'd probably be looking at doing something different. Ken > On April 3, 2018 at 6:15 AM 'Alex' via Django users > <django-users@googlegroups.com> wrote: > > That mak

Re: How to run an external command that must run with the server

2018-04-01 Thread Ken Whitesell
the "best" way is possibly debatable. But it works for us and doesn't give us any problems. Ken On 4/1/2018 7:06 AM, 'Alex' via Django users wrote: I have a daphne server running a django channels application. I also have a python script that aggregates data from various sources, a

Re: Django 2.0.2, Channels 2.0.2 and Celery 4.1 Issue

2018-03-02 Thread Ken Whitesell
up_send)( settings.CHANNEL_GROUP, {"type": "epics.message", "text": "Hello World"}, ) Your first solution to make updateData an asynchronous method might work with some other work involved in adding that task to the event loop - but that answer is bey

Re: Channels 2.0 - Exception when sending a message to client

2018-02-25 Thread Ken Whitesell
And while we're at it, I'm going to toss out another opinion. I've found it extremely beneficial _for me_ to not try to relate channels 2.0 to channels 1.1. I'm approaching it as if I'm learning about a completely separate package - working from a clean slate so-to-speak. Ken On Sunday

Re: Channels 2.0 - Exception when sending a message to client

2018-02-25 Thread Ken Whitesell
for such a demonstration.) Ken On Sunday, February 25, 2018 at 5:04:13 AM UTC-5, muha...@swordfish.co.za wrote: > > While I'm at it, would you mind confirming if I understand the following > changes in channels 2.0 correctly ? > > 1) Channel names are not auto-detected and mu

Re: Channels 2.0 - Exception when sending a message to client

2018-02-25 Thread Ken Whitesell
pgraded protocol. That is handled by Daphne at the lowest layers - this definition is just information that Daphne uses to figure out what object gets to handle each url. Hope this helps. Ken Disclaimer: I am not Andrew Godwin, I do not play him on TV, and my code will never be mistaken for his. I

Re: Simple Search Feature

2018-02-24 Thread Ken Whitesell
if song_name: songs = self.model.objects.filter(name__icontains=song_name) else: songs = self.models.all() return render(request, self.template_name, {'songs': songs}) Hope this helps, Ken On Saturday, February 24, 2018 at 8:18:25 PM UTC-5, tangoward15

Re: Channels 2.0 - Exception when sending a message to client

2018-02-24 Thread Ken Whitesell
I might be able to send a message back out without going back through the consumer - again, that's a guess for something I haven't tried yet. Anyway, I hope this helps. Ken On Saturday, February 24, 2018 at 7:56:45 PM UTC-5, muha...@swordfish.co.za wrote: > > I'm still trying to find my

Re: Channels worker and call_later

2018-02-23 Thread Ken Whitesell
. Anyway, thanks again! Ken On Friday, February 23, 2018 at 10:56:03 PM UTC-5, Andrew Godwin wrote: > > Hi Ken, > > You should write asyncio code, rather than Twisted code - we have Twisted > running on it asyncio reactor so both are available, and asyncio is the >

Channels worker and call_later

2018-02-23 Thread Ken Whitesell
inished to determine whether or not I still need to do my work, but that just "feels wrong" to me for some reason. Is there something simple that I'm missing? Or does this fit into the category of "Don't do that!" Thanks, Ken -- You received this message because you are

Re: LDAPSearch Troubleshooting

2017-10-10 Thread Ken Jenney
Good catch! I just fixed it and re-tried and it works now. I had to get past the group search but ultimately my mispellings caught me up. Thanks for all the help James! On Tuesday, October 10, 2017 at 3:10:39 PM UTC-4, James Schneider wrote: > > > > On Oct 10, 2017 11:55 AM, "

Re: LDAPSearch Troubleshooting

2017-10-10 Thread Ken Jenney
re if that's the best way to search for the groups since it's still not working. I've opened up a ticket with Synology in the meantime. On Sunday, October 8, 2017 at 10:34:31 PM UTC-4, Ken Jenney wrote: > > I've got LDAPSearch configured to work with my Synology Directory Server. >

Re: LDAPSearch Troubleshooting

2017-10-08 Thread Ken Jenney
authenticating ken: INVALID_CREDENTIALS({'desc': 'Invalid credentials'},) I added logging by adding this to the config: import logging logger = logging.getLogger('django_auth_ldap') logger.addHandler(logging.StreamHandler()) logger.setLevel(logging.DEBUG) On Sunday, October 8, 2017 at 11:06:20 PM

LDAPSearch Troubleshooting

2017-10-08 Thread Ken Jenney
I've got LDAPSearch configured to work with my Synology Directory Server. Users can authenticate fine but when I try to map a user to a group I get INVALID_CREDENTIALS: import ldap # Server URI AUTH_LDAP_SERVER_URI = "ldaps://synology.kensnet.priv" # Set the DN and password for the NetBox

django_tables2: Unable to manually iterate through column values in template

2017-10-06 Thread Ken
to django_tables2 is now misleading. Cheers, Ken -- 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

Re: How to pass data between Django module/app functions without using database in asynchronous web service

2016-12-29 Thread Ken McDonald
On Thursday, December 29, 2016 at 6:00:03 AM UTC-5, Andrew Godwin wrote: > > *Q) Are the websocket and the AJAX calls going to different clients/pages > entirely, rather than them both being in the same page context? It sounds > like the websocket is going to a server somewhere that's allocating

How to pass data between Django module/app functions without using database in asynchronous web service

2016-12-28 Thread Ken McDonald
I've got a web service under development that uses Django and Django Channels to send data across websockets to a remote application. The arrangement is asynchronous and I pass information between the 2 by sending JSON formatted commands across websockets and then receive replies back on the

Re: Newbie question - data structure for game

2016-10-29 Thread Ken Albright
Sounds good. Thanks for the advice. Now if I could only figure out how to get forms to expand and contract to match the size of the quote... Thanks. On Friday, October 28, 2016 at 5:00:14 PM UTC-7, Ken Albright wrote: > > I'm just learning Python and Django so please be gentle... &g

Newbie question - data structure for game

2016-10-28 Thread Ken Albright
I'm just learning Python and Django so please be gentle... I've written a quote decryption game (like you see in the newspaper) in Python. I'd like to put it on a web page with Django. However, I'm not sure of the best way to structure the data. The original quote and the encrypted quote need

Re: Django Models

2016-05-27 Thread Ken Edem
Wow, Derek what a great link. Thanks very much. Ken On Friday, May 27, 2016 at 4:47:56 PM UTC+2, Derek wrote: > > There a number of designs for similar situations online; a quick Google > showed me: > > * http://www.databasedev.co.uk/student_courses_data_mode

Django Models

2016-05-26 Thread Ken Edem
I am new to Django Python and I need bit of help Can someone please help me with how I should structure my models, since this is a very important part of the project I am trying to develop, I had been teaching myself and not yet good at this stuff. I want to develop a web project for

remove ./ from commands

2016-04-21 Thread ken . foust
I just installed django 1.9.5. Now I have to type ./manage.py when I used to just type manage.py. How do I get rid of the need to type ./ osx el capitan -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Django - Upload Image to the server with dimension

2015-12-29 Thread ken phanith
I simply use ImageField from PIL package for Django Image Upload but it does not satisfy me at all. I have a models class which contain many fields including ImageField also. I am trying to upload 10 images to the server but those images have the different dimension. I want to upload those

testcase argument via manage.py

2015-12-05 Thread Ken
Is it possible to pass options or arguments to a testcase? The docs talk about subclassing DiscoverRunner and over-riding add_arguments but does not indicate how the arguments are retrieved in a test module. Thanks -- You received this message because you are subscribed to the Google Groups

Re: BaseListView's get_context_data is missing kwargs?

2015-08-04 Thread Ken
> On Aug 3, 2015 7:37 PM, "Ken" <t...@anl.gov > wrote: > >> @Jordi, Thanks for tip on self.kwargs in View. That should work. I'll >> rewrite my get(). >> >> @James - No, no reason in particular. Wasnt paying attention, I guess. >>

Re: BaseListView's get_context_data is missing kwargs?

2015-08-03 Thread Ken
@Jordi, Thanks for tip on self.kwargs in View. That should work. I'll rewrite my get(). @James - No, no reason in particular. Wasnt paying attention, I guess. I was just staring at the get() method in BaseListView and thinking, ah, this is the place I want to inject my filter form into

BaseListView's get_context_data is missing kwargs?

2015-07-31 Thread Ken
I created a class FilteredListView(BaseListView, FormMixin) so I can have a filter form in my list view. The form submits filters via GET. I have it working. But there is a piece of the code that I feel ought to be handled by django. In order to get the form into the context, I duplicated

Re: How to Process Multi Step Forms in Django?

2015-05-05 Thread Ken Nguyen
to explain or giving me an example of how it works? In the meantime, I'll read up on it. Thanks, Ken P.S. - In some part of my code, you may notice the "location"parameter. You can ignore it or not include it in my code. I was cut and paste so I didn't catch it. -- You received

Re: How to Process Multi Step Forms in Django?

2015-05-05 Thread Ken Nguyen
I've finally figured it out after weeks of troubleshooting and here's how I do it. In the original post, my views takes in the request from form1 and renders it to form2. I would get the dreadful "Management Form Data is Missing" error no matter what I did and it led to asking a bunch of

Re: How to Process Multi Step Forms in Django?

2015-05-04 Thread Ken Nguyen
Nevermind what I said on my last post, something is internally wrong with my second form. It can't even render when I hard coded the first_name, last_name and the checkboxes. Still getting Management Form Data is Missing. {% load staticfiles %} User Information

Re: How to Process Multi Step Forms in Django?

2015-05-04 Thread Ken Nguyen
Hi Bernardo, Using your hidden method works. I can see the "hidden" value from Form2 but how do I use those hidden information in form2 so it can redisplay correctly? First time around, it will use the variable from form1. The second time around it should use the hidden information without

Re: How to Process Multi Step Forms in Django?

2015-05-04 Thread Ken Nguyen
you elaborate that? How do I inherit it? Do you mean just replicate the first form and add checkboxes to it? Thanks, Ken On Saturday, May 2, 2015 at 1:24:22 PM UTC-7, Bernardo Brik wrote: > > You should add the same fields (first_name and address) to form2 and > render them with hid

How to Process Multi Step Forms in Django?

2015-05-01 Thread Ken Nguyen
I've made some attempted to use formwizard but there wasn't much documentation about it so I decided to stay with the basic. I've successfully obtained and display the data from the first form to the second form and added some checkbox next to the data to allow user to choose whether to

Django BooleanField Checkbox Returns Empty

2015-04-29 Thread Ken Nguyen
I read every corner of the documentation but couldn't figure out why the BooleanField Form doesn't return 'True' when the checkbox is checked. Is this a valid test? Shouldn't formset.cleaned_data = [{True}, {False}]? >>> from django import forms >>> from django.forms.formsets import

Reading Dynamic Checkbox in Django

2015-04-28 Thread Ken Nguyen
Hi Folks, First time posting on here so if I violate any laws, please forgive me. I also posted the same question on StackOverflow but didn't get any answers so I'm hoping this place will get more attention. I'm having

Re: Template Not Applying - Django Polls Tutorial (Newbie Question)

2014-12-29 Thread Ken Wayne
> > On Tuesday, December 23, 2014 5:18:49 PM UTC-6, Ken Wayne wrote: >> >> Hmmm, that is one of the directories I tried, >> C:\Python34\Scripts\mysite\templates\admin with the file base_site.html >> >> On 12/23/2014 5:07 PM, Néstor wrote: >> >>

Re: Template Not Applying - Django Polls Tutorial (Newbie Question)

2014-12-23 Thread Ken Wayne
/polls/index.html That is how I got it to work. Good luck!!! :-) On Tue, Dec 23, 2014 at 2:13 PM, Ken Wayne <ecommg...@gmail.com <mailto:ecommg...@gmail.com>> wrote: Windows 8 Django 1.7.1 Python 3.4.2 Google Chrome Version 39.0.2171.95 m Bottom of part 2 of the

Template Not Applying - Django Polls Tutorial (Newbie Question)

2014-12-23 Thread Ken Wayne
Windows 8 Django 1.7.1 Python 3.4.2 Google Chrome Version 39.0.2171.95 m Bottom of part 2 of the the tutorial https://docs.djangoproject.com/en/1.7/intro/tutorial02/ it indicates how to customize the admin template but when I follow the directions it doesn't show any change in my browser.

Poll Tutorial (for Django 1.7) Files Available?

2014-12-22 Thread Ken Wayne
I'm trying to work through the Poll Tutorial and I've run into some problems. I'd like to compare the code I've written to a working file. Is there any place to download the entire working project? -- You received this message because you are subscribed to the Google Groups "Django users"

Re: How to "automatically " populate "last_updated_by" DB columns with the current user's id

2014-10-18 Thread Ken Winter
logging in the user, passing it the user id. I guess my questions are: 1. Where to put this call? - i.e. in what Django module and function? 2. How to make the call? - Is it just executing a SQL statement like "SELECT set_session_user()", or is there a better way? ~ Tx

Re: How to "automatically " populate "last_updated_by" DB columns with the current user's id

2014-10-17 Thread Ken Winter
implement this idea. As it happens, I'm leaving on a trip tomorrow, so it may be a while for my next communiqué on this matter. But I'll be back! ~ Ken -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and s

Re: How to "automatically " populate "last_updated_by" DB columns with the current user's id

2014-10-17 Thread Ken Winter
. My comments inserted below are prefaced with "Ken:" On Thursday, October 16, 2014 12:13:20 PM UTC-4, Carl Meyer wrote: I think this is probably technically possible (though I don't see why > you'd drop the database user when they logout, better to keep the > accou

Re: How to "automatically " populate "last_updated_by" DB columns with the current user's id

2014-10-17 Thread Ken Winter
would be > the "connection" class? My commenst inserted below are prefaced with "Ken:" On Thursday, October 16, 2014 12:13:20 PM UTC-4, Carl Meyer wrote: > I don't see any way this is feasible, if you want it to cover raw SQL > executed through ``cursor.execute``

Re: How to "automatically " populate "last_updated_by" DB columns with the current user's id

2014-10-15 Thread Ken Winter
ngo app could be programmed to handle the creation and dropping of this user, and to establish a db connection for that user? I will also put this proposal to a PostgreSQL forum to see if they think it would work on the database end. ~ Tx, Ken On Tuesday, October 14, 2014 11:46:40 AM UTC-4,

Incremental inspectdb, anyone?

2014-10-15 Thread Ken Winter
hurdle. So level 4 functionality may not be worth the effort - but if someone has already gone to the trouble of building it, great to have! So my question is: Has anybody built something that provides functionality beyond level 1? If so, where is it and what can it do? ~ TIA, Ken -- You received

How to "automatically " populate "last_updated_by" DB columns with the current user's id

2014-10-13 Thread Ken Winter
uggestions you have for meeting this requirement! ~ Ken -- 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...@googlegro

Re: django templates and tex/latex

2013-03-13 Thread Ken
a single replacement string between \begin{document} and \end{document} and I simply replace this one token with a string.replace() On Wednesday, March 13, 2013 11:39:18 AM UTC-5, Drew Ferguson wrote: > > On Wed, 13 Mar 2013 07:01:45 -0700 (PDT) > Ken <t...@anl.gov > wrote: >

django templates and tex/latex

2013-03-13 Thread Ken
I would like to write a tex/latex file with django tags in it. Load it with the template loader and render it with a context. The problem is that my tex/latex file has quite a few '{%' in them. They are conventional in TeX for writing readable macros and are used to escape the newline. I

getting same order in SQL as ManytoMany selection in Admin

2013-01-30 Thread Ken Ricci
I have a Django/Grappelli admin form for job postings which has a manytomany relationship for job requirements (using filter_horizontal). In the admin form, the order chosen stays constant when I save the job posting and display it again later. I'm trying to repeat the order in another app

Re: Implementing a monitoring system with django.

2012-12-12 Thread Ken Hill
I've been considering a very similar Django to help simplify some of my daily server system admin tasks (e.g. monitor and trend CPU uase, memory usage, disk space, etc.). I'd like to try CouchDB to store the data with a Django UI to make the app usable to non-technical users. On Monday,

Re: What persists in memory across requests?

2012-05-18 Thread Ken J
ons we expect to see, and persistent DB connections do seem to make a dramatic difference. Over the course of tens going on hundreds of thousands of requests, it can save mins worth of processing time. On May 18, 1:52 pm, akaariai <akaar...@gmail.com> wrote: > On May 18, 7:54 pm, Ke

What persists in memory across requests?

2012-05-18 Thread Ken J
Howdy, I'm quite curious as to what persists in memory across requests in terms of django application variables. I'm currently running a django app in mod_wsgi daemon mode. Because of performance concerns when dealing with large numbers of concurrent requests, I wanted to modify django to keep

templates couple apps to a site; how do you separate them?

2012-03-13 Thread Ken
I'm struggling with how I should go about writing "pluggable" apps. I haven't found a satisfactory way of decoupling apps from a site and the primary sticking point is templates. I've combed through some discussions but have not found any that have helped. A site's templates determine the look

Re: runserver namespace problem?

2011-11-13 Thread Ken
Does anybody have any idea? -- 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-users+unsubscr...@googlegroups.com. For more

runserver namespace problem?

2011-11-10 Thread Ken
hi all I have a django website dir tree like this: mysite - app1 - tasks.py - tests.py - views.py - models.py there is a function *outprint* in tasks.py In shell one, I use command "python manage.py celeryd -B -l info" to run

Re: model: how to reference to the model itself?

2011-10-23 Thread Ken
oh, I found the answer: use ForeignKey('self') to a many-to-one ref to model self please ignore my former post. >_< On 10月24日, 下午12时47分, Ken <xie.kenn...@gmail.com> wrote: > I want to create a parent-child like catalog system. > > from django.db import models > >

model: how to reference to the model itself?

2011-10-23 Thread Ken
= models.ManyToOneRel(Catalog) but when syncdb i got: File "/home/ken/sites/mysite/catalog/models.py", line 12, in Catalog parentcatalog = models.ManyToOneRel(Catalog) NameError: name 'Catalog' is not defined It seems like I cannot ref to a model which is not completely defined. What s

load-on-startup equivalent in django?

2011-10-20 Thread Ken
Thank you in advance. Ken -- 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 em

Re: creating dynamic forms with django

2011-07-20 Thread ken paul
Hey you know the link actually has what I want thanks Kenneth On Wed, Jul 20, 2011 at 3:27 PM, ken paul <kbo...@gmail.com> wrote: > Thank man but what I mean is like you create a dynamic class > ||new_class=type('myform',(forms.Form),{attrib})|| but the dict with attribs > is a

Re: creating dynamic forms with django

2011-07-20 Thread ken paul
ish...@gmail.com> wrote: > may be dis link helps u: > > http://uswaretech.com/blog/2008/10/dynamic-forms-with-django/ > > On Wed, Jul 20, 2011 at 12:46 PM, ken paul <kbo...@gmail.com> wrote: > >> hey can anyone get a way of writing dynamic form classes with

creating dynamic forms with django

2011-07-20 Thread ken paul
hey can anyone get a way of writing dynamic form classes with django. I have tried but putting the attributes became a bit hard. Kenneth -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

2 Python/Django Developers Needed ASAP

2011-03-30 Thread Ken Zinchiak
to hearing from you soon. Thanks, Ken Zinchiak Moore Associates 973-560-4830 973-296-5787 Cell -- 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

Re: Best DRY practices for a view function that will be used by all other views.

2011-02-05 Thread Ken Chida
Yes, I think I have it figured out now. Sorry for asking such a newb question. If I understand correctly, all I need to do is change the form action to the login URL. Then, url.py will direct the request to my existing login view function. I bet you guys were all bashing your heads against

Re: Best DRY practices for a view function that will be used by all other views.

2011-02-05 Thread Ken Chida
Hi James - I want to point out that I will not have a dedicated login URL, as the functionality will be available on each page (not just a link to the login page, but the actual form). Previously, I had a dedicated login URL and link to the login page, but my frontend guy made a slick jQuery

Re: Best DRY practices for a view function that will be used by all other views.

2011-02-05 Thread Ken Chida
A global context processor would probably work, but is it kosher to put business logic in a context processor? To me it seems that the whole point of a context processor is to simply take a piece of data and extract/format information from it to form a context dictionary. -- You received

Re: Best DRY practices for a view function that will be used by all other views.

2011-02-05 Thread Ken Chida
Because I will have the login form on each page, I will not have a separate login URL. That's why I'm having difficulties with organizing the business logic code (i.e. view). It's almost as if I need to have two view functions -- one for login and another for the current page -- for the URL

Re: Best DRY practices for a view function that will be used by all other views.

2011-02-05 Thread Ken Chida
Hey - Thanks for replying. So I'm thinking that the method that I originally described would amount to only a few lines of code. A decorator would look nicer, but i'd have to remember to add it for future views, which is kinda annoying. Also, I wouldn't have a login URL because all pages

Best DRY practices for a view function that will be used by all other views.

2011-02-05 Thread Ken Chida
when the user clicks the login submit button. This method would work, but it goes against DRY best practices. Is there a better way to do this? Maybe I can use a custom template tag? Thanks in advance!! Ken -- You received this message because you are subscribed to the Google Groups "D

Re: How to get a web development job (i.e. Django/Python) if someone is an amateur programmer?

2010-12-17 Thread Ken Huang
OP here. I've got a still-live Digg-like PHP site that I built two years ago with a few buddies. How much cred does that buy me if I'm looking for a Django job? Do I need to specifically build and/or open source Django? Thanks for the advice guys - much appreciated! On Fri, Dec 17, 2010 at 1:10

Re: What does an ideal django workflow setup look like?

2010-10-27 Thread Ken
/ On Oct 26, 8:26 am, Celso González <ce...@mitago.net> wrote: > On Fri, Oct 22, 2010 at 08:02:56AM -0700, Ken wrote: > > Hi > > > I understand there are many different ways and products to use to > > setup a great workflow for developing in django, but would like to &g

What does an ideal django workflow setup look like?

2010-10-22 Thread Ken
*I've Googled, but have not found any really organized and layman- friendly overview, which is why I came here* I know how to get python/django working on my computer (PC or Mac) and have developed simple test apps using django's built-in dev server and a mysql back-end. So I can get things to

Need Help!

2010-07-29 Thread Ken
Looking for a django developer in the NYC area! I would appreciate any help, if you know of anyone! Thank you! Ken -- 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...@google

checking an IP range

2010-04-09 Thread Ken Lacey
ot; "192.168." %} do something {% endifequal %} the same results appaear whether the ip_address is 192.168. or any other range. Thanks Ken -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: REMOTE_ADDR

2010-03-16 Thread Ken Lacey
FOR can be a comma-separated list of IPs. The # client's IP will be the first one. real_ip = real_ip.split(",")[0].strip() request.META['REMOTE_ADDR'] = real_ip but still cant access the ip address. Can anyone tell me what I am doing incorrectly. Thanks Ken

REMOTE_ADDR

2010-03-15 Thread Ken Lacey
Hi I am trying to access the remote addr in a view. Using request.META['REMOTE_ADDR'] I get an error Exception Type: TemplateSyntaxError Exception Value: Could not parse the remainder: '['REMOTE_ADDR']' from 'request.METTA['REMOTE_ADDR']' How do I get over this? Thanks Ken -- You

Re: Django and database user column update privileges

2010-03-05 Thread Ken
Cheers Karen. I just wanted to make sure that all aspects of my question were answered, so I separated the second problem into this thread. Thanks for your help. (See other thread.) Ken On 5 Mar, 02:17, Karen Tracey <kmtra...@gmail.com> wrote: > I answered your question in the oth

Re: Update a single column of a row in a Model

2010-03-05 Thread Ken
Many thanks Karen. This worked perfectly (though the 'name' attribute is just name without the quotes). Cheers, Ken On 5 Mar, 01:42, Karen Tracey <kmtra...@gmail.com> wrote: > On Thu, Mar 4, 2010 at 2:24 PM, Ken <ken.w.sm...@gmail.com> wrote: > > Thanks for your examp

Django and database user column update privileges

2010-03-04 Thread Ken
a much larger set of columns, with lots of doubles & floats. I really don't want to be re-writing the entire row and I really don't want to have to resort to raw SQL. Any ideas (preferably with an example)? Cheers, Ken -- You received this message because you are subscribed to the Google Gr

Re: Update a single column of a row in a Model

2010-03-04 Thread Ken
shouldn't be updating the 'description' column. If my security settings were in place, this query would fail, because my DB user only has update access to the 'name' column. Ken On 4 Mar, 18:35, Shawn Milochik <sh...@milochik.com> wrote: > 1. Doing Person.save() will NOT update ev

Re: Update a single column of a row in a Model

2010-03-04 Thread Ken
= PersonForm(request.POST, instance = person) if person_form.is_valid() person_form.save() Would that work...? I'll attempt to hack an example in my code and tell you what happens... Thanks for your time... Ken On 4 Mar, 17:28, Shawn Milochik <sh...@milochik.com> wrote: > Here's

Re: Update a single column of a row in a Model

2010-03-04 Thread Ken
). Cheers, Ken On 3 Mar, 00:31, Shawn Milochik <sh...@milochik.com> wrote: > Use a forms.ModelForm and exclude all the fields except one, or use a   > forms.Form with one field and use its value in a queryset .update()   > call. > > Shawn > > Sent from my iPhone > >

Update a single column of a row in a Model

2010-03-02 Thread Ken
want my users inadvertently deleting data. Do I need to specify something in my Model columns to get Django to behave the way I want it to...? I really don't want to have to resort to a bit of custom SQL... Thanks in advance, Ken -- You received this message because you are subscribed to the

How to pass raw sql results (cursor.fetchall()) to the template?

2010-01-14 Thread Ken
Newb question here. How do I pass raw sql results to my template? The sql results contains a two column queryset with several rows . Below doesn't work. How do I make this work? Do I need to parse the results into an array and then pass to the template? IN THE VIEW: cursor =

Re: How to create multiple 'submit' buttons using 'forms' package

2009-12-05 Thread Ken
Sorry for repeating what you said Shawn, but for some reason your reply wasn't showing up in my browser until after I had answered the question for myself. Thanks, Ken -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

Re: How to create multiple 'submit' buttons using 'forms' package

2009-12-05 Thread Ken
Never mind, got it. the forms package merely provides the interior of the ; the markup, plus any submit buttons, are the responsibility of the template (or other code). Thanks, Ken On Dec 5, 8:55 pm, Ken <kenneth.m.mcdon...@sbcglobal.net> wrote: > I have the following form, which

How to create multiple 'submit' buttons using 'forms' package

2009-12-05 Thread Ken
can't even figure out how to get a single standard submit button to show up-- there doesn't seem to be a 'submit widget' listed in the Django book. Or perhaps I'm just not seeing it? As you can tell, I'm an absolute newbie. First day. Thanks for the patience. Ken -- You received this message

Re: Can't run Django from the command line using just "manage.py runserver", following attempt to install Python2.6 on windows 7.

2009-12-01 Thread Ken MacDonald
p (missing the "%*" maybe), you wouldn't see the args. Ken C:\>*assoc .py* .py=Python.File C:\>*ftype Python.File* Python.File="C:\Python25\python.exe" "%1" %* On Tue, Dec 1, 2009 at 7:18 AM, Rodrigo Cea <rodrigo...@gmail.com> wrote: > Thanks for the

Re: how to symlink to django-admin.py from some place on path?????.

2009-11-23 Thread Ken MacDonald
o-supplied files such as django-admin.py and manage.py) can be run from the command prompt directly, and include support for command-line parameters as well. Looking at the output from "assoc", you'll find that even ".bat" and ".exe" extensions are defined in this man

Re: autogenerated 'id' field from Django model doesn't autoincrement?

2009-11-20 Thread Ken MacDonald
not use 'nextval' to generate them. I've changed the initial data loader to use nextval instead of the data's sequence numbers, so shouldn't have this problem again. I'm leaving the setval() in my code (modified as in a prev. reply) so that the sequence will reset to 1 if the table rows are all drop

Re: autogenerated 'id' field from Django model doesn't autoincrement?

2009-11-20 Thread Ken MacDonald
sequence, but the sequence is out-of-sync (value=7) with the actual DB (max id is 92,000+), thus the code to first setval() the sequence. Anyway the code seems to work, but it's still odd that the type isn't serial. Ken -- You received this message because you are subscribed to the Google Groups &qu

  1   2   >