ckends/mysql/base.py",
line 27, in
[Thu Sep 17 05:27:38 2015] [error] [client 123.239.71.95] raise
ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
[Thu Sep 17 05:27:38 2015] [error] [client 123.239.71.95]
ImproperlyConfigured: Error loading MySQLdb module: No module n
working with apache.
Your help will be highly appreciated.
--
Sandeep Kaur
Blog: sandymadaan.wordpress.com
SCM: https://github.com/sandeepmadaan
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop
Anybody please help.
On Sun, Mar 22, 2015 at 3:07 PM, Sandeep kaur <mkaurkha...@gmail.com> wrote:
> Greetings,
> I want to have the thumnails of images with the names in the dropdown
> field of form. To return the image as foreign key field, I have used this
> code :
>
ead()
return '%s' % (self.name) + HttpResponse(image_data,
content_type="image/jpg")
But it give following error :
Exception Value:
coercing to Unicode: need string or buffer, HttpResponse found
Is it possible to do this ?
Thanks.
--
Sandeep Kaur
Blog: sandymadaan.wordpre
.4/dist-packages/django/db/backends/mysql/base.py",
line 14, in
> import MySQLdb as Database
> ImportError: No module named 'MySQLdb'
About this, try installing MySQLdb using this command:
apt-get install python-mysqldb
--
Sandeep Kaur
Blog: sandymadaan.wordpress.com
SCM: http
__import__(module)
> 11:13:37 web.1 | ImportError: No module named hellodjango.wsgi
Your application is not able to find the module hellodjango.wsgi. Did you
make the wsgi.py file?
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this mes
fectly with apache and
mod wsgi. Can you help me in getting this issue resolved.
Well my issue is resolved. All I do after making the changes is :
$ service supervisord reload
$ service nginx reload
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You rec
class QuotedOrder(models.Model):
> quote_buyer_id = models.ForeignKey(User)
OMG.
What do want to say?
Can you please use some other medium to show your code? Github may be one.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscri
her_list.html contains the line
>
> {% extends "base.html" %}
Inside the template folder.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
no job running, but server is nicely configured and is running. I am
new to nginx and gunicorn deployment. Though deployment has been done but
am not able to understand why the changes are not visible and which program
is running which is behind the deployment.
Your help will be highly appreciated
for this?
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-user
h the new app I added to the project which is not working. Do I
need to start the app with gunicorn or something like this?
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google Groups
"Django users&q
gunicorn and supervisor.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
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
Hello,
I installed a django app "zebra" in my django site. This application is
working with runserver but not on host server. I want it running on host
server ASAP. What could be the probable reason for this behavior of app?
Your help will be appreciated.
--
Sandeep Kaur
E-Mail
by example.com/django or if any other app on
same server then with example.com/django2. How can we do this with nginx?
Your help will be appreciated. :)
Thank you.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed
.
class Car(models.Model):
manufacturer = OneToOneField('Manufacturer')
# ...
Hope this helped.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsub
by POST:
form = MyModelForm(request.POST, instance=my_record)
Documentation is here:
http://docs.djangoproject.com/en/1.3/topics/forms/modelforms/
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google
On Mon, Aug 12, 2013 at 5:47 AM, Dan Gentry <d...@gentryville.net> wrote:
> What is the purpose of checking test.id for a value of 3 or 6?
>
For test.id == 3 or 6, some other code will be executed, else this
code. I am currently doing for else part.
--
Sandeep Kaur
E-Mail: mkaurkha.
FAtestform_formset': FAtestform_formset,
'student':student,
'test':test }
return render_to_response('report/add_marks.html', temp,
context_instance = RequestContext(request))
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
On Fri, Aug 9, 2013 at 2:50 PM, Sandeep kaur <mkaurkha...@gmail.com> wrote:
> I have my code for formset here :
>
> {% csrf_token %}
>
Your help would be really appreciated.
Waiting.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You rec
://devplace.in/~sandy/screen.png
But the problem with this is that all the fields does not get saved in
the database. Only the last row of the screenshot get submitted. How
can I do it right so that all the multiple rows get submitted at once?
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog
xample/example-DIH/solr/solr/conf) And it was not given
> whether to append the file or replace the content.
So, did it place the results in schema.xml file? Is there any such
file and it has appropriate permissions to write the content.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandyma
of this table?
Like from this row, I should get 7,8,9.
Eagerly waiting fro your reply.
Thank you.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubs
little easy for other apps, we can make a script for this.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receivi
.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@google
On Thu, May 23, 2013 at 8:29 PM, Luggaz <lunga...@gmail.com> wrote:
> I don't know what I dd but it seems to work now!
>
mod wsgi installation could have also solved he purpose, using this command :
$sudo apt-get install apache2 libapache2-mod-wsgi
--
Sandeep Kaur
E-Mail: mkaurkha.
On Thu, Feb 28, 2013 at 2:32 AM, vijay shanker <deont...@gmail.com> wrote:
> hey, i want to write a shopping cart app, please provide some inputs, useful
> information, suggestions etc for doing it right .
Have a look at this too.
https://github.com/bmentges/django-cart
--
Sandeep
}) #
> The "render(request" portion will automatically send the base_template
> variable into your template.
>
Thanks a lot. You explained everything so gracefully.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are
On Wed, Mar 6, 2013 at 2:39 AM, Shawn Milochik <sh...@milochik.com> wrote:
> Instead of extends, you could use the "include" directive.
>
"include" worked but destroyed all the structure of the template. :-/
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sa
.is_active %}
{% extends "base_client.html" %}
{% else %}
{% extends "base_noclient.html" %}
However this code doesn't work.
What should be done. Your help will be highly appreciated.
Thank you.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
On Mon, Feb 11, 2013 at 7:42 PM, frocco <faro...@gmail.com> wrote:
> Hello,
>
> I have some logic I want to put in a model, but it requires know the current
> user logged in.
> Is there a way to get this?
>
This gets the current logged in user :
current_user = request.
enção!
>
The foreign key is by default acessible in the forms in the form of
drop down. You just need to define the form of your model and the in
template file write this :
{% csrf_token %}
{{ form.as_table }}
--
Sandeep Kaur
E-Mail:
import oldapp.models
> import newapp.models
>
> for oldrec in oldapp.models.MyModel.objects.all():
> newapp.models.MyNewModel.create (newfield=oldrec.oldfield,..)
>
Sorry, this mail was sent by mistake.
And thank you Javier, I think this is the only solution now.
--
Sandee
-- Forwarded message --
From: Javier Guerra Giraldez <jav...@guerrag.com>
Date: Wed, Jan 23, 2013 at 3:34 AM
Subject: Re: Database Transaction
To: django-users@googlegroups.com
On Tue, Jan 22, 2013 at 11:54 AM, Sandeep kaur <mkaurkha...@gmail.com> wrote:
> Yes,
s etc. then I could not understand how to use
south. Can you provide me some tutorial for the same.
Thank you.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google Groups
"Django users&q
erial'])
>
I think this will help you :
p = table(material =material, ...[other fields of table to be saved])
p.save()
Here table is your table where you want object value to be saved.
Hope this helps you.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received
the two applications?
Your help will be appreciated.
Thank you.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
',
'djangopractice.blog',
)
Hope this helps.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
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@google
.com/en/dev/ref/settings/#std:setting-TEMPLATE_LOADERS>setting.
It’s in there by default, so you’ll only need to change this if
you’ve changed that setting.
3. Make sure you’ve installed the sites
framework<https://docs.djangoproject.com/en/dev/ref/contrib/sites/#module-django.contrib.sites&g
packages/Django-1.4.2-py2.7.egg/django/utils/importlib.py
> in import_module, line 35
> Python Executable:
> /home/frank/Projects/python/django/techjobsea.com/baseline27/bin/python
> Python Version: 2.7.3
>
Are you sure, you followed all the installation steps, especially step 3 in :
https://docs
.result'))
>
> But get the following error:
> IntegrityError at /report/header/
> (1048, "Column 'job_id' cannot be null")
>
> Please anybody tell me where i am wrong?
>
Hope this helps you.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.co
d what I want. I don't say my code is
correct, Because if it would be, I would have got my results. Please
help me change it to correct one.
What I want to do :
Get instance of one table, which after editing get saved to some other table.
What I get :
I get values of one table and after editing it
On Thu, Nov 22, 2012 at 5:32 PM, Sergiy Khohlov <skhoh...@gmail.com> wrote:
> you can set values in form via form __init__
>
Values of some other instance? How?
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message
On Thu, Nov 22, 2012 at 4:54 PM, Sergiy Khohlov <skhoh...@gmail.com> wrote:
> Have you tried to change instances to your new tables ?
>
If I try instance of new table, I won't get the old values that I need to edit.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.w
get saved in tables: EditJob and ClentEditJob.
Is this possible? Your help will be appreciated.
Thank you.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
T
On Mon, Nov 19, 2012 at 4:24 PM, muhammed riyas
<muhammedriyas.2...@gmail.com> wrote:
> no even there is no employees i didnt got it
>
Show your views too.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you ar
remove
> all employees
> {% else %}
> Sorry there is no employees yet :(
> {% endif %}
>
>
>
I don't find any errors here. I think you are always getting
employees, that's why only if part works and else part doesn't work.
:p
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog:
vironment?
See if this helps :
https://github.com/vsajip/MySQL-for-Python-3
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, s
debug this? What could be the problem?
>
When we exclude a field from a form, that field become invisible. But
as we know, that it is mandatory to fill the foreign key value (else
the form will become invalid), so you should by some way give some
value to foreign key field.
--
Sandeep Kau
exceptions.ImproperlyConfigured: Error loading MySQLdb module:
> No module named MySQLdb
>
Try this :
sudo apt-get install python-mysqldb
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google Group
row but not saved the entries of the
> rows that can be added by the add button.
> Can anybody tell me how would i solve this problem. Any help would be
> highly appreciated.
>
This may be helpful :
http://stellarchariot.com/blog/2011/02/dynamically-add-form-to-formset-using-javascript
ango.
Try this :
python manage.py shell
>>> from django import forms #input
>>> forms.Form #input
#output
If you don't get this output, you are using old version of Django. Use
new version.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordp
te.register(Poll, PollAdmin)
-----
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
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 un
er instances of cd, making it kinda
> useless?
>
> should here be a cd = ObjectName() in there?
>
According to me, he need not to assign cd, because it is then not used
anywhere to clean the form data.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You rec
}}
{{ clients.receipt_no }}
{{clients.name_and_address}}
{{amounts.field}}
...
...
This code slows down the system to a great extent. Please suggest me
an alternate and better solution.
--
Sandeep Kaur
E-Mail: mkaurkha
ty
}}{{tests.cost }}
{% endfor %}
{% endif %}
{% else %}
No material found
{% endif %}
Please do point me out where I am going wrong.
Thank you.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are sub
On Fri, Aug 17, 2012 at 1:28 PM, Sandeep kaur <mkaurkha...@gmail.com> wrote:
> I am using session foreign key in my table.
> if not request.session.exists(request.session.session_key):
> request.session.create()
>
mething like this:
>
> profile.sess = Session.objects.get(session_key=request.session.session_key)
>
Thanks a lot. This worked. :)
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google Groups
"
generate
one bill and receipt. But for each different material, different jobs
are created. So, I thought it could be achieved by storing the session
in which the user logged and then get the bill generated based on that
session.
If you find it a vague solution, do tell the most optimum solution.
as :
```Cannot assign "'b593c61453d7aad199078c66b9ad6b30'":
"ClientJob.sess" must be a "Session" instance.
I am a bit unclear about using sessions in django, so be a little elaborative.
Thank you.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.w
r page.
Just a wild idea.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
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
//}
});
$("select#test").change(function(vent) {
if ($(this).val() == -1) {
return;
}
myAwesomeFunctionToCallWhenAtestIsSelected();
doesn't support java, how would our could
run?
Help would be really appreciated.
Thank you.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this g
On Wed, Jul 18, 2012 at 3:13 PM, kenneth gonsalves
<law...@thenilgiris.com> wrote:
> On Wed, 2012-07-18 at 14:10 +0530, Sandeep kaur wrote:
> request.user
Thank you sir , this was helpful. :)
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
give different views to
the users based on there permissions ?
Thanks in advance.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, s
render_to_response('index3.html',
context_instance=RequestContext(request))
But it gives TypeError as :
"cannot convert dictionary update sequence element #0 to a sequence"
Is there anything wrong in above code?
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
Yo
crement.
Like I want job_no as a counter field in a table, then in models.py, add this :
job_no = models.AutoField(primary_key=True)
But if you want the counter in tables in the template file then add
{{forloop.counter}} as your table field.
Correct me if I am wrong anywhere.
--
Sandeep Kaur
E
n above, but as it is not
> making any change (field already equals field), I assume this isn't an
> issue.
>
You are great, sir.
Thank you.
The query successfully updated the field column as was required.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
he entries in table where 2 columns are equal, there field
should be assigned a string "OTHER" and other_field should remain as
such.
How can I give such query in shell.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message becaus
form = AmountForm()
return render_to_response('automation/job_add.html', {'form': form,
'maxid': maxid}, context_instance=RequestContext(request))
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed
--
But unfortunately these fields are not filled in Amount. However when
job_no is not taken as foreign key, everything works fine.
Please help me figure out the error.
--
Sandeep Kaur
--
You received this message because you are subscribed to the Google Groups
"Django users" grou
text_instance=RequestContext(request))
--
But unfortunately these fields are not filled in Amount. However when
job_no is not taken as foreign key, everything works fine.
Please help me figure out the error.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
Y
On Fri, Mar 9, 2012 at 4:31 AM, Ramiro Morales <cra...@gmail.com> wrote:
> On Thu, Mar 8, 2012 at 4:44 PM, Sandeep kaur <mkaurkha...@gmail.com> wrote:
>> job_no_id = client.job_no
>> ...
>> Am I wrong somewhere? H
should I do this? Please help!!
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
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 unsubscrib
Is there any way of having a field in table, declared both as foreign
key as well as primary key?
I want something like this in models:
publisher = models.ForeignKey(Publisher,primary_key=True)
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received
sum in the view (NOT the template) and add
> it to the client. Python allows you to add any value you >want to any object.
>
Thank you for your suggestions. :-)
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
When all this is applied, it creates a view out of 2 tables i.e Amount
and ClientJob without using foreign key. Now I want to have sum of the
total and net_total fields for the views generated.
--
Sandeep Kaur
E-Ma
Can I apply some operations on the views ( of database) that are
created by me? Eg: to do sum of some filtered entries. If yes, then
how?
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google Groups
Hello all,
In my django application, all the data of different clients are
entered. Sometimes data of even same client is also entered. Now what
I require is to get all the data of the client when it asked for.
The views I used is:
On Thu, Jul 28, 2011 at 4:39 PM, Sheogora wrote:
>
> I have extended the User Profile by adding my own field,
> how do I change the New user form in the admin, to show the new field?
>
This can be done by simply adding your new field in list display under
User Profile
I want to make some of my data in django-templates, variable. And
separate single file to define the variables. How can I do this?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
@Rodrigo Gomes
Thank you , my problem is solved.
@Jagdeep Singh Malhi
Yes , in templates.
--
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
Hello all,
I want to include background images and gallery images to my django project
and I am unable to do so.Images do not get displayed. please help me out
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
83 matches
Mail list logo