Re: Can not include jquery in django template

2014-09-23 Thread Collin Anderson
You need 

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/85161e0b-1ba7-482b-a86f-7f6fee91489a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Can not include jquery in django template

2014-09-23 Thread Fred Stluka

Change it to:

 



--Fred

Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.

On 9/23/14 2:15 PM, Артём Мутерко wrote:

When I try to include jQuery to my template index.html,



I get an blank page. Html source code is loading but I get just white page
--
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...@googlegroups.com 
.
To post to this group, send email to django-users@googlegroups.com 
.

Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/793a14fb-c435-4737-92b8-dcd277fb9abb%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5421C08A.3020809%40bristle.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django url pass through

It depends on what is defined in your waitlist.urls.

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6c007c6f-3d4c-43cd-bd74-bae8cdf114b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Confused by STATICFILES_DIRS not working

So it works fine in production, when DEBUG = False, but not on your local 
runserver when DEBUG = True?

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/bbf788c0-9024-4ff8-b506-659ef1566a58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django connecting to MySQL via Mysql-connector fails

You need to use "mysql.connector.django" as your backend ENGINE

http://dev.mysql.com/doc/connector-python/en/connector-python-django-backend.html

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8f25711d-fe1d-460b-ad42-7c7c6025089d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Can not include jquery in django template

When I try to include jQuery to my template index.html,



I get an blank page. Html source code is loading but I get just white page

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/793a14fb-c435-4737-92b8-dcd277fb9abb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Open Django template in dialog box (not in window)


Collin,

Excellent sample.  Thanks!  That's a nice standalone summary
of how to do a popup dialog via jQuery and Ajax.  Worth posting
to a tips page or blog if you have such, so other people can
Google it.

Kamal, does this fill in the gaps for you?  If not, let us know.

--Fred

Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.

On 9/23/14 8:44 AM, Collin Anderson wrote:

# popupadvance.html
|
Here's the worker object: {{ worker }}
|

# views.py
|
defpopupadvance(request):
worker =Worker.objects.get(id=request.GET.get('worker_id')
returnrender(request,'popupadvance.html',{'worker':worker})
|

# urls.py
|
from.importviews
urlpatterns =[
url('popupadvance/$',views.popupadvance)
]
|


|

Unable to delete cookie

Hi,

I'm using a custom authentication backend for my Django project, and in 
order to log out I have to delete a cookie that's set by the (external) 
authentication site.
Here is my view code:

response = django_logout(request,
 next_page=post_logout_url)
response.delete_cookie('cookie_name',
domain="cookie_domain")
return response

The Set-Cookie header of the view is fine:
cookie_name=; Domain=cookie_domain; expires=Thu, 01-Jan-1970 00:00:00 GMT; 
Max-Age=0; Path=/

But the cookie isn't changed at all - it has the same value and expiry date 
("end of session") as before logging out.

Does anyone have any ideas about why this is happening?

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1c643254-9800-4978-a236-a67d40cb973d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: updating site domain with data migration

Markus, one specific question re your blog post.

"What happens when you call python manage.py makemigrations? First of all, 
since no apps are given, Django reads the migrations from all apps listed in 
INSTALLED_APPS. In our case, this is ('author', 'book',). "

I have the following in INSTALLED_APPS:

In [2]: apps.get_app_configs()
Out[2]: ValuesView(OrderedDict([('admin', ), ('auth', 
), ('contenttypes', ), 
('sessions', ), ('messages', ), ('staticfiles', ), ('sites', 
), ('allauth', ), ('account', 
), ('socialaccount', ), ('main', )]))

But it seems it doesn't see my "main" app. Your note seems to indicate that it 
will 'make migrations' for INSTALLED_APPS.

$ python manage.py migrate --list
admin
 [ ] 0001_initial
auth
 [ ] 0001_initial
contenttypes
 [ ] 0001_initial
sessions
 [ ] 0001_initial
sites
 [ ] 0001_initial
socialaccount
 (no migrations)

I have to explicitly run with 'main' app. Just wondering if I am missing 
something in my config.

$ python manage.py makemigrations main
Migrations for 'main':
  0001_initial.py:
- Create model Currencies
- Create model Locations
- Create model Posts
- Create model UserProfile


On Sep 22, 2014, at 9:16 AM, Markus Holtermann  wrote:

> On Mon, Sep 22, 2014 at 08:41:36AM -0700, Anil Jangity wrote:
>> If I don't use syncdb, I should also create the super user account
>> using data migration? If so, it seems like I need to go do
>> User.objects.create_superuser().
> 
> There still is the option of running "python manage.py createsuperuser"
> after the migrations are applied. If I don't need a superuser account
> during the migration, this would be my way of doing it.
> 
> /Markus

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/C9A4828C-8B10-4300-9BA0-7AB768BDF39D%40me.com.
For more options, visit https://groups.google.com/d/optout.


Re: request.META['REMOTE_USER'] with django runserver


Hi,

you can add 'django.contrib.auth.backends.ModelBackend' to the 
AUTHENTICATION_BACKENDS and use a local user.


or
if you like to use the "REMOTE_USER" set up nginx  with auth_basic and 
proxy  on your local instance:


location / {
auth_basic "Restricted";
auth_basic_user_file /...PATH.../.htpasswd;
proxy_set_header REMOTE_USER $remote_user;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:8000;
}

in this case you get the  user in "HTTP_REMOTE_USER"

if you like you can make the same configuration with uwsgi and nginx :

uwsgi_pass  unix:///tmp/demo.sock;
include uwsgi_params;
uwsgi_param REMOTE_USER $remote_user;

and in this case you get the correct header parameter "REMOTE_USER"


Cheers
Jürgen

Am 22.09.2014 um 18:36 schrieb Robbie Edwards:

Hi,

On my production server, I'm using REMOTE_USER 
 to 
provide SSO for an internal service.  It works great on the production 
server.  However, when running 'runserver' on the development side, 
this variable is not set so authentication in this manner doesn't 
work.  Is there a way to config this on the development side so I can 
develop as if it were in place?


thanks

--
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...@googlegroups.com 
.
To post to this group, send email to django-users@googlegroups.com 
.

Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0568f70f-9186-49f5-b845-ec9039e11681%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/54218930.1090306%40kofler.bz.it.
For more options, visit https://groups.google.com/d/optout.


Re: Django url pass through

Thank you your response answers the "what do I do" as a response by calling 
the 404 view.

I also need to understand how the url will be coded so that an  invalid url 
that does not match anything falls through the the last url in the urls.py 
file.

I have a project urls.py file and expect that anything that does not match 
waitlist will fall through to the 2nd url.

url(r'^waitlist/', include('waitlist.urls')),
 url(r'^.*$', views.404_view),


If the project matches the value waitlist, the router will pull in the urls 
from the app.
Same question as above   

The url   my_domain.com/waitlist/   

will pull in the index view as expected

Will  the url   my_domain.com/waitlist/abc4#jjj/
pull in the 404_view and be handled graceffully?   

 url(r'^$', views.index, name='index'),
 url(r'^.*$', views.404_view),

Thanks  again



On Monday, September 22, 2014 10:25:11 PM UTC-4, robert brook wrote:
>
> How is a url conf written so that if none of the useful urls are matched 
> it will pass through to some sort of wild card regular expressions so that 
> the view / redirection can be performed gracefully
>
> Thanks
>

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/acbd5b3d-0aa8-4510-890c-0f6277345264%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: I have configured SysLogHandler for my django app but nothing is going into the log file

This is from my logging config file from a non-django project, but the
principals should be similar.

Before you look too hard here, are you sure that rsyslog.d (or
equivalent) is running on the box (at which you have targeted the
logger?
Is the facility on which you are logging configured (In my case,
local5, see args below, is not configured by default and requires
stuff in /etc/rsyslog.d, including configuring the socket
'/dev/octopus', see args below.
[handler_logfile]
class=handlers.SysLogHandler
level=WARN
formatter=f_logfile
args=('/dev/octopus',handlers.SysLogHandler.LOG_LOCAL5)


On Tue, Sep 23, 2014 at 8:51 AM, Collin Anderson 
wrote:

> What does your SysLogHandler look like?
>
> --
> 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...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/def7f54c-48b8-4bcb-acc7-fe65751b8b43%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAB%2BAj0vCcGNx1_xbPJpHx01-zhn1DkZV5LBttM_w-oj4Y893EQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django connecting to MySQL via Mysql-connector fails

Hi, I'm learning django with PyDev, MySQL as backend. According to doc I 
used Oracle's MySQL connector to communicate with db:

>
> The Python Database API is described in PEP 249 
> . MySQL has two prominent 
> drivers that implement this API:
>
>- MySQLdb  is a native 
> driver 
>that has been developed and supported for over a decade by Andy Dustman
>.
>- MySQL Connector/Python 
> is a pure Python
> driver from Oracle that does not require the MySQL client library or
> any Python modules outside the standard library.
>
> Both drivers are thread-safe and both provide connection pooling. The major 
> difference is that MySQL Connector/Python supports Python 3.
>
However I got this error when I ran manage.py migrate in PyDev.

Traceback (most recent call last):
  File "C:\Python33\lib\site-packages\django\db\backends\mysql\base.py", 
line 14, in 
import MySQLdb as Database
ImportError: No module named 'MySQLdb'

I checked the basefile it only imports MySQLdb.

try:
import MySQLdb as Database
except ImportError as e:
from django.core.exceptions import ImproperlyConfigured
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)

Below is my settings:

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': "djangolearn",
'USER': 'root',
'PASSWORD': '',
'HOST': '127.0.0.1',
'PORT': '3306',
'CONN_MAX_AGE': 0# set connection life
}
}

What's wrong here? Does it mean I need MySQLdb to use MySQL connector?

Thanks!

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cac94278-d1bf-43d0-b6d6-152955c2cede%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Confused by STATICFILES_DIRS not working

Yes, that is how my urls are built. This works perfectly till I have 
DEBUG=TRUE.

On Tuesday, 23 September 2014 14:49:52 UTC+2, Collin Anderson wrote:
>
> How are you referencing your css and images in the frontend?
>
> It should be something like
> 
>
>
>
>

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/baa3a9ca-a8e6-47ad-8e14-8c7f05d51fa3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: I have configured SysLogHandler for my django app but nothing is going into the log file

What does your SysLogHandler look like?

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/def7f54c-48b8-4bcb-acc7-fe65751b8b43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Confused by STATICFILES_DIRS not working

How are you referencing your css and images in the frontend?

It should be something like




-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5d1917e4-0292-408b-ba35-a39888d88d74%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Open Django template in dialog box (not in window)

# popupadvance.html
Here's the worker object: {{ worker }}

# views.py
def popupadvance(request):
worker = Worker.objects.get(id=request.GET.get('worker_id')
return render(request, 'popupadvance.html', {'worker': worker})

# urls.py
from . import views
urlpatterns = [
url('popupadvance/$', views.popupadvance)
]






Advance 



function popitup(url) {
  $.ajax({
url: url,
success: function(data) {
  $("#dialog-form").load(data).dialog({modal:true}).dialog('open');
}
  })
  return false;
}

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/41199304-7a14-4d20-af30-eebce07e3ac7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Bug in Django 1.6.6 password_reset when user never logged in

I followed your steps and can't reproduce your issue.

In django 1.6, last_login is null=False, so it should never be None. django 
1.8 (master) changes the database to allow a null last_login, so if you've 
created the user using django1.8 and reset their password using django1.6 I 
could see that being an issue.

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c9b2159a-9b76-44c0-9a3c-0b5c680dbb1c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Behavior of the "update" in Django 1.7

If nothing else, if you know which field you edited, you can just save 
those field using: obj.save(update_fields=['field1', 'field5'])

https://docs.djangoproject.com/en/dev/ref/models/instances/#saving-objects

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c40310b6-7117-4455-b6d8-426f952ae6b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error UNIQUE constraint failed with Django 1.7

Hmm... That should be the same. I think the only difference is create() 
might use force_insert=True. Do you have a custom save() method?

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8e55222a-95ea-40d1-a596-e9a0eb7ffeec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Confused by STATICFILES_DIRS not working

Hi Ivo,

I have my project set up exactly as you suggested, and everything works in 
production. But I run into 2 problems.

1. When DEBUG=True, all my frontend styling is knocked out. So I resort to;
   
STATIC_URL = '/static/'
if DEBUG:
STATIC_URL = 'static/'

2. which then leaves the backend styling and static knocked out.

Any experience with this?

On Friday, 16 December 2011 18:25:17 UTC+2, Ivo Brodien wrote:
>
> Hi,
>
> I am not trying to understand what you did but just tell you how t works 
> for me:
>
> PROJECT_PATH = os.path.realpath(os.path.dirname(__file__))
> STATIC_ROOT = os.path.join(PROJECT_PATH, 'static')
> STATIC_URL = '/static/‘
>
> INSTALLED_APPS = (
> ...
>
> 'django.contrib.staticfiles’,
> )
>
> I have no STATICFILES_DIRS defined since for me it is enough how 
>  STATICFILES_FINDERS finds static content.
>
> I think what you get wrong, is that you want to add your folder where you 
> want your static content to be collected to  STATICFILES_DIRS, but that 
> must be defined in STATIC_ROOT and should not be left empty.
>
> When you do runserver it will find and serve all static content 
> automatically
>
> for example static content that is in one of your apps:
>
> django_sites/new_rcfhostdb/MYAPP/static (you DONT have to put this 
> in STATICFILES_DIRS)
>
> When you then run the collectstatic (usually on the production server) 
> command all static content will be copied to STATIC_ROOT and I guess you 
> want this to be: 
>
> django_sites/new_rcfhostdb/static
>
> You have to copy all the static content to one location because only then 
> the Webserver can find and serve all the static content which should not be 
> the job of the django process.
>
>
> Please read for further information:
>
> https://docs.djangoproject.com/en/1.3/howto/static-files/
>
> Good luck
> Ivo
>
>
>
>
>
> On Dec 16, 2011, at 17:08 , Jeff Blaine wrote:
>
> I'm having a heck of a time getting STATICFILES_DIRS working.  If anyone 
> could shed some light on this or just point me to the "All of your Django 
> STATIC* Settings Clarified Completely Once and For All" blog post or 
> somesuch, I would really appreciate it.
>
> STATIC_ROOT = '' # DEFAULT
> STATIC_URL = '/static/' # DEFAULT
> STATICFILES_DIRS = ( 
> '/django_sites/new_rcfhostdb/static',
> ) 
>
> Proof the intended CSS file exists in STATICFILES_DIRS:
>
> -rw-r--r-- 1 jblaine wheel 56360 Dec 14 19:06 
> /django_sites/new_rcfhostdb/static/bootstrap.css 
>
> I issue a GET /hostdb/ 
>
> "ImproperlyConfigured: The STATICFILES_DIRS setting should not contain the 
> STATIC_ROOT setting" 
>
> Fine.
>
> STATIC_ROOT = '/tmp/SHUT_UP' 
>
> That stops the 'ImproperlyConfigured' exception.
>
> The various attempted stylesheet references (from my base.html template) 
> and their 404 errors: 
>
>  
>
> [16/Dec/2011 10:53:04] "GET /bootstrap.css HTTP/1.1" 404 2146 
>
>  
>
> [16/Dec/2011 10:53:08] "GET /hostdb/bootstrap.css HTTP/1.1" 404 2146 
>
>  
>
> [16/Dec/2011 10:57:13] "GET /static/bootstrap.css HTTP/1.1" 404 1741 
>
> -- 
> 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/-/cSCoskQNgFYJ.
> To post to this group, send email to django...@googlegroups.com 
> .
> To unsubscribe from this group, send email to 
> django-users...@googlegroups.com .
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>
>

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/bd4b3a8c-afbd-4e7c-a5d0-810b37d53d8b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Sitemaps - multiple locations per object

Thanks

Le jeudi 18 septembre 2014 01:50:13 UTC+2, PRyan a écrit :
>
> Hello,
> I have business objects which have multiple urls each. The sitemap for the 
> business objects them self work and I get the following:
> /store/
>
> However, each business has sites specific to it. So I need sitemaps to 
> create:
> /store/
> /store//contact
> /store//about
>
> Is there a way I can get Sitemaps to go through the urls.py of that app, 
> or tell it the locations I want per object?
>
> Thanks!
>

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/dc6a37b7-7dba-4a5f-8c1c-3d49950096b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is there anything similar to phpmyadmin

I personally like DBeaver, since it can handle several types of DBMSes out of 
the box.
And it's free.

There are prebuilt packages for pretty much any major os/distribution.

On Mon, 22 Sep 2014 19:37:26 -0700 (PDT)
Yuan-Liang Tang  wrote:

> Thanks, but I'd like to use something open and free ;-)
> Per your suggestions about native apps, MySQL Workbench, included in 
> Ubuntu's Software Center, seems to be a good solution?
> 
> Thangs a lot.
> 
> 
> alTus於 2014年9月23日星期二UTC+8上午7時21分36秒寫道:
> >
> > I've come to the fact that standalone apps on your client computer are 
> > much more handy for db management.
> > All you need is to set up ssh tunnel to your server.
> > Native apps generally work faster and also allow you not to waste time 
> > setting up _stuff_ on the server.
> >
> > SQLYog is a very good program for mysql (but it's not free).
> > Still there're a lot of alternatives.
> >
> > воскресенье, 21 сентября 2014 г., 5:38:15 UTC+4 пользователь Yuan-Liang 
> > Tang написал:
> >>
> >> I'd like to know if there is anything/anyway similar to phpmyadmin for 
> >> managing MySQL DBs in a Django project or in the Python environment. Any 
> >> suggestions?
> >>
> >> django-mysql-manage seems to be dead.
> >>
> >> https://pypi.python.org/pypi/django-mysql-manager/0.1.2
> >>
> >>
> 
> -- 
> 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...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/fa94db3b-b061-4699-a1b1-42c3c67a6e7a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20140923132703.23e84c83%40jns42-l.w2k.keypro.fi.
For more options, visit https://groups.google.com/d/optout.


Re: Is there anything similar to phpmyadmin

Well, you know it's more about personal comfort and specific needs.
I didn't actually work with workbench but it seems that it's nice software.
Also you can consider these ones:
HeidiSQL (free and I've heard some good responses about it but needs wine)
EMS SQL Studio (lite version is free)

воскресенье, 21 сентября 2014 г., 5:38:15 UTC+4 пользователь Yuan-Liang 
Tang написал:
>
> I'd like to know if there is anything/anyway similar to phpmyadmin for 
> managing MySQL DBs in a Django project or in the Python environment. Any 
> suggestions?
>
> django-mysql-manage seems to be dead.
>
> https://pypi.python.org/pypi/django-mysql-manager/0.1.2
>
>

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/39c83c23-c256-4dee-9769-8d5ea33a27f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django url pass through

Hi Robert,

In those cases a HTTP 404 is the right response, to help Search Engines realise 
that such a URL doesn’t exist and to show users a "Page Not Found" message. To 
create a nice looking 404 response for users just write a view to handle it and 
add the “handler404” entry to your root URLConf module (the one near the 
settings.py module).

Adding something like this to urls.py:

handler404 = ‘views.http404_handler’

And creating that view in the corresponding views.py module:

from django.http import HttpResponseNotFound
from django.template import loader, RequestContext

def http404_handler(request):
t = loader.get_template("404.html")
return HttpResponseNotFound(
t.render(RequestContext(request, {'request_path': request.path})))

Also create the template 404.html in your templates directory.

Read more on the topic here: 
https://docs.djangoproject.com/en/1.7/ref/views/#the-404-page-not-found-view

Good luck,
Daniel


On 23 Sep 2014, at 04:25, robert brook  wrote:

> How is a url conf written so that if none of the useful urls are matched it 
> will pass through to some sort of wild card regular expressions so that the 
> view / redirection can be performed gracefully
> 
> Thanks
> 
> -- 
> 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...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/f981954c-679a-4000-9e4c-11d3e6ee3e09%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



signature.asc
Description: Message signed with OpenPGP using GPGMail