If I understand it correctly, for this view your url must correspond to
http://www.mysite.com/xyz?year=2015
Here as per standard url protocol, anything you pass after the "?"
(question mark) is passed as a request.query_params to the views.
Hope this helps.
Sid
On Sun, Sep 4, 2016 at 10:03 PM,
Hi,
Please follow the documentation on
https://docs.djangoproject.com/en/1.9/ref/contrib/admin/#overriding-vs-replacing-an-admin-template
The file you are looking for is base_site.html which you need to override
to change the default 'Django Administrator' heading to your company logo.
Hope this
For Django version 1.7 and above use migrations to load initial data as
South is inbuilt included in these versions. Prior to version Django 1.7
(1.6 and below) use fixtures to load initial data.
https://docs.djangoproject.com/en/1.8/howto/initial-data/
Hope this helps.
-Sid
On Tue, Jul 26, 201
I think "*sudo* pip install django" is the problem here as when you so sudo
it installs it in the host machine not in virtualenv so the thumb rule says
- dont use sudo when you are working in vitrual env.
I guess pip install Django==1.X.X would solve the problem.
Suggestion - use pip freeze to l
To access Django's admin site, your admin url should look like url(
r'^admin/', include(admin.site.urls)) which says whenever u hit rather
http://127.0.0.1:8000/admin would include admin urls from "admin.site.urls"
rather than "polls.views" unless you have all the admin login there in
"polls.views"
Hi,
get the length of object by using len(movieObject)
if len(movieObject)==1:
#you can get along with get query
if len(movieObject)>1:
#use filter query and access each element by using for loop
for i in movieObject:
-Siddharth
On Mon, May 6, 2013 at 1:54 AM, Shawn Milochi
Hi,
Though its not the perfect solution for your query, please refer the link
for ModelAdmin to include conditional formatting in admin interface.
https://docs.djangoproject.com/en/dev/ref/contrib/admin/
-Siddharth
On Mon, Apr 22, 2013 at 10:35 PM, Vittorio wrote:
> My (newbye) problem is as
Hi
If you are interested in using multiple order by in django's ORM then use
TABLE.objects.order_by('column_A','column_B')
On Tue, Apr 23, 2013 at 11:18 AM, teddy wang wrote:
> CREATE TEMPORARY TABLE TEMP (SELECT * FROM TABLE ORDER BY COLUMN_A);
> SELECT * FROM TEMP ORDER BY COLUMN_B;
> I want
Hi ,
Did you try python psycopg2.
A simple deomostration.
Ex:-
import psycopg2
conn=psycopg2.connect("dbname='xxx' user='xxx' host='localhost'
password='xxx'")
cur = conn.cursor()
query="""SELECT * FROM bookmarkmanager_bookmark b '
'LEFT JOIN bookmarkmanager_bookmark_tags bt
Hi,
I could not replicate your error here. I am also adding users via admin
interface and the "Staff status" and "Superuser status" are unchecked by
default.
I am running django 1.4 on ubuntu 12.04 with postgresql.
Can you just try switching to postgresql and see.
-Siddharth
On Wed, May 1, 2013
Hi Thomas,
Can you paste the code snippet where you add the user in your auth table
(not the admin).
It might help in understanding the problem.
-Siddharth
On Tue, Apr 30, 2013 at 11:45 PM, Thomas De Reyck <
thomas%dereyck...@gtempaccount.com> wrote:
> Hi everyone,
>
> My very first question h
Hi Hadi,
I am using sessions.middleware.SessionIdleTimeout in my app which takes
care of the session management
https://pypi.python.org/pypi/django-session-idle-timeout/1.0.1
Its clean and easy way to handle session timeouts.
-Siddharth
On Wed, Apr 24, 2013 at 11:57 AM, Hadi Sunyoto wrote:
hi Sachin,
Please use django's form clean method in order to validate your phone_num
field.
You can also override the django's clean method by using your own
clean_phone_field method.
Please refer the link:-
https://docs.djangoproject.com/en/dev/ref/forms/validation/
I am sure that a small googl
Hi
As per my view your client query is returning more than one rows from your
database.
Suppose your job = 1 which you are getting from your Report table and the
query ( Job.objects.all().filter(
client=job)..)fetches two or more than two records from your 'job'
table.
Now there can be two sc
Sorry for the half response...please ignore the previous message.
class order(models.Model):
order_id = models.IntegerField(unique=True)
customer_id = models.ForeignKey('Customer')
item_id = models.ForeignKey('Item')
qty = models.IntegerField()
This will you give the provision to
Hi
As per my view you can modify your models as follows:-
class order(models.Model):
order_id = models.IntegerField(unique=True)
customer_id = models.ForeignKey('Customer')
item_id = models.ForeignKey('Item')
On Mon, Apr 1, 2013 at 10:30 AM, Lachlan Musicman wrote:
> On 1 April
Hi
Are you storing the user data in some database table?
If yes, then you can search for the logged in user with the user data
present in database table.
If you dont find a match then you can send to some error page or re-login page.
-Siddharth
On Mon, Jan 28, 2013 at 8:32 AM, Okorie Emmanuel wr
Hey Chris
Thanks for the replybut i figured it out what was wrong.
:)
-Siddharth
On Thu, Dec 13, 2012 at 6:09 PM, Chris Cogdon wrote:
> How are you populating the choices in the ChoiceField? Remember, you need to
> do this on BOTH the POST AND the non-POST versions of creating the form.
>
> B
Hi,
I am facing problem in handling modelform and ajax together.
The situation is:-
I am using modelform to get display the form as ul in the template.
I have 3 ChoiceFields (country, state,city). On select of a country
from the dropdown, the valid states dropdown gets populated and on
select of a
Hi Friend,
It would be really helpful if you paste the entire error msg.
No one can figure out what went wrong by looking at your previous mail.
On Tue, Nov 13, 2012 at 2:56 AM, Dennis Lee Bieber
wrote:
> On Mon, 12 Nov 2012 01:47:17 -0800 (PST), hardik juneja
> declaimed the following in
> gm
You can just copy your app from your local machine to server.
Just keep in mind to do the necessary changes in the settings.py file.
Enjoy :)
On Thu, Nov 15, 2012 at 8:24 PM, Lewis wrote:
> Hello,
>
> In order to transfer the app from local machine to another server. what
> should I do? Can I jus
21 matches
Mail list logo