be able to sort based on it.
I wasnt able to find a whole lot on how to do this in the DJango
documentation. Although, I could be looking in the wrong places. Any
help would be apprecaited.
Thanks!
- DF
--~--~-~--~~~---~--~~
You received this message because
nt completely
miss this being covered in the models examples somewhere.
- DF
--~--~-~--~~~---~--~~
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.c
I'm currently building my first Django-based app, which is proceeding
fairly well, thus far. One of the goals is to allow users to post
information (text, pics, video) and for the app to be able to
automatically detect the location where they posted this information.
That data would then ideally be
I'm currently working on my first Django app, which allows registered
users to submit content through a basic form.
It works thus far with one caveat: when the form is displayed, the
user ("Author") is presented with a drop-down list of all users
instead of automatically populating that field with
I tried that before your answer arrived and it worked like a charm. I
just excluded the author field from the form and kept everything else
the same. It works perfectly, as the user was already passed to the
author field in the view. A logged in user can now automatically post
a story now through t
Thanks for the advice. I want to make sure it's secure.
What's the best way to override the save I posted in the code above
without causing issues?
On Feb 25, 2:10 am, Bernhard Schandl
wrote:
> Hi,
>
> > I tried that before your answer arrived and it worked like a charm. I
> > just excluded the
est of me, as it often does. But it sounds quite intimidating.
I appreciate any feedback, realistic expectations and advice. And I
also appreciate the tolerance of experienced and skilled programmers
at addressing annoying novice questions like mine. I've learned that
asking questions is one
e I gotten into? :)
Your response, again, was awesome. Any more guidance is not only
appreciated, but welcomed.
What a great and kind resource this forum is.
On Feb 27, 11:57 am, Ethan Jucovy wrote:
> On Sat, Feb 25, 2012 at 7:50 PM, DF wrote:
> > GeoDjango though, to be honest, sou
I've been working on my first project for about a month now and have
had to iterate various models through the process, which is typical,
especially the first time. I just started using South about a week or
so ago and it's been giving me some problematic returns as I add new
fields to the models,
I'm currently working on my first Django project and have hit a
roadblock in regard to adding an ImageField to an existing model.
I currently have a model for a user posting content and one for django-
profiles. For the former, I added an ImageField so the used can submit
a photo to accompany the
Thanks. Still not sure how to wipe the database before starting fresh
with South.
On Mar 2, 8:50 pm, Shawn Milochik wrote:
> If it's dummy data then you can always wipe it and reset South.
>
> There are some issues with sqlite. Not all constraints are enforced and
> it doesn't support removing fi
Thanks. I'm having a bear of a time after I added an ImageFile and
media folder and then tried to make a migration with South (made
another post about this). I figure it might be best to just chuck it
and start again.
On Mar 2, 9:59 pm, Shawn Milochik wrote:
> On 03/02/2012 09:55 PM,
The solution appears the have been simple: delete the offending
tables.
I have not tried to upload an actual image yet yet everything appears
9knock wood) to be working properly thus far.
Thanks for the advice, especially about how South isn't so friendly
with sqlite3!
On Mar 2, 10:02 p
This is my first time using this app and I can't seem to get it
working within the template. No errors. It's just that nothing shows
up (which is obviously an error).
Here's the snippet from the template:
{% extends 'base.html' %}
{% load thumbnail %}
{% block page_title %}User Profile{% endblock
Like a charm!
Thanks for your patience. I was working on this, my first django project,
for months then put it away two months ago when things got too hectic.
Still brushing off the cobwebs with some things,
Many, many thanks.
On Wednesday, May 16, 2012 9:43:34 PM UTC-4, Irfan Baig wrote:
>
Newbie question. I have an application where registered users can submit
stories. The posting and display works great but I wanted users to have the
ability to edit any of their stories. The goal would be for a user to find
a list of their stories on their profile page, choose one that they woul
Is there a way to remedy this?
On Friday, May 18, 2012 5:37:44 PM UTC-4, jondbaker wrote:
>
> The lines:
> #else:
> #story_form = StoryForm(instance=story_form)
> ...appear to be handling the GET request, and they're commented out.
>
> On Fri, May 18, 201
m(instance=story)
> return render_to_response('report/storyedit.html', {'form':
> story_form}, context_instance=RequestContext(request))
>
>
>
> On Fri, May 18, 2012 at 4:52 PM, DF wrote:
>
>> Thanks. This worked:
>>
>> else:
>> st
ofiles/user_profile")
> else: # GET request
> story_form = StoryForm(instance=story)
> return render_to_response('report/storyedit.html', {'form':
> story_form}, context_instance=RequestContext(request))
>
> I hope this helps a little.
>
Thanks for that insight. It's always good to reinforce best practices for
newcomers like myself.
On Monday, May 21, 2012 7:47:33 AM UTC-4, bruno desthuilliers wrote:
>
> On May 19, 5:41 pm, Jonathan Baker
> wrote:
>
> Just a note about best practises:
>
> >
> > # views.py
>
> (snip)
>
> >
I'm wading – carefully – into some basic geolocation using HTML5. I
currently have a meta form that has space for lat and long coordinates and
have found the proper code to obtain those coordinates using the Google
Maps API (pretty simple stuff).
Next step: inserting those coordinates automatic
Several hours of frustration here and looking to see if anyone has any
advice.
I'm trying to install GeoIP vie Homebrew and receive the following error
just prior to the install finishing:
"Error: The linking step did not complete successfully
The formula built, but is not symlinked into /usr/l
Tried that. Got this:
"Cowardly refusing to `sudo brew link'"
On Thursday, May 24, 2012 5:41:39 PM UTC-4, Andre Terra (airstrike) wrote:
>
> sudo brew link geoip? Total guess, btw.
>
>
> Cheers,
> AT
>
> On Thu, May 24, 2012 at 6:39 PM, DF wrote:
>
I've spent several hours attempting to resolve my problems setting up GeoIP
in Django to no avail and was hoping to get some guidance on what the
problem(s) might be.
I'm working on an existing Django application that required some
geolocation abilities, specifically getting a users IP and la
._name, mode)
OSError: dlopen(/usr/local/lib/libGeoIP.dylib, 6): no suitable image found.
Did find:
/usr/local/lib/libGeoIP.dylib: mach-o, but wrong architecture"
Anyone have a clue on how to remedy this?
On Thursday, May 24, 2012 7:10:50 PM UTC-4, DF wrote:
>
> I've spen
A TemplateSyntaxError error has occurred in my previously functional
project and after trying for hours to resolve it, it was determined it
might be a cache error and to empty the tmp directory at the root (the
template had been working fine for a week and nothing was changed that
might have
I've been working on a Django project, my first, with no issues. I closed
the file and restarted the computer for software updates and I'm now
receiving the following error:
Traceback (most recent call last):
File "manage.py", line 14, in
execute_manager(settings)
File
The following issue has been plaguing me for many hours now and was hoping
someone might have some insight.
I've been working on my first Django project in PyCharm with few issues.
This morning, to update software, I closed the file and restarted the
computer. When i opened the file and ran the
I'm trying to place markers based on the latitude and longitude stored in a
model on a Google Map using the API and HTML5 geolocation.
The issue is how to loop through the lat/lon info for each object stored in
the database within JavaScript tags using template keywords, which I'm not
sure can
That's interesting, but mine seems like it could be less involved. This is
what I attempted, which failed:
http://dpaste.org/55T9x/
On Thursday, May 31, 2012 12:32:26 PM UTC-4, DF wrote:
>
> I'm trying to place markers based on the latitude and longitude stored in
> a mo
I'm working on my first project and I'm attempting to implement a basic
search function where users can search for a specific terms.
There are many options available, most a bit too heavy for what I require.
I found this posting which illustrates how to implement a basic search
function that so
aight-forward, well documented, and mimics the Django ORM. No need to
> parse the query yourself or anything like that, just pass the raw input
> to Haystack and enjoy delicious search results :)
>
> _Nik
>
> On 6/18/2012 11:23 AM, DF wrote:
> > I'm working on my
This filters the query down on each loop of the word user typed, you
> would adjust that according to your model fields.
>
> Hope that helps.
>
> On 18/06/2012 14:23, DF wrote:
> > I'm working on my first project and I'm attempting to implement a
> > basic sea
I've been trying for two weeks to implement the highly regarded
django-ratings with zero success.
I've followed all directions, which are not that detailed, and cannot
figure out how to actually present a means for a user to submit a rating
with the template.
There are no directions on how to
I have a simple note taking part of my application I'm trying to converge
into one template. Currently, I have one template and view that renders and
posts the form and another that displays the results. I'd like to
amalgamate these into one where the form exists and the results are
displayed o
I have a problem that I hope someone with insight can aid with. My first
Django project is near completion and I’m currently transitioning to a
Postgres database in anticipation of deploying via Heroku. The process was
going fairly smoothly until this occurred when I ran python manage.py
syncdb
(sender, instance, signal, created, **kwargs):
"""When user is created also create a matching profile."""
from stentorian.report.models import UserProfile
if created:
UserProfile(user = instance).save()
On Thursday, July 5, 2012 1:06:26 PM UTC-4,
Hi. I just delayed my first Django app via Heroku and I'm having an issue
that's proving very difficult to resolve. I have django-registration and
profiles installed and apparently something runs afoul unless the
'django.contrib.sites', and SITE_ID is removed from settings (this wasn't
the c
I've set up django's built in comments in my application and I'm employing
the flagging ability. The flagging works fine, but the 'cancel" link that
appears on the template returns the following error when clicked:
could not find http
The template/form is as follows:
{% extends "base.html" %}
I'm attempting to hide an auto-generated form field in a Django form using
CSS. Unfortunately, to remove the entire field, the "control group" class
requires an ID. The other IDs just use remove the form but leave the label.
Is there any way to achieve this? I need the form to remain there invis
40 matches
Mail list logo