Hello Brother.
Please am currently learning python/Django. Please I will need your help
wherever necessary please my brother;
On Wed, Jun 7, 2023 at 3:17 PM Shubham DJ wrote:
> Hello, I’m Shubhang Jori from Nerul Navi Mumbai. I have been learning web
> development for a few months now and have
Environment: Request Method: POST Request URL:
https://youtubedownloader244.herokuapp.com/lint Django Version: 3.1.1 Python
Version: 3.6.12 Installed Applications: ['tube', 'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.sessions',
'django.contrib.
ion rather than sinking a
lot more time here.
On Saturday, May 16, 2020 at 5:02:32 PM UTC-4, jlgimeno71 wrote:
>
>
>
> On Sat, May 16, 2020 at 12:06 PM Tim Allen > wrote:
>
>> I posted this to Stack Overflow first, thinking it might be a problem
>> with `mod_wsgi`,
I posted this to Stack Overflow first, thinking it might be a problem with
`mod_wsgi`, but people using Gunicorn have seen the issue too. Here's a
link to the question on Stack Overflow:
https://stackoverflow.com/questions/61295971/django-3-0-5-with-mod-wsgi-attributeerror-httpresponse-object-ha
On Tuesday, April 2, 2019 at 2:12:50 PM UTC-7, Carsten Fuchs wrote:
>
> Dear Django group,
>
> I would like to show users a form that they can use to customize the view,
> for example a ChoiceField from which the year of the report can be chosen.
> It seems straightforward to use a forms.Form
It really depends on the project you're working on. The resistance comes
mostly from developers who utilize the admin as an open interface to the
database with minimal restrictions. I like to use the admin this way for
large projects that are used by many people, building out a custom "staff"
p
Good tip. First upgrading to Django 1.7 then running the migrations then
upgrading to 1.8 also fixed this for me :)
On Sunday, July 26, 2015 at 9:50:19 AM UTC-7, Tobias McNulty wrote:
>
> I just ran into this issue as well when updating an old project to Django
> 1.8. The only suitable workaroun
ages/django/db/backends/mysql/
base.py", line 16, in
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb
module: No module named _mysql
On Jun 8, 10:41 am, Anand Jeyahar wrote:
> On 8 June
So I've been trying to get my Django instance up and running, and have
installed Django via Cygwin and have all the supposed things it needs
like MySQLdb, zlib, etc.
When I run manage.py runserver, it dies on something needed in the
MySQLdb package called _mysql lib, which I'm assuming is some C
l
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 1.3 pre-alpha
Python Version: 2.6.5
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.gis',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admi
Sorry on that..
No i have not imported smsnotification.forms in the smsnotification model.
i have from smsnotifications.forms import SmsNotificationForm in the views
I further tried to import the smsnotifications.forms import
SmsNotificationForm in the django shell it worked okey.
but importing vi
ttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'mysite.polls',
)
Allen M.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
anyone with any idea on this..?
--
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.com.
For mor
Hi All,
i have a problem in import problem. in importing forms.py in views.py
here are my files both located in smsnotifications app
-- smsnotifications/forms.py
from django.forms import ModelForm
from smsnotifications.models import SmsNotification
class SmsNotificationForm(ModelForm):
class M
essible'
)
try:
urllib2.urlopen('%s%s?%s' % (loc, 'test/', urllib.urlencode({
KEY_PARAM: key
})))
except urllib2.HTTPError:
raise forms.ValidationError(
'The API location rejects this key.'
)
return key
tagbody = ' '.join(self.nodelist[0].render(context).splitlines())
token = template.Token(template.TOKEN_BLOCK, tagbody)
return ''
Thomas Allen
On May 24, 1:52 pm, Dennis Kaarsemaker wrote:
> On ma, 2010-05-24 at 07:15 -0700, Thomas Allen wrote:
>
> > Thoma
Is there no way to use a single template library to include many?
Thomas
--
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-u
Hi everyone,
I have a template tag directory:
templatetags/
|-__init__.py
|-all.py
|-contrib.py
|-forms.py
|-menus.py
|-sites.py
`-utils.py
And I tried to use all.py "{% load all %}" as a shortcut for including
all of these:
# all.py
from contrib import *
from forms import *
from menus import *
On Jun 3, 12:05 pm, Thomas Allen wrote:
> I'm able to get pretty far with the template tag approach. The trouble
> is that BoundForms offer no way to directly add attributes, which I
> think can only be included when defining the form field in question.
Actually if I bypass uni
On Jun 3, 12:00 pm, Bill Freeman wrote:
> If you can't use _html_output, then you have to duplicate a lot of
> it's functionality.
I'm able to get pretty far with the template tag approach. The trouble
is that BoundForms offer no way to directly add attributes, which I
think can only be included
How can I create my own form renderer, like as_p, as_table, etc? I see
that the form class provides _html_output to assist in formatting
markup like this, but that substitution technique does not provide
enough control for what I am doing, where certain properties of the
field in question affect th
Thomas Allen wrote:
> Is that possible in a Django template? If my tag spans more than one
> line, it is rendered as plaintext.
Is this not possible?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send
search_string = req.REQUEST.get("search", "")
query = Model1.objects
if search_string == "":
query = query.all()
else:
query = query.filter(
Q(text_field__icontains=search_string) |
Q(fek_field__text_field__icontains=search_string))
the query var
search_string = req.REQUEST.get("search", "")
query = Model1.objects
if search_string == "":
query = query.all()
else:
query = query.filter(
Q(text_field__icontains=search_string) |
Q(fek_field__text_field__icontains=search_string))
the query var
Is that possible in a Django template? If my tag spans more than one
line, it is rendered as plaintext.
Thomas
--
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 fr
I'm trying to get rid of a weak Updates table that a coworker had been
hacking up for use as a "user was changed on such and such day/
time..." and replace it with AuditTrail but there are a number of
confounding issues.
AuditTrail: I don't have the User model overridden, how would I hook
it into
If I have two URLs which resolve to the same view. Is there any way to
get both? I rely on reverse() for some "active page" logic and the
trouble is that it will only return a single URL, the first match it
has encountered.
Thomas
--
You received this message because you are subscribed to the Go
And the following ugly loop adds scripts as I hoped simple
concatenation would:
def render(self, context):
for i in range(0, len(self.scripts)):
context['scripts'].insert(i, self.scripts[i])
return ''
Thomas
On May 18, 2:31 pm, Thomas Allen wrote:
> I would like
I would like to be able to allow any template file to add its own
JavaScript. Seemed like an easy implementation:
class AddScriptNode(Node):
def __init__(self, scripts=[]):
self.scripts = scripts
def render(self, context):
context['scripts'] = self.scripts + context['scripts']
ret
you can try looking-up on pinax apps.. and put it on ur project..
check out (might give you some light )
http://groups.google.com/group/pinax-users/browse_thread/thread/6ea6b0d5f79a69ac/ee84295138dc3e58?lnk=gst&q=wsgi#ee84295138dc3e58
Allen M.,
On 5/16/10, Dexter wrote:
> I don't
Hi everyone,
I have a model which has unpredictable field names. I am using Django-
ROA to retrieve records of this model remotely, so I lose some
flexibility in terms of how I can query the data:
node = Node.objects.get(id=node_id)
[{
"pk": "1",
"model": "pages.Node",
"fields":{
"id":
The field was being set correctly, but my template did not show this
until now for some reason.
Thomas
On May 3, 5:34 pm, Thomas Allen wrote:
> If I'm instantiating a form, how do I set a ChoiceField value in it?
>
> I have a form with an attribute "role" which I am
If I'm instantiating a form, how do I set a ChoiceField value in it?
I have a form with an attribute "role" which I am setting to the
user's current role, like so:
form = EditUserForm({
'last_name': user.last_name,
'first_name': user.first_name,
'email': user.email,
'role': user.get_profi
Thanks, I poked around some more and simplejson.loads() was what I
needed.
Thomas
--
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
How can I parse a simple JSON object in Django?
I would like to parse the response: {"totalspace":
243862.672,"freespace":94053.564}
django.core.serializers.deserialize('json', packet) seems to have
trouble parsing such a simple string.
Thomas
--
You received this message because you are subsc
Hi everyone,
I am looking for a way to replace the username with the email address
as the unique key for user accounts. Is there a setting in
contrib.auth to allow this? The solutions I've seen so far are hacks,
validating email uniqueness via a form rather than as a model field,
etc. In my mind a
On Apr 28, 6:41 pm, creecode wrote:
> You could add a "pages" directory to your templates directory.
> Something like...
>
> ./pages
> ./pages/templates
> ./pages/templates/pages
>
> And then you would do...
>
> return render_to_response( 'pages/index.html'...
Thanks! It looks like that is also h
I'm sorry, I should've specified that I am using Django 1.1 (Django-
ROA is compatible with 1.2 only according to its documentation).
Thomas
--
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...@googl
g the
"index.html" filename?
Thanks,
Thomas
On Apr 28, 5:19 pm, Thomas Allen wrote:
> Hi everyone,
>
> In my "pages" app, I have the following view function which renders
> index.html:
>
> @login_required
> def index(req):
> return render_to_response
Hi everyone,
In my "pages" app, I have the following view function which renders
index.html:
@login_required
def index(req):
return render_to_response(
'index.html',
context_instance=RequestContext(req)
)
What really has me stuck here is that it doesn't render pages/
template
I think that template context processors are the answer to my first
question. As for my second question, I could certainly check for
permission membership in the provided PermWrapper, but I'm very
interested in a way to check this based on the view permission
requirement (implicitly).
Thomas
--
Hi everyone,
I have two questions about rendering specific design elements, and the
second ties in somewhat with the first.
How do you make a variable available in multiple views (multiple
templates)? For instance, maybe I want the active user object to be
available on each page so that I can ren
, Thomas Allen wrote:
> > Hi everyone,
>
> > I am building an application where many of the models reside on
> > another server, being served by a PHP application (we needed to do
> > that because many clients can only host PHP).
>
> > What facilities does Djan
Hi everyone,
I am building an application where many of the models reside on
another server, being served by a PHP application (we needed to do
that because many clients can only host PHP).
What facilities does Django provide for this sort of interaction, and
how might you consider implementing i
The MeasuredValue gets saved after the sample is saved, Is there another way
to still use the sample instance (or force it to save ), Cause the function (
to send msg ) to should be sent only when the sample is created..
Any help will be appriciated.
thnx greatlemer
--
You received this mes
Hellow..
I have a problem on django signal and instances.
i have a right some code that runs a function after a certain model is
created but could not use the instace filter
Help
def send_sms_notifications(sender, instance, created, **kwargs): #get
sender, instance, created
# TODO: Lookup the
oes anyone have any idea how I could solve this problem?
Allen
On Nov 27, 6:06 pm, bruno desthuilliers
wrote:
> On 27 nov, 09:35, Allen wrote:
>
> > Dear Andy McKay
> > Thanks for the input and you're right, I shouldn't do it this way.
>
> > I use to use Z
anyone have any idea how I could solve this problem?
Allen
On Nov 27, 6:06 pm, bruno desthuilliers
wrote:
> On 27 nov, 09:35, Allen wrote:
>
> > Dear Andy McKay
> > Thanks for the input and you're right, I shouldn't do it this way.
>
> > I use to use Z
ext.
So.. does anyone have any idea how I could solve this problem?
Allen
> > I use to use ZOPE for a couple of years and it has to abilities to
> > integrate multiple static webpages just by write a tag with the static
> > webpage filename similar to the filter tag.
>
> Z
soon of later.
But I still want to know if I can re-render a string with tag in it so
it will show up the right way.
Andy, can you redirect me to that doc page?
Allen
On Nov 27, 1:23 pm, Andy McKay wrote:
> > Can anyone tell me how I can load the content and execute/render the
&
ter I load string value by {{ stringValue|safe }} filter, everything
is added to the page just as text; Javascript, css styling, template
tags/filters all show up on the page.
Can anyone tell me how I can load the content and execute/render the
javascript, css styling, template tags/filters?
Alle
Hi, all:
I've build a application with django, and my friends build a part of
the application with php.
now both of us are finished, the final step is to integrate the php
part to django, is there a way
to do this?
I've google for this, but no solution found.
Thanks!
Best Regar
Ended up populating the test database with fixtures via .json dumps.
Thank you very much for your help.
--- Chris
On Oct 26, 6:19 pm, Karen Tracey wrote:
> On Mon, Oct 26, 2009 at 4:12 PM, Chris Allen wrote:
>
> > Anyone have any experience with forms (ModelMultipleChoic
Anyone have any experience with forms (ModelMultipleChoice fields and
foreignkey'd choice fields) not validating properly in a unit test but
just fine in the runserver?
Passing the same request.POST data to the unit test as I am in the
runserver and live instance, which I verified via the debugge
Is there a way to implement this in the django admin app?
I don't want to create a custom form or view, I want to use
the default form and view that djang admin provide.
Thanks!
On Oct 8, 2:12 am, Scott wrote:
> I'm looking for the same kind of thing, I think you will have to
> create a custom
efine the model, but with this, both of admin
and normal user can not edit these attributes.
Is there a way to implement this? if there is, how to do this step
by step?
Anybody who can help me? with detail instructions?
Thanks!
Best Regards!
Have a look at this site:
http://blog.haydon.id.au/2008/08/notes-on-practical-django-projects.html
On Jun 11, 1:06 am, jayvandal wrote:
> Hi,
> I bought the book and started the first project. displayed the Flat
> Page. I then downloaded the Tiny0MCE and can't get it to work. are
> there any pla
There are a few fairly recent threads touching this issue - including
one of mine - but I'd like to ask a new question.
The FlatPage model requires an explicity defined - ie hard-coded - URL
and get_absolute_url() is set equal to this hard-coded URL (eg "/
about/").
For my purposes I needed to a
Have you looked at these notes on how to get the Practical Django
Projects examples to work:
http://blog.haydon.id.au/2008/08/notes-on-practical-django-projects.html
?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Small postscript to the above:
On 21 August, Jannis Leidel (http://jannisleidel.com/) posted that he
was using something like Erik's code:
from django.core.urlresolvers import reverse
ABSOLUTE_URL_OVERRIDES = {
'coltrane.entry': lambda o: reverse('coltrane_entry_detail',
kwargs={
Malcolm,
Thanks, your explanation is clear for me and I certainly don't need to
live dangerously - the conventional usage of ABSOLUTE_URL_OVERRIDES
works fine for me. I was only trying to satisfy my curiosity about
using reverse() because I've read a number of posts from James Bennett
and others s
Erik, Malcolm,
Thanks for two very interesting answers - but which one is correct?
Malcolm, you are saying, in effect, that the code in Erik's post can
never work in the settings file?
John
--~--~-~--~~~---~--~~
You received this message because you are subscribed
On Oct 2, 10:27 am, bruno desthuilliers
<[EMAIL PROTECTED]> wrote:
> > You are right, it wasn't necessary to add the domain name explicitly.
> > I had only done this because of some earlier issues with flatpage URLs
> > (where it was necessary to add the domain name).
>
> ??? I never used flatpage
Bruno,
Thanks, this helps a lot.
> > > While we're at it : what's your use case for adding the domain name to
> > > the url ?
>
> > I'm doing this in a custom tag to produce a sidebar menu of recent
> > posts.
>
> Recent posts belonging to the same site ? I assume so, since you use
> sites.objects
On Oct 1, 10:25 pm, bruno desthuilliers
<[EMAIL PROTECTED]> wrote:
> I think this has to do with '/cms/' being defined in both your domain
> name and your apache conf's location directive. Since you tell Django
> the django.root is /cms/, it must add it to build an effectively
> *absolute* url - t
My experimental Django site is has URLs like
http://allenlux.dyndns.org/cms/weblog/2008/aug/23/website-now-using-radiant/
where everything lives under the folder /cms/ ie the Apache
configuration looks like
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetE
The FAQ recipe (when run from a manage.py shell) didn't produce
anything in my application.
I found this which might help:
http://blog.michaeltrier.com/2007/8/11/display-the-sql-django-orm-is-generating
On Sep 25, 5:45 am, Chris <[EMAIL PROTECTED]> wrote:
> I'm trying to debug a usage of callpro
e_tag(flatpage_menu)
This assumes that SITE_ID is correctly set in the settings.py file for
the project.
John Allen
Bofferdange, Luxembourg
On Sep 15, 11:49 pm, allenlux <[EMAIL PROTECTED]> wrote:
> I'm a newcomer to django but so far most things seem to work nicely.
>
> One d
Hiya,
I'm a noob running official release .96, please be gentle.
I'm trying to enable email functionality.
Per this doc
http://www.djangoproject.com/documentation/0.96/settings/#DEFAULT_CHARSET
I should see a set of email settings in my settings.py file.
I don't see any of the following:
EMAIL_HO
The website www.200836.com was aimed at that all the people in the
world can buy Olympic souvenirs anywhere anytime
The website www.200836.com was exclusively authorized by BOCOG to sell
licensed products of the Beijing Olympics
if you want to know any information about 2008 beijing Olympic
games
at 12:41 PM, Shawn Allen wrote:
> Hey everyone,
>
> I'm about to tackle an API that supports multiple response formats
> using serializers. I realize that the API (as simple as it is) is
> subject to change, but it seems like a totally sensible pattern for
> what I'd
Hey everyone,
I'm about to tackle an API that supports multiple response formats
using serializers. I realize that the API (as simple as it is) is
subject to change, but it seems like a totally sensible pattern for
what I'd like to do. One problem I've come across already is that the
base
One solution is to add an extra import at the bottom of your
settings.py:
try:
from localsettings import *
except ImportError:
pass
Then put localsettings.py in your svn:ignore, and override whatever
settings you need to on a per-installation basis.
On Jul 24, 2007, at 8:41 AM, go
used from this snippet:
http://www.djangosnippets.org/snippets/74/
--Thom
On 3/29/07, RajeshD <[EMAIL PROTECTED]> wrote:
>
>
> Hi Thom,
>
> On Mar 28, 10:13 pm, "Thom Allen" <[EMAIL PROTECTED]> wrote:
> > I'll try it with just the one backend, b
On Mar 28, 10:13 pm, "Thom Allen" <[EMAIL PROTECTED]> wrote:
> > I'll try it with just the one backend, but maybe I haven't explained my
> > problem correctly.
>
> This won't fix the problem. Multiple authentication backends are
> supported by Dj
I'll try it with just the one backend, but maybe I haven't explained my
problem correctly.
In the Admin application there is a link to Users. When clicking on Users, I
am presented with a list of records from the auth_users table. I click on
Add New User, attempt to put [EMAIL PROTECTED] as the US
76 matches
Mail list logo