I am trying to write a view that will take a file uploaded via form,
pass it to an ftp method and save it on an ftp server. However I am
running into problems when with the file object that gets passed to
the ftp method.
This is my view:
def order_prints(request, object_id):
p = get_obj
I am looking for the exact same thing.
On Aug 6, 11:35 pm, bweiss wrote:
> Is there a simple way to do the following that I'm just not seeing, or
> am I looking at trying to write a custom tag? The functionality I
> need is similar to {% regroup %} but not quite the same...
>
> My app current
This explains how to do this using the dictsort and regroup filters.
http://blueflavor.com/blog/2008/jul/28/advanced-django-template-tags-and-filters/
On Aug 30, 3:19 pm, Jonathan wrote:
> I am looking for the exact same thing.
>
> On Aug 6, 11:35 pm, bweiss wrote:
>
> >
r make one a template tag, I end up with an error, or
only getting one to work and the other fails silently. When I try and
make one into a template tag, I end up with the "object_id" is not
globally defined error.
I'm sure I am missing something really basic. Does anyone have a
poin
Nevermind, I was missing something terribly basic and just needed to
stop looking at it for a bit to realize how to combine it.
On May 22, 5:08 pm, Jonathan wrote:
> I am sure this is some very easy and simple concept I am just not
> grasping. I have two views which are very similar.
Hi, I am having a strange problem with floatformat (filter) and I
wonder if anyone else has seen it.
I am using google app engine and am storing decimal.Decimal objects in
the datastore that I am displaying in a template as money values so I
am doing foo.methodThatReturnsDecimal|floatformat:2.
T
Ha no one else seen this problem, or have any idea how it might
happen?
On Sep 26, 7:44 pm, jonathan wrote:
> Hi, I am having a strange problem with floatformat (filter) and I
> wonder if anyone else has seen it.
>
> I am using google app engine and am storing decimal.Decimal obje
ure
that I could use?
Jonathan
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.c
Hi,
I've slimmed it down to the relevant fields. I'm a bit of a noob, but
I think I'm basically trying to build a generic framework that can be
made specific in a profile.
Profile = BusinessVersion + Group + LifecycleStage + Package.Versions
Jonathan
class Product(models.M
l existing Profile's
automatically prompt for the new Package.
I've been reading a bit and perhaps model inheritance is what I'm
after. A VersionedPackage (renamed from PackageVersion) is really just
a Package with an extra field. Does that sound right?
Jonathan
On Nov 29, 2:31 am, t
I'm using South to migrate a certain field from ForeignField to
OneToOneField.
Initial state is that I have model A pointing to model B using a
ForeignField. Of course there's only one instance of A pointing to a B
instance.
I wasn't sure if this would work directly, or that I should do a 3-
stage
d South folders and egg files from
the site-packages directory... Interestingly enough if you don't do
that in Python's shell you'll get the new South version, whereas in
django's shell you'll get the old south version.
Jonathan
On Dec 19, 1:34 pm, Jonathan wrote:
>
I'd like to use the values of a ManyToManyField in a model's overriden
save() method when I save an instance in admin.
It turns out that by design, django does not update the M2M field
before calling save(), but only after the save() is complete as part
of the *form* save...
How can I access the n
In
http://docs.djangoproject.com/en/1.1/topics/i18n/localization/#gettext-on-windows
it says "Extract the contents of the bin\ directories in both files to
the same folder on your system".
I downloaded gettext-0.17.tar from the link provided and it did not
have a bin directory in it.
What should
22, 2010 at 10:03:33AM -0700, Jonathan wrote:
> > Inhttp://docs.djangoproject.com/en/1.1/topics/i18n/localization/#gettex...
> > it says "Extract the contents of the bin\ directories in both files to
> > the same folder on your system".
> > I downloaded gettext-0.17.
from a Rapid Application Development
perspective - and of course doing it as a thin client application has
all sorts of benefits in terms of deployment.
I'm wondering if anybody has built anything like a line of business
system with Django, and what your experiences were.
Jonathan
--
I use gramps. I guess it would be cool to port to django. --Jonathan
On Mon, Apr 28, 2008 at 10:32 AM, ecrosstexas <[EMAIL PROTECTED]> wrote:
>
> Does anyone know of any existing apps writtrn in Django for
> genealogy? I thought there was one in Google Code awhile back, but I
weak django to
only use CACHE_MIDDLEWARE_SECONDS for the Cache-Control headers?
Obviously, I can make this change locally, but I'd like to know if I'm
missing something and if this change has any chance of making it
upstream. :)
Thanks!
Jonathan
[1]
http://assets.en.oreilly.com/1/
Does anybody use Django/Python with Codebase? Can it be done? If so,
how hard is it?
--
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 t
Does anyone know if this progressed anywhere since '09?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/0fmsTMQC_tAJ.
To post to this group, send email to d
you to maintain the integrity of your 'core' app views while
still utilizing data from neighbouring apps, as you've described.
https://docs.djangoproject.com/en/dev/howto/custom-template-tags/#inclusion-tags
Cheers,
Jonathan
On 12/26/2012 07:07 AM, Omar Abou Mrad wrote:
> Greeti
The stack trace you pasted clearly indicates that you have an
indentation error in your polls/models.py module. It appears that you've
applied two spaces to the 'votes' field while 'poll' and 'choice' have
four. If you'll apply four spaces to all the field, the interpreter
won't complain.
On 12/26
templatetag at that layer in the cycle.
I don't know of another way to accomplish the goal, but if you learn of
one be sure and let me know!
Cheers,
Jonathan
On 12/27/2012 01:43 AM, Omar Abou Mrad wrote:
> On Wed, Dec 26, 2012 at 6:07 PM, Jonathan
> mailto:jonathandavidba...@gmail
, {
'document_root': settings.STATIC_ROOT,
}),
)
Feel free to add a similar pattern for media files as well.
Hope this helps,
Jonathan
On 01/08/2013 04:25 AM, Agnese Camellini wrote:
> I'm not using apache now, i'm just using the development se
hat this package supports some general
> tagging.
>
> Valts.
You can put any directory on your PYTHONPATH - it doesn't necessarily
have to be in site-packages.
Personally, I have django_apps and django_projects directories on my
PYTHONPATH for obvious purposes, which
ontext_instance=RequestContext(request))
Template:
{{ user_form.as_p }}
{{ profile_form.as_p }}
Cancel
Regards,
Jonathan.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Djan
N
(
SELECT
app_person_likes.person_id
FROM
app_person_likes
INNER JOIN app_kindoftea
ON app_person_likes.kindoftea_id = app_kindoftea.id
WHERE app_kindoftea.id IN (1, 2)
AND app_person_likes.person_id != 1
)
AND app_kindoftea.i
Bobby Roberts wrote:
> how can I assign form fields to certain css classes in django?
django-html [1] can be used to do this quite easily in your templates
(and lets you render form fields using HTML4 if you like, yay!).
Jonathan.
[1] http://code.google.com/p/django-h
By the way, that is the way to get django's development server to serve
up you files, and not necessarily the best way to go when you want to
deploy your site.
Your best bet is some sort of webserver like apache or lighttpd
Jonathan
Horus Kol wrote:
> On Nov 18, 2:24 pm, Horus Kol
nd some place else.
If anyone else can think of a better place to post this information,
let me know. Comments and thoughts are always welcome.
Jonathan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dj
Look at the import statements on the different urls.py files.
This:
from myproject.myapp import myview
urlpatterns = patterns('',
(r'^somepattern/', myview))
Does the same thing as this:
urlpatterns = patterns('',
(r'^somepattern/', myproject.myapp.myview))
On Aug 21, 8:5
I just wanted to let people know that the get-together is still on, if
people are interested.
There's more information here: http://django.meetup.com/3/
Let me know if you have any questions.
Jonathan
On Aug 20, 9:22 pm, Jonathan Nelson <[EMAIL PROTECTED]> wrote:
> I
Hello. I think I'm up against a bug in the new comments app. I could
be wrong.
I just deleted my old install and installed 1.0 this morning. I don't
know if that has anything to do with it or not.
I looked at this thread:
http://groups.google.com/group/django-users/browse_thread/thread/2012bd
d that I'm going
to roll my own comments system in a couple of weeks. I would have to
tweak the current comments framework substantially anyway to fit what
I need, regardless.
Jonathan
On Sep 16, 10:31 am, Mark <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Finally - I got commen
I'm actually rolling my own threaded comments system using an MPTT
algorithm. Contrib.comments and the django-mptt aren't a really good
fit for what I need.
It's taken me a while to get my head around the concept of traversing
the tree using the comment.left and comment.right values, but after
y
ng my own, then I discovered Django (so have started
> "porting" my site to Django), then I discovered the mptt app and thought I
> could just drop it in. Has not been that easy (probably in large part due
> to my Django-newbie
> status).http://www.sitepoint.com/article/hiera
rent.right:
node.left += 2
if node.right >= parent.right:
node.right += 2
node.save()
# a new node is created with correct left/right values
Comment.objects.create(
text = text,
left = parent.right,
right = parent.right+1)
I'l
quire you to code in Python and requires at least passing
knowledge in coding your own html/css.
Are you comfortable with that?
Jonathan
Gnarlodious wrote:
> Hello. I've spent about 8 hours trying to figure out how to get an
> actual page in my browser. Are there any clear instructions o
Hopefully, someone here can help me with this issue. I've got a
mod_wsgi.so compiled against Python 2.6.1 and Apache 2.2.11 for use on
Windows. It loads perfectly well (no errors during Apache startup), and
I've followed the steps given on the Django website and the mod_wsgi
site for getting
I'm trying to decorate a view function with login_required. I want
the user to be redirected to the current view after they log in.
I'm trying:
@login_required(redirect_field_name=request.path)
def myview(request, comment_id):
return render_to
but, I'm getting a "NameError: name 'reque
I just figured it out.
Instead of using a decorator, I just used this:
def myview(request, comment_id):
...if not request.user.is_authenticated():
..return HttpResponseRedirect('/login/?next=%s') % request.path
On Jan 27, 11:57 am, Jonathan Nelson wrote:
> I'm trying
I have Django 1.0.2 installed, using mod_python compiled against Python
2.6.1 and Apache 2.2.11.
Upon accessing my Django project's configured URL, I get the following
errors:
[Tue Jan 27 19:33:05 2009] [error] [client 127.0.0.1] Traceback (most
recent call last):
[Tue Jan 27 19:33:05 2009] [e
I am trying to dynamically add forms to a form wizard. Initially the
form wizard subclass is instantiated with three forms as follows:
# from urls.py
(r'^add/$', RecipeWizard([HeaderForm, IngredientForm, BodyForm])),
The idea is that a user will add any number of ingredients to a
recipe, so the
t if I want to make it visible to all apps and callable from a
> base
> template?
>
> Thanks!
If it only needs to be called in the base template, you could just {%
load %} and call it there as normal.
If it really does need to be available
etty_name [1]
is used [2] to generate a label from the field name if a label was not
given when the field was instantiated.
Jonathan.
[1] http://code.djangoproject.com/browser/django/trunk/django/forms/forms.py#L20
[2]
http://code.djangoproject.com/br
=slugify(...title...))
>
> but I have no idea how to pass title field (or at least model
> instance) to slugify function. Any idea how to solve?
Overriding the save method [1] would be one way to do it:
def save(self, **kwargs):
self.slug = slugify(self.title)
super(Entry
; argument to the ModelForm's save() method to get a
hold of the resulting model instance without saving it, make any
changes you want to the instance and then call save() on it yourself.
There's an example of this in the docs:
http://docs.djangoproject.com/en/dev/topics/forms/modelfor
author = models.ForeignKey('books.Author')
> illustrator = models.ForeignKey('books.Illustrator')
>
> class Meta:
> ordering = ['publication_date']
One option would be to use a generic relation:
http://docs.djangoproject.com/en/dev/ref/cont
please, can anyone help me out??
--
Jon
On Sun, Aug 16, 2009 at 10:20 AM, jzacsh wrote:
> hello,
>
> i'm sorry - i just want to get started and I'm trying to figure out
> something simple. I installed django last night and am wondering what
> setup.py actually did.
>
> the reason i want to know
I'm trying to add a feedreader element to my django project. I'm
using Mark Pilgrim's great feedparser library. I've used it before
without any problems. I'm getting a TypeError I can't figure out.
I've tried searching google, bing, google groups to no avail.
Here's the dpaste of what I'm tryi
I haven't used the form wizard, but it seems like your forms are in
...templates/wha/
Django is looking for your form at
...templates/wha/forms/wizard.html
you have them in
...templates/wha/contact/forms/wizard.html
try adding
...templates/wha/contact/forms
or
...templates/what/contact
to your
Thanks, I'll give it a shot.
J
On Jun 4, 8:06 am, Alex Gaynor wrote:
> On Thu, Jun 4, 2009 at 7:37 AM, Jonathan Nelson wrote:
>
>
>
>
>
>
>
> > I'm trying to add a feedreader element to my django project. I'm
> > using Mark Pilgrim's gr
r than a string representation of them, as you
would normally do.
Here's an example implementation which I think should do what you want:
http://dpaste.com/hold/56364/
Regards,
Jonathan.
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Hello everyone, decided to have a little fun today with Google's
Chrome browser. Since extensions were just released last week I
created a Django Docs extension that uses Google's AJAX search API to
search Django's official documentation. It lets you search the
Documentation in a popup frame and lo
, Python has more
applications than C# does, and django has a mascot. Where is C#
mascot? Retired!!
Jonathan C.
On Apr 22, 8:28 am, Kenneth Loafman wrote:
> Joe Goldthwaite wrote:
> > I’ve been working for a startup for a month or so. The main guy is
> > enthusiastic about techn
ascript }}{{ block footer_javascript_site
}}{{ endblock
footer_javascript_site }}{{ block footer_javascript_section
}}{{ endblock
footer_javascript_section }}{{ block footer_javascript_page }}{{
endblock
footer_javascript_page }}
{{ endblock footer
k dtd }}
>
> the properly syntax (for last Django version) would be:
>
> {% block dtd %} ... {% endblock %}
>
> Notice you should not include 'dtd' in the endblock tag.
>
> -f
>
>
>
>
>
>
> On Apr 27, 3:51 pm, Jonathan Hayward
> wrote:
&g
It gives a "file not found" error, either this way or if I add a trailing
slash.
How can I serve up static content from /media/* to a URL of
/media/* from the development server?
--
→ Jonathan Hayward, christos.jonathan.hayw...@gmail.com
→ An Orthodox Christian author: theology, lite
'^%s(?P.*)$' % (settings.MEDIA_URL[1:],), 'serve', {
> 'document_root':
> settings.MEDIA_ROOT,
> 'show_indexes': True }),)
>
>
> To answer your question, you should
> use os.path.abspath(o
s for accessing it with the
> user that runs the dev server.
>
> Regards,
> Xavier.
>
> Le 28 avr. 2010 à 01:00, Jonathan Hayward a écrit :
>
> Thank you!
>
> Right now, I have, in settings.py:
>
> MEDIA_ROOT = os.path.join(os.path.abspath(os.path.dirname(__file__
> Use this FILE_UPLOAD_PERMISSIONS = 0600
> and you have to give permissions to apache to read the file upload
> directory.
>
>
>
>
> Jonathan Hayward wrote:
>
>> The file permissions are right AFAIK; the directory is mode 755 and the
>> file 644, owned by the user running
I found the problem; I was trying to serve static (non-admin) media from a
'media/', and that was apparently being overridden by admin media use of the
same URL.
On Tue, Apr 27, 2010 at 7:53 PM, Jonathan Hayward <
christos.jonathan.hayw...@gmail.com> wrote:
> Thank you; right
th, or use TEXT
instead of VARCHAR so that a field of indefinite length is accommodated,
resources permitting?)
--
→ Jonathan Hayward, christos.jonathan.hayw...@gmail.com
→ An Orthodox Christian author: theology, literature, et cetera.
→ My award-winning collection is available for free reading o
Thanks!
On Wed, May 26, 2010 at 5:32 AM, Daniel Roseman wrote:
> On May 25, 10:49 pm, Jonathan Hayward
> wrote:
> > For CharField, EmailField, URLField, etc., is VARCHAR implementation
> > (meaning a fixed limit on length) absolutely non-negotiable, or there a
> way
> &g
Alex
>
> On May 26, 8:24 am, Jonathan Hayward
> wrote:
> > Thanks!
> >
> > On Wed, May 26, 2010 at 5:32 AM, Daniel Roseman >wrote:
> >
> >
> >
> > > On May 25, 10:49 pm, Jonathan Hayward
> > > wrote:
> > > > For CharF
d run into errors with the first. Does this mean that I should go with the
second, or is there another way that is preferred?
I'm using 1.2.
--
→ Jonathan Hayward, christos.jonathan.hayw...@gmail.com
→ An Orthodox Christian author: theology, literature, et cetera.
→ My award-winning col
Thanks, Dan and Daniel.
On Tue, Jun 22, 2010 at 3:45 PM, Daniel Roseman wrote:
> On Jun 22, 9:11 pm, Jonathan Hayward
> wrote:
> > What is the preferred way to make e.g. a TextField that will pass
> validation
> > if it is left empty? I've seen two approaches appa
/Exception Type:
AlreadyRegisteredException Value:
The model 'Entity' has already been registered.
Exception
Location:/usr/local/lib/python2.6/dist-packages/django_tagging-0.3.1-py2.6.egg/tagging/__init__.py
in register, line 39Python Executable:/usr/bin/pythonPython Version:2.6.5Python
Path:['/h
:['/home/jonathan/directory',
'/usr/local/lib/python2.6/dist-packages/pip-0.6.3-py2.6.egg',
'/home/jonathan/store/src/satchmo/satchmo/apps',
'/usr/local/lib/python2.6/dist-packages/django_threaded_multihost-1.3_3-py2.6.egg',
'/usr/local/lib/python2.6/dist
10 at 3:00 PM, Jonathan Hayward <
christos.jonathan.hayw...@gmail.com> wrote:
> I received the error below from the admin interface; I thought it was
> because I needed to run a syncdb, but stopping the server, running a syncdb,
> and restarting has generated the same error:
>
> Op
uldn't tell.
On Fri, Jun 25, 2010 at 5:35 PM, Oleg Lomaka wrote:
>
> Did you add your application to INSTALLED_APPS before running syncdb?
>
> On Jun 26, 2010, at 12:09 AM, Jonathan Hayward wrote:
>
> > P.S. Renaming the (SQLite) database file and running syncdb again
&g
model changes, just
> running syncdb will not make the appropriate changes to your tables. You
> probably need to look into south migrations.
>
> On Fri, Jun 25, 2010 at 2:09 PM, Jonathan Hayward <
> christos.jonathan.hayw...@gmail.com> wrote:
>
>> P.S. Re
ur PYTHONPATH. syncdb scans all modules from
> INSTALLED_APPS looking for models.py in them to populate database. So if you
> access you Entity model (for example at views.py) as
> from directory.models import Entity
> then add 'directory' to INSTALLED_APPS.
>
>
> O
None: "Entity.department" does not allow null values.
Exception
Location:/usr/lib/pymodules/python2.6/django/db/models/fields/related.py
in __set__, line 269Python Executable:/usr/bin/pythonPython Version:2.6.5Python
Path:['/home/jonathan/directory',
'/usr/local/lib/py
P.S. This problem did not resurface after I made other changes discussed
elsewhere in the thread; it seems to be secondary damage.
On Mon, Jun 28, 2010 at 2:46 PM, Jonathan Hayward <
christos.jonathan.hayw...@gmail.com> wrote:
> Thanks for pointing me to South. I've glanced over
Thank you! Solved.
On Mon, Jun 28, 2010 at 4:14 PM, Jeff Green wrote:
> You need to also state that null=True. Also, you want to have ensure that
> the field defined in your db
> allows null values.
>
> On Mon, Jun 28, 2010 at 3:19 PM, Jonathan Hayward <
> christos.jonat
ns to a file or equivalent? The
test server has no MTA so I can't really ask it to email me exceptions.
TIA,
--
→ Jonathan Hayward, christos.jonathan.hayw...@gmail.com
→ An Orthodox Christian author: theology, literature, et cetera.
→ My award-winning collection is available for free reading onlin
easily enough create JSON manually, but is there a
preferred way to take dicts, lists, strings, numbers, etc. and render a
structure as JSON?
--
→ Jonathan Hayward, christos.jonathan.hayw...@gmail.com
→ An Orthodox Christian author: theology, literature, et cetera.
→ My award-winning collection is
Thank you!
On Wed, Jul 7, 2010 at 5:35 PM, elijah rutschman wrote:
> You could implement a middleware class with a process_exception
> method. See:
> http://docs.djangoproject.com/en/dev/topics/http/middleware/#process_exception
>
> -Elijah
>
> On Wed, Jul 7, 2010 at 4:35
Never mind; I found:
import json
def view(request):
...
my_result = ...
return HttpResponse(json.dumps(my_result), mimetype="application/json")
On Wed, Jul 7, 2010 at 6:05 PM, Jonathan Hayward <
christos.jonathan.hayw...@gmail.com> wrote:
Hi,
I am new to Django and would like to advise on customising admin
forms.
I have references in my model to ID held in 3rd party systems. e.g.
Salesforce, Zendesk etc. What I want to do for these field types is
display a URL that links to the object in the respective source
system.
What would b
ther way I should be going about this given the id field
beforehand?
--
→ Jonathan Hayward, christos.jonathan.hayw...@gmail.com
→ An Orthodox Christian author: theology, literature, et cetera.
→ My award-winning collection is available for free reading online:
☩ I invite you to visit
>
> If you'd like the code for it, I can ask my company whether they'd be
> happy with me publishing it.
>
> Cheers, Euan
>
> On Jul 7, 10:35 pm, Jonathan Hayward
> wrote:
> > I'm working on a view made to output JSON for Ajax use. My log has:
> >
(note id__exact rather than id__equals)
>
>
>
> On Jul 14, 3:18 pm, Jonathan Hayward
> wrote:
> > How do I look up a model instance by id (its primary key)? I have:
> >
> > entity = directory.models.Entity.objects.filter(id__equals = id)[0]
> >
> > an
,
line 127, in patch_vary_headers
if response.has_header('Vary'):
AttributeError: 'SafeUnicode' object has no attribute 'has_header'
This wasn't the usual format for a Django traceback, and the traceback is
only in Django code, no reference to my project.
Thank you; noted; that fixed it.
On Thu, Jul 15, 2010 at 5:51 AM, Tom Evans wrote:
> On Wed, Jul 14, 2010 at 8:48 PM, Jonathan Hayward
> wrote:
> > I am working on debugging a basic template, and after correcting some
> other
> > error, I got:
> >
> >
ty" and "description" are effectively replaced by dynamically
provided values?
--
→ Jonathan Hayward, christos.jonathan.hayw...@gmail.com
→ An Orthodox Christian author: theology, literature, et cetera.
→ My award-winning collection is available for free reading online:
☩ I
Thank you! Let me play with it.
On Thu, Jul 15, 2010 at 10:41 AM, Daniel Roseman wrote:
> On Jul 15, 4:19 pm, Jonathan Hayward
> wrote:
> > I'm looking at a problem and see how to solve it, probably badly, with
> > eval(), but don't see what the right soluti
>> # ...or you could leave off app_label, if there are no conflicting model
>> names
>> my_ct.get_object_for_this_type(pk=my_pk)
>>
>> That way you could use get_object_or_404() in your view.
>>
>> Ben
>>
>>
>> On Thu, Jul 15, 2010 at 10:21 AM, Jonathan Hayward <
est URL:http://netbook:8000/profile/1Django Version:
1.2.1Exception Type:AttributeErrorException Value:
type object 'TextEmailField' has no attribute 'objects'
Exception Location:/home/jonathan/directory/../directory/views.py in
profile, line 37Python Executable:/usr/local/bin
Would it make sense to make
A: A TextEmailField which does not have the ForeignKey, and
B: A model which has the foreign key and a TextEmailField
as a better and more standard approach?
On Thu, Jul 22, 2010 at 3:13 PM, Jonathan Hayward <
christos.jonathan.hayw...@gmail.com> wrote:
Thank you!
On Fri, Jul 23, 2010 at 1:44 AM, Daniel Roseman wrote:
> On Jul 22, 9:55 pm, Jonathan Hayward
> wrote:
> > Would it make sense to make
> >
> > A: A TextEmailField which does not have the ForeignKey, and
> >
> > B: A model which has the foreign k
I'm trying to get sitemaps configured properly for http://newsley.com,
but I'm having weird issues with the URLs that are being created for
the sitemaps.xml on my production server. e.g. http://newsley.com/sitemap.xml
When I run the code on my development server, using ./manage.py
runserver, the
Hi
I have a requirement that I imagine can't be too unique, however I am
unable to find examples online of how to achieve what I'm trying to
do.
In simple terms, I need a setup where each one of my user's data is
stored in their own database. (We're using mysql).
I have a master database that st
[quasi-psudo-code]
orm = connectToDB('localhost,'user','password')
poll = orm.MyPoll()
poll.question = 'How are you?'
poll.save()
[/quasi-psudo-code]
I realise it's not very django'y, but for my use case that would be
the simplest approach.
Hi
You have a function or method that is calling itself.
Something like this:
def foo():
print "fun"
bar = foo()
print "never going to happen"
J.
On 01 Oct 2010 9:49 PM, "Tsolmon Narantsogt" wrote:
> So how fix it ?
>
> On Sat, Oct 2, 2010 at 1:37 AM, Brandon Taylor wrote:
>
>>
Hi Phil,
On Mon, Oct 11, 2010 at 8:47 AM, Phil wrote:
> When I run 'django-admin.py startproject myproject' I get back an
> error saying 'django-admin.py: command not found'.
>
Run the following from a shell prompt:
ls -l `which django-admin.py`
and let us know
repend 'http' to every urlstring
> before trying to open it using urlopen?
Otherwise yes, I'd use something like:
if not url.startswith('http://'):
url = 'http://' + url
I'm a Django newbie myself, however, so someone else may chime in with
just compress\decompress the files, text compresses
very well. It'll add some processing overhead for sure, but there's no magic
bullet that's not going to cost you some form of resource or another. Just
limit the number of versions that can be kept and remove the old-ones on a
tp import HttpResponse
>
>
> def current_datetime(request):
>
> word = request.GET['word']
>
> return HttpResponse(word)
Needs to be:
> def current_datetime(request):
> word = request.GET['word']
> return HttpResponse(word)
Hth,
Jonatha
1 - 100 of 568 matches
Mail list logo