Re: Any django reusable app for outdoor & indoor location, GPS tracking?

2017-09-27 Thread Lee Hinde
Regarding developing over https…. https://ngrok.com/ is a great tool when you want to use https locally. > On Sep 27, 2017, at 12:35 PM, Jani Tiainen wrote: > > Hi. > > To my knowledge there isn't one since we implemented our own tracker. > > If

Re: Is there a way to use input text placeholder when using {{ form.as_p }}

2017-07-26 Thread Lee Hinde
in the init method of your form do something like this: self.fields['verification_date'].widget.attrs["placeholder"] = 'date' > On Jul 26, 2017, at 1:31 PM, Alexander Joseph > wrote: > > I'm using {{ form.as_p }} in my template and would like to be able to use >

Re: Problems with migrations cleaning up a date field

2017-06-12 Thread Lee Hinde
On Sat, Jun 10, 2017 at 5:03 AM, Melvyn Sopacua wrote: > On Friday 09 June 2017 20:56:46 James Schneider wrote: > > > > > Quite honestly this sounds like a bug in the migration system if > > > that's the case. I'm pretty sure it should ask what value to use as a > > >

Re: Problems with migrations cleaning up a date field

2017-06-09 Thread Lee Hinde
I should add, this project is in 1.8.x. I'm working around the problem by skipping the migration. -- 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

Problems with migrations cleaning up a date field

2017-06-09 Thread Lee Hinde
I'm having problems with a migration after cleaning up an oddity with a date field and I'm not sure how to fix it. Any advice appreciated. I made this change to a date field: -start_date = models.DateField(db_index=True, default=False, - help_text="The date

Shout out to Grove Collaborative for django-sql-explorer

2016-09-03 Thread Lee Hinde
Just did a quick report for a client with django-sql-explorer ( https://github.com/groveco/django-sql-explorer) and once again I'm grateful for its existence. Highly recommended for quick ad-hoc reporting. (no relationship except that I'm a Grove Co customer so I can give back a little bit.) --

Re: Clarifying Project vs Apps

2016-08-24 Thread Lee Hinde
On Wed, Aug 24, 2016 at 9:23 AM, Rich Shepard <rshep...@appl-ecosys.com> wrote: > On Wed, 24 Aug 2016, Lee Hinde wrote: > > My tuppence. >> > > Lee, > > Before or after Brexit? The value might change. :-) > > No, an app is a logical grouping of objects/

Re: Clarifying Project vs Apps

2016-08-24 Thread Lee Hinde
> On Aug 24, 2016, at 8:48 AM, Rich Shepard wrote: > > While I think that I understand the differences between a project and its > apps there remains one point of uncertainty. I've not found the answer, > although it might be in the 1.10 docs or on the Web and I've

Best way to keep the current selection

2016-07-26 Thread Lee Hinde
I'm wondering if there's a better way to maintain a selection of records across calls to the app. In one of my projects users can do ad-hoc searches; i.e., Last Name = Smith, Class Name = Yoga, etc. They do the search, then get the query results presented in a table. Then they can do things

Re: Error uploading images

2016-07-02 Thread Lee Hinde
Aargh. Thanks. On Saturday, July 2, 2016, Vijay Khemlani <vkhem...@gmail.com> wrote: > The typical problem is forgetting to add the > > enctype='multipart/form-data' > > attribute to the form tag > > > > On Sat, Jul 2, 2016 at 9:40 PM, Lee Hinde <leehi...@gma

Error uploading images

2016-07-02 Thread Lee Hinde
Using django-storages to put user uploaded files on s3. Uploading images in the shell works fine. So, I assume I've got django-storages and boto installed fine and S3 configured correctly. Uploading in real-life, doesn't work. The error I get back is that the image field is required. The model:

Re: LoginRequiredMixin ignored

2016-06-16 Thread Lee Hinde
I always assume it's me. That was some errant copy and paste. Thanks! On Wed, Jun 15, 2016 at 11:51 PM, Babatunde Akinyanmi <tundeba...@gmail.com> wrote: > Actually it's you. Please see inline: > > On Jun 15, 2016 11:56 PM, "Lee Hinde" <leehi...@gmail.com> wr

LoginRequiredMixin ignored

2016-06-15 Thread Lee Hinde
Using Django 1.9.7. I have the following class: class AddView(LoginRequiredMixin, CreateView): template_name = "entry.html" model = Property form_class = AddPropertyForm success_url = "/buy/" login_url = '/account/login/' def dispatch(self, request, *args, **kwargs):

Re: Absolute beginner step by step

2016-06-11 Thread Lee Hinde
https://leanpub.com/tangowithdjango19/ > On Jun 11, 2016, at 2:07 PM, Gary Roach wrote: > > If you don't mind working with Python2.7 and Django 1.7 you might try "Tango > With Django" . It is out of date but still is a good

Re: django css: general query on CDNs and crispy forms

2016-02-23 Thread Lee Hinde
On Feb 23, 2016, at 5:27 PM, clarksonchri...@gmail.com wrote: > > Should i download bootstrap properly or do the CDNs suffice? Your call; but if you want to have a plan B, here’s an example: http://www.hanselman.com/blog/CDNsFailButYourScriptsDontHaveToFallbackFromCDNToLocalJQuery.aspx

Re: Could not parse the remainder template inheritance

2016-01-02 Thread Lee Hinde
If you’re just getting your feet wet and don’t want to invest in an editor/IDE just yet, try TextWrangler: http://www.barebones.com/products/textwrangler/ It’s free and won’t get in your way. > On Jan 2, 2016, at 8:11 AM, Matthew

Query question

2015-08-17 Thread Lee Hinde
Given this model, I want to find all ProductSale objects that have expired and where the Person doesn't have a later (unexpired) purchase of the same product. class ProductSale(models.Model): product = models.ForeignKey(Product) person = models.ForeignKey(Person) ... date_expires =

Limit initial admin queryset

2015-07-23 Thread Lee Hinde
I have a model - Registrations. 97% of the time a user wants to see 'todays' registrations when viewing this model in admin. Is there a way to set the initial display of records, but allow full access thereafter? The example in admin.get_queryset assumes I want to manage each query. In my case, I

Re: Easy to use graphical reporting tools for SQL

2015-07-21 Thread Lee Hinde
https://github.com/epantry/django-sql-explorer You can build the queries and they're available to whomever you want to give access. This assumes they have access to the django app. On Mon, Jul 20, 2015 at 2:09 PM, Kevin wrote: > In our office we have a Django

Re: Is there a plan to modernize Django-admin?

2015-07-21 Thread Lee Hinde
On Sat, Jul 18, 2015 at 12:25 AM, Stuart Longland < stua...@longlandclan.yi.org> wrote: > On 18/07/15 11:00, Ezequiel Bertti wrote: > > Do you already see this project? > > > > https://github.com/sshwsfc/django-xadmin > > Unfortunately their homepage just swears at me in Chinese.

Testing posts to S3

2015-02-11 Thread Lee Hinde
I'm using django storages/boto to push json files to s3 where they are to be read by a different app. I'd like to test the file push by using the Test Client to see if the file is present on S3. client = Client() r = client.get(url, content_type="application/json") In every case, r comes back

Re: Change keys in values dictionary.

2015-01-05 Thread Lee Hinde
essage.objects.filter(recipient__user__system_id=user_id).values('id', > 'subject') > > Collin > > On Friday, January 2, 2015 8:35:42 PM UTC-5, Lee Hinde wrote: >> >> If I do a query: >> >> messages = Recipient.objects.filter(user__system_id=user_id).values("

Change keys in values dictionary.

2015-01-02 Thread Lee Hinde
If I do a query: messages = Recipient.objects.filter(user__system_id=user_id).values("message__id","message__subject") and then {"data":list(messages)} jsonify it, I end up with: "data" : [ { "message__id" : "2f24d132-4321-4d63-868a-21de6fbc0d44", "message__subject" : "And

Re: Django REST Framework: How to add prefix in URL for versioning

2014-11-05 Thread Lee Hinde
Swap the urls: url(r'^v1/', include(v1_urls, namespace="v1")) url(r'^', include(default_urls, namespace="default")), On Wed, Nov 5, 2014 at 5:01 AM, Shoaib Ijaz wrote: > I am trying to create version for REST application. Here is my URL Examle > > www.myapi.com/foo

Re: tracking intent during password reset process

2014-09-06 Thread Lee Hinde
gt; and resets. This keeps most of the routing intact, but gives you a hook to >> redirect on in a later stage. >> However, I'm not using django-registration so I can't give you any >> examples. >> >> >> On Friday, September 5, 2014 11:23:54 PM UTC+2, Lee Hinde wrot

tracking intent during password reset process

2014-09-05 Thread Lee Hinde
I have three primary levels of access in my project. The public at / Instructors at /instructor/ Staff at /staff/ The issue is with the password reset process. If someone comes to /instructor/ and then goes through the password reset process I want them to end up at /instructor/ when they're

Re: Flatpages

2014-08-15 Thread Lee Hinde
I just logged into the backend to make sure the django_flatpage_sites table was populated and it is. On Fri, Aug 15, 2014 at 2:21 PM, Lee Hinde <leehi...@gmail.com> wrote: > Yes. > > > On Fri, Aug 15, 2014 at 2:10 PM, Collin Anderson <cmawebs...@gmail.com> >

Re: Flatpages

2014-08-15 Thread Lee Hinde
Yes. On Fri, Aug 15, 2014 at 2:10 PM, Collin Anderson wrote: > SITE_ID is set, but is the correct site selected on the flatpage? > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and

Re: Flatpages

2014-08-15 Thread Lee Hinde
flatpages > without a trailing slash will not be matched. > Could it be that? > > > On Friday, August 15, 2014 1:58:49 PM UTC-5, Lee Hinde wrote: > >> Yes, it's a record in the flatpages table on the production side. >> >> >> On Fri, Aug 15, 2014 at 11:43 AM,

Re: Flatpages

2014-08-15 Thread Lee Hinde
Yes, it's a record in the flatpages table on the production side. On Fri, Aug 15, 2014 at 11:43 AM, Collin Anderson wrote: > I also assume you added the page to the production database and not just > your dev database (if they're different)? > > -- > You received this

Re: Flatpages

2014-08-15 Thread Lee Hinde
Yes, ALLOWED_HOSTS is set. This site has been in production since late March, so it's otherwise a going concern. (1.6.x, which I didn't mention earlier). On Fri, Aug 15, 2014 at 11:37 AM, Lee Hinde <leehi...@gmail.com> wrote: > It's the only page; I'll double-check allowed hosts... &

Re: Flatpages

2014-08-15 Thread Lee Hinde
on[1] > > [1]https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts > > > On Friday, August 15, 2014 12:40:43 PM UTC-5, Lee Hinde wrote: >> >> I added flatpages to a project and got it working fine locally, using dev >> server, but I get a 404 acc

Re: Flatpages

2014-08-15 Thread Lee Hinde
It's /test/. The flatpages admin form won't accept a url that doesn't begin and end in a slash. On Fri, Aug 15, 2014 at 10:55 AM, Collin Anderson wrote: > What is your page's url? Does it end with a slash? > > -- > -- You received this message because you are subscribed

Flatpages

2014-08-15 Thread Lee Hinde
I added flatpages to a project and got it working fine locally, using dev server, but I get a 404 accessing my test page when I push to production. Googling the issue, most common complaints fixed by making sure SITE_ID was set, and that's in place in my site. I'm not using middleware, I'm

Re: school website

2014-08-13 Thread Lee Hinde
You might check out: https://github.com/burke-software On Tue, Aug 12, 2014 at 7:24 AM, ngangsia akumbo wrote: > i have a website to build > > it will consist of 4 groups > students, staff, parents and courses > > students will have the following > profile > update >

Re: Screenshot pdf from AWS hosted django app

2014-07-25 Thread Lee Hinde
On Fri, Jul 25, 2014 at 4:00 PM, Ralph Lewis wrote: > I am hosting a django webapp in AWS and that is running fine, no errors. I > now want to be able to take a screenshot of the first page of any pdf that > is uploaded to the webapp. I have not had any luck trying to

creating parent record as part of creating the child record

2014-07-16 Thread Lee Hinde
I need help understanding the flow of saving an object when using Model Forms and Create Views. I am using a CreateView class and a Model Form to create the line item of an invoice and the parent invoice as part of the same user process. - It's one step as far as the user is concerned. The

testing equality in template tag

2014-06-25 Thread Lee Hinde
with view code like so: import calendar months_choices = [] for i in range(1,13): months_choices.append((i, calendar.month_name[i])) context['months'] = months_choices and context['default_month'] = today.month I have this snippet in a template (my

All purpose type checking

2014-03-24 Thread Lee Hinde
I have a search form that lets a user pick the field to be searched from a pop-up. They could enter a date, a string or a number. Sometimes they enter all of the above and I'm only expecting one of the above. GET:, I'm not catching type errors very gracefully and I'm wondering if there's a

Re: Making sure I'm not missing out on some must have Django apps

2013-12-15 Thread Lee Hinde
should be using? I'm looking for general purpose apps rather than specific apps as I can find the specific ones when I need them. -- Lee Hinde -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiv

Re: Error: XXX is not JSON serializable

2013-11-19 Thread Lee Hinde
Set directly would give the error you > mention since repr() of a ValuesListQuerySet looks like a list. > > > On Tuesday, November 19, 2013 12:28:11 PM UTC-5, Lee Hinde wrote: >> >> I have an app I'm moving from local dev (mac, python 2.7.2, django 1.5.4) >> to WebFacti

Error: XXX is not JSON serializable

2013-11-19 Thread Lee Hinde
I have an app I'm moving from local dev (mac, python 2.7.2, django 1.5.4) to WebFaction (python 2.7.5. I'm storing record ids like so: section_ids = list(sections.values_list('id', flat=True)) request.session['query.section_ids.last'] = section_ids works fine locally and fails on WF with: (as

Re:

2013-11-03 Thread Lee Hinde
But could please elaborate a little more. :) > > > On Mon, Nov 4, 2013 at 2:48 AM, Lee Hinde <leehi...@gmail.com> wrote: > > On Nov 3, 2013, at 12:23 PM, Aamu Padi <aamup...@gmail.com> wrote: > > > How to make a model with a yes/no field, if yes tha

Re:

2013-11-03 Thread Lee Hinde
On Nov 3, 2013, at 12:23 PM, Aamu Padi wrote: > How to make a model with a yes/no field, if yes that particular object > (image) will be used as the background, and no other image will be selected. > > I have come with this model: > > class

Querying across Generic Relations

2013-10-28 Thread Lee Hinde
I have a table, Credit, that I want to query based on a value several hops away. There's a CreditLineItems that has a Generic Foreign Key to one of two tables, each of which has a Foreign Key to the table I want to search. I've not as yet setup a reverse relation in the related tables. My

Re: while loop in django

2013-09-19 Thread Lee Hinde
Just a stab… https://docs.djangoproject.com/en/1.5/ref/templates/builtins/#ifchanged The sample code shows you how to move through a selection and how to test changes. On Sep 19, 2013, at 12:53 AM, Harjot Mann wrote: > On Thu, Sep 19, 2013 at 12:45 PM, Leonardo

Re: Testing Permissions in URL Includes

2013-09-13 Thread Lee Hinde
On Sep 13, 2013, at 12:47 PM, Arnold Krille <arn...@arnoldarts.de> wrote: > On Fri, 13 Sep 2013 11:30:44 -0700 Lee Hinde <leehi...@gmail.com> wrote: >> So, the question, is there a way to wrap url include calls in a >> permission check? > > Wrapping a whole

Testing Permissions in URL Includes

2013-09-13 Thread Lee Hinde
Using Django 1.5.x I have in my project urls.py entries like this: url(r'^staff/people/', include('people.urls')), url(r'^staff/admin/facility', include('facility.urls')), url(r'^staff/admin', include('district.urls')), url(r'^staff/section', include('classes.urls')),

Re: AJAX - Class Based View or Function Based View?

2013-08-29 Thread Lee Hinde
On Wed, Aug 28, 2013 at 11:51 PM, Sarthak Dev wrote: > I'm working on an app which uses a lot of AJAX requests. Having previously > used FBVs for handling ajax and returning JSON, how efficient will it be to > use a CBV for the same? I read the django docs and found >

Getting Timezone conversion in template with USE_TZ = False;

2013-08-12 Thread Lee Hinde
I'm displaying a date/time field in template. Data in the database: 2013-05-30 00:00:00 template tag: {{ reg.registration_date }} as displayed in the web page: May 29, 2013, 5 p.m. I didn't have a USE_TZ setting until I tried to figure out what was happening here. The data I'm playing with

Re: Django Simple registration fourm

2013-06-13 Thread Lee Hinde
On Thu, Jun 13, 2013 at 8:54 AM, Jagdeep Singh wrote: > > > On Thursday, 13 June 2013 19:00:57 UTC+5:30, Muhammad Bilal Anjum > Soharwardi wrote: >> >> Can any body give me the code of simple registration form in >> Django-Python? > > > Try this : > >

Re:

2013-05-02 Thread Lee Hinde
yes, it looks like they're being responsive with issues in their test suite: https://github.com/TechEmpower/FrameworkBenchmarks/issues On Thu, May 2, 2013 at 9:59 AM, Michał Nowotka wrote: > According to that webpage: > http://www.techempower.com/benchmarks/#section=data-r4

Re: Django-Registration/Custom Authentication Issue

2013-04-19 Thread Lee Hinde
Thanks. On Fri, Apr 19, 2013 at 4:41 AM, Paul Walsh wrote: > These are the changes you'll have to make to django-registration, if you > are using AUTH_USER_MODEL in django 1.5 and inheriting from AbstractUser: > > >

Re: Django-Registration/Custom Authentication Issue

2013-04-16 Thread Lee Hinde
te: > >> >> >> >> >> On Sunday, April 14, 2013 9:49:32 PM UTC-4, Lee Hinde wrote: >> I'm trying to do a 'simple' registration with just a user email and password >> required to create an account. I'm using django-registration with django &g

Django-Registration/Custom Authentication Issue

2013-04-14 Thread Lee Hinde
I'm trying to do a 'simple' registration with just a user email and password required to create an account. I'm using django-registration with django 1.5.1 and have created a custom model and the custom model manager. I can hit all the registration forms just fine and have copied the example from

Re: PostgresSQL or MySql with django?

2013-03-18 Thread Lee Hinde
On Mar 18, 2013, at 9:34 AM, frocco wrote: > Thank you for your feedback. > Other than the docs, is there a good ebook to learn the basics. I just > purchased navicat to use. > https://django.2scoops.org/ -- You received this message because you are subscribed to the

Inline formset with different default values for each "extra" row

2012-12-04 Thread Lee Hinde
For a product up to three different vendors have been identified and I want to present a row per vendor (which is a fk) so that the user could select order quantities from each vendor. If a vendor doesn't have an order quantity, I'd want to ignore it at form.save() time, rather than reject it.

Re: Seeding Foreign Key with known object with Class Based Views

2012-11-27 Thread Lee Hinde
client_data.id ># now we are ready to save new address > newaddress.save() > return http.HttpResponseRedirect(self.get_success_url()) > > 2012/11/25 Lee Hinde <leehi...@gmail.com>: > > > > On Nov 24, 2012, at 2:41 PM, Sergiy Khohlov <skhoh...

Re: Seeding Foreign Key with known object with Class Based Views

2012-11-24 Thread Lee Hinde
d your code. I can not hack your PC and understand > your problem. > > thanks, Serge > 2012/11/24 Lee Hinde <leehi...@gmail.com>: >> nt to seed the client id programmatically without presenting a form >>> field to enter what's a known value > > -- Tha

Re: Seeding Foreign Key with known object with Class Based Views

2012-11-24 Thread Lee Hinde
; > https://docs.djangoproject.com/en/dev/topics/class-based-views/generic-display/ > switch Publisher to client and books to address > :-) > > 2012/11/22 Lee Hinde <leehi...@gmail.com>: > > I have two tables, Client and Address. Address has a foreign key 'client' > > which points to

Seeding Foreign Key with known object with Class Based Views

2012-11-21 Thread Lee Hinde
I have two tables, Client and Address. Address has a foreign key 'client' which points to the client table. I'll make my user enter a client and then enter 1-x Addresses. I'll know which client the address is being linked to before the record is created, with a url like : /client/3/address/new/.

Re: syncing sqlite3 for Django tutorial

2012-11-21 Thread Lee Hinde
>From the docs: NAME -- The name of your database. If you're using SQLite, the database will be a file on your computer; in that case, NAME should be the full absolute path, including filename, of that file. If the file doesn't exist, it will automatically be created when you synchronize the

Re: How many developers have moved to class-based views?

2012-11-11 Thread Lee Hinde
The dev docs are much more informative. On Sun, Nov 11, 2012 at 10:45 AM, Arnold Krille wrote: > > Docs on CBV in django1.4 are a bit sparse to say the least. > > > Have fun, > > Arnold > -- You received this message because you are subscribed to the Google Groups

CBV for Nested Formesets

2012-11-09 Thread Lee Hinde
I'm looking at these two blog posts to help me figure out nested formsets: http://yergler.net/blog/2009/09/27/nested-formsets-with-django/ http://andreipetre.tumblr.com/post/26203496689/nested-formsets-with-django The example uses a function view and I was interested using class-based views,

Re: Modernizing the Tutorial

2012-10-26 Thread Lee Hinde
On Thu, Oct 25, 2012 at 4:37 PM, Russell Keith-Magee wrote: > > > On Thu, Oct 25, 2012 at 9:00 PM, Tomas Neme wrote: >> >> Now that function-based views are being deprecated, or at least that >> class-based views are being favored, there should be

Re: connecting to existance mysql

2012-10-09 Thread Lee Hinde
On Tue, Oct 9, 2012 at 8:58 AM, Lewis wrote: > Hello, > I have website that build in php and have the database exists, what is the > process in using django to connect the existance mysql database? is there > tutorial about this process?

Re: Django tutorial question

2012-10-06 Thread Lee Hinde
TJ Marbois wrote: Hi going thru the Django tutorial - and got to this part: https://docs.djangoproject.com/en/1.4/intro/tutorial03/#decoupling-the-urlconfs my editor has a python lint program running...and it complains about 'include' at the import being written but unused... is there any

Re: DRYing up my forms.py

2012-08-03 Thread Lee Hinde
On Aug 3, 2012, at 9:01 AM, Melvyn Sopacua <m.r.sopa...@gmail.com> wrote: > On 3-8-2012 17:37, Lee Hinde wrote: > >> self.fields['photo_response'].widget.attrs["class"] = 'date-field >> input-small' >> self.fields['photo_response'].widget.forma

DRYing up my forms.py

2012-08-03 Thread Lee Hinde
I have a lot of this throughout my forms.py files: self.fields['verification_date'].widget.attrs["class"] = 'date-field input-small' self.fields['verification_date'].widget.format = '%m-%d-%Y' self.fields['mail_response'].widget.attrs["class"] = 'date-field input-small'

Re: Form 'POST' to a database

2012-07-10 Thread Lee Hinde
On Jul 10, 2012, at 8:48 PM, JJ Zolper wrote: > I honestly just have a general question. > > If I have one database set in my settings file in settings.py and I try to > execute a simple HTML Form using 'POST' how do I get that data into my > PostgreSQL database? > > In my view do I have to

Re: database values in a select form.

2012-07-09 Thread Lee Hinde
On Sun, Jul 8, 2012 at 7:39 PM, Michael Elkins <m...@sigpipe.org> wrote: > On Sat, Jul 07, 2012 at 08:25:54PM -0700, Lee Hinde wrote: >> >> What I'm noticing is that (in dev mode) the choice list for >> 'employment_status' doesn't update unless I trigger a change

database values in a select form.

2012-07-07 Thread Lee Hinde
I have a table, Choice, that is used to build common lists. For instance, there might be a list "Employment_Status" with values "Full-Time" and "Part-Time" I want to use those values in various forms, so in the appropriate models.py I have: def _get_list_choices(list): choices =

AuditTrail

2012-06-17 Thread Lee Hinde
I'm starting a new project that requires auditing and I see https://code.djangoproject.com/wiki/AuditTrail and I'm wondering if anyone would like to warn me off or point me a different direction. Based on the write up, AuditTrail looks like it'd do the job, but, it's never that easy, right?

Re: django and jquery

2012-06-11 Thread Lee Hinde
On Jun 11, 2012, at 11:51 AM, cocoza4 wrote: > i tried to retrieve data from django to jquery by using get > > this is my $get in jquery > > $.get("/video/", > { > video_page: page_number > }, > function(data){ >

Re: JQuery .get new url is not updating the page

2012-05-19 Thread Lee Hinde
once these values come from view.py, I want to change the > browser url so that url can be send to others. > You're right, I did. http://stackoverflow.com/questions/136458/change-the-url-in-the-browser-without-loading-the-new-page-using-javascript > > On Fri, May 18, 2012 at 3:52 P

Re: JQuery .get new url is not updating the page

2012-05-18 Thread Lee Hinde
On May 18, 2012, at 11:52 AM, furqanmlk wrote: > Hi there, > > I implemented the JQuery to get the data from Database server and display in > the form of table on the page when user click one of the DOM element. > I tried , > > JQuery Code: >

Re: form doing a query for each element of foreign key in select

2012-04-25 Thread Lee Hinde
On Apr 25, 2012, at 2:16 AM, Tom Evans wrote: > On Wed, Apr 25, 2012 at 5:58 AM, Lee Hinde <leehi...@gmail.com> wrote: >> I have a table with four or five foreign keys. Using the default form >> widgets, a foreign key is represented by a single value select. >> >&g

form doing a query for each element of foreign key in select

2012-04-24 Thread Lee Hinde
I have a table with four or five foreign keys. Using the default form widgets, a foreign key is represented by a single value select. I noticed, with debug_tool_bar, that a query is being made for each element of each foreign key select option. Seems like it ought not I am using     classes =

Re: Word Cap Form Labels

2012-04-19 Thread Lee Hinde
Terrific: .control-label {text-transform: capitalize;} Thanks. On Wed, Apr 18, 2012 at 10:27 PM, Jonathan D. Baker < jonathandavidba...@gmail.com> wrote: > Not sure about django, but this is easy to do in CSS. > > Sent from my iPhone > > On Apr 18, 2012, at 11:21

Word Cap Form Labels

2012-04-18 Thread Lee Hinde
The default behavior for a form label is to capitalize the first letter - 'Report name'. I'd like to capitalize the first letter of each word - 'Report Name'. Short of manually over-riding each label, is there a built-in way to do that? Thanks. -- You received this message because you are

Re: Is there such a open source django project?

2012-04-17 Thread Lee Hinde
On Tue, Apr 17, 2012 at 3:12 AM, James Deng wrote: > Hi all, > > I have a case to manage my staff for customer support, basically I need a > time based schedule table. the point is that we need to know WHO at WHEN > should take care of WHICH customer, we should be able to input

Re: adding html5 field attributes to a model form

2012-04-09 Thread Lee Hinde
n Monday, April 9, 2012 7:17:56 PM UTC-7, Lee Hinde wrote: > > Thanks for the response, Creecode, > > I've used that for adding class attributes just fine, but in this case I'm > trying to change the field 'type' and that's what doesn't seem to work. > > Toodle-looo

Re: adding html5 field attributes to a model form

2012-04-09 Thread Lee Hinde
On Apr 9, 2012, at 6:53 PM, creecode wrote: > Hello Lee, > > On Monday, April 9, 2012 6:14:08 PM UTC-7, Lee Hinde wrote: > > I'm trying to edit the field type in a form that is using the html5 doctype. > I've tried two ways: > > Neither works. > > Am I look

adding html5 field attributes to a model form

2012-04-09 Thread Lee Hinde
I'm trying to edit the field type in a form that is using the html5 doctype. I've tried two ways: class AddressForm(ModelForm): contact_email = forms.TextInput(attrs={'type': 'email'}) and class AddressForm(ModelForm): def __init__(self, *args, **kwargs):

Authentication and Modeling question.

2012-03-26 Thread Lee Hinde
I'm working on a rewrite of an app that has three categories of users and I'm wondering about the best way to link them to the authentication system: In-House Staff. Contractors Customers who interact via the app. The in-house staff model doesn't store any address info. Contractor and Customer

Re: Looking for a round trip example of adding/editing/saving a record using class-based views

2012-03-19 Thread Lee Hinde
On Sun, Mar 18, 2012 at 4:11 PM, Lee Hinde <leehi...@gmail.com> wrote: > I'm looking for something like the vote function in step 4 of the tutorial, > but using class-based views.py. Any pointers would be appreciated. > > Thanks. Specifically, what's the equivalent of this

Looking for a round trip example of adding/editing/saving a record using class-based views

2012-03-18 Thread Lee Hinde
I'm looking for something like the vote function in step 4 of the tutorial, but using class-based views.py. Any pointers would be appreciated. Thanks. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Re: admin css

2012-03-05 Thread Lee Hinde
On Sun, Mar 4, 2012 at 8:32 PM, Mike Dewhirst wrote: > I would like to adjust the admin app's base.css. Nothing outrageous. I just > want to change all the #999 color values to something a little bit darker so > screen text is slightly easier to see. > > I could write a

Re: Building authentication backend

2012-02-01 Thread Lee Hinde
On Feb 1, 2012, at 12:24 AM, apalsson wrote: > Hello. > > A very simple question. > > I am building an authentication back end to support TWO passwords. > This requires me to add an extra table to store the secondary password > plus a ForeignKey to User. > > The confusing part is, how I make

Re: Changes to default project layout?

2012-01-12 Thread Lee Hinde
Just following up on this, I don't think my question is answered, specifically, which settings.py file is intended to be used? On Wednesday, November 9, 2011 2:08:47 AM UTC-8, Russell Keith-Magee wrote: > > Hi Victor, > > All the answers you're looking for are in the draft release notes for >

Re: mistake in admin home page

2011-02-27 Thread Lee Hinde
On Sun, Feb 27, 2011 at 5:46 AM, vladimir wrote: > Please help me, why do I get such a form of admin home page (after > autentification): > >

Re: Problem with unicode in form posts

2011-02-24 Thread Lee Hinde
On Thu, Feb 24, 2011 at 1:32 AM, Tom Evans <tevans...@googlemail.com> wrote: > On Wed, Feb 23, 2011 at 9:17 PM, Lee Hinde <leehi...@gmail.com> wrote: >> Except, now the data that's in the database for the username field >> goes from looking like this: >> l

Problem with unicode in form posts

2011-02-23 Thread Lee Hinde
I had this view function snippet: e = Account.objects.create( user_name = data.get('username'), password = data.get('password'), email = data.get('email'), subscription_number = data.get('subscription_id'), retrieved = False,

Re: [OT]Code Review As a Service

2011-01-25 Thread Lee Hinde
On Tue, Jan 25, 2011 at 7:03 AM, Daniel Roseman wrote: > On Tuesday, January 25, 2011 9:42:59 AM UTC, Venkatraman.S. wrote: >> >> Hi, >> >> I was wondering whether there any freelancers/companies who offer >> code-review as a service. >> IMHO, a code review helps in almost

Re: Overwhelmed by File upload instructions

2010-07-09 Thread Lee Hinde
I recently struggled with file transfers. After I was done I discovered django-filetransfers. http://www.allbuttonspressed.com/projects/django-filetransfers On Thu, Jul 8, 2010 at 2:55 PM, Rodion Raskolnikiv wrote: > Soo easy... > Thanks for the tips! > I knew that there had

Booleans not being set in admin

2010-07-08 Thread Lee Hinde
I have a model, Store: class Store(models.Model): """ Store is use to link users and to provide a target for the weather report. """ name = models.CharField(max_length=50, help_text="Simple Identifier for Store -") zip_code = models.CharField(max_length=20,help_text = "Used

If you need a code review

2010-07-01 Thread Lee Hinde
I'm new to Django. I've done one modest, search only, public site prior to my current project. I'm also new to python. While I'm new to all this, I've been doing web dev. for 14 years. The site I'm working on now is a low-user intranet for a local restaurant chain. I was able to conceptualize

Re: Why is ModelAdmin to Model a 1-1 relationship?

2010-06-26 Thread Lee Hinde
On Fri, Jun 25, 2010 at 2:54 PM, patjenk wrote: > In our application, we have a Model that has a boolean field named > "deleted". When the delete() method is called, we set the deleted > field to 1 and then save the model. We would like to create an admin > site where we can

Re: len() vs count

2010-06-15 Thread Lee Hinde
On Tue, Jun 15, 2010 at 7:56 AM, bruno desthuilliers <bruno.desthuilli...@gmail.com> wrote: > On 14 juin, 22:17, Lee Hinde <leehi...@gmail.com> wrote: >> This started off as a pagination question, but then I realized it was >> a different issue: >> >&

Re: len() vs count

2010-06-14 Thread Lee Hinde
a sql count statement, while len() loads all rows from > the database and returns the array length of the results. > count() is much faster and better to use if you can conditionally > avoid loading all results. > > On Jun 15, 6:17 am, Lee Hinde <leehi...@gmail.com> wrote: &g

  1   2   >