Re: Is it possible to swap 1.8 and 1.10/1.11 Admin static files

2017-05-30 Thread Mike Dewhirst
Haven't actually communicated our decision but I'll just see if they are 
willing to fund the development involved in staying on an out-of-date 
and soon-to-be-unsupported system we'll hire someone to do that.


I think.

Haven't done any research on best practice in this area. Happy to let 
you know what happens ;)


Cheers

Mike

On 31/05/2017 10:56 AM, 'Abraham Varricatt' via Django users wrote:
How ... did you impose our will on this user? ;) I'd like to hear more 
... for peaceful research purposes, of course.


-Abraham V.


On Monday, May 29, 2017 at 9:19:01 PM UTC-4, Mike Dewhirst wrote:

Cancel this question. We will force the user to comply with our
reality.

Cheers

Mike

On 16/05/2017 5:42 PM, Mike Dewhirst wrote:
> I have a user who is keen to revert to the "old" 1.8 look and
feel for
> his company now that we have upgraded to 1.10.
>
> First question is it even possible?
>
> I have tested this using blunt force and at first glance it *seems*
> possible in both directions. However I have a suspicion there
might be
> tie-ins I have not discovered. Also. I haven't yet tried 1.11.
>
> If it is feasible ...
>
> Second question is how to do it.
>
> I have stared long and hard at settings. I have this ...
>
> STATICFILES_DIRS = [
> os.path.join(BASE_DIR, 'static/').replace('\\', '/'),
> os.path.join(BASE_DIR, 'company/static/').replace('\\', '/'),
> os.path.join(BASE_DIR, 'substance/static/').replace('\\', '/'),
> os.path.join(BASE_DIR, 'workplace/static/').replace('\\', '/'),
> ]
>
> and
>
> STATICFILES_FINDERS = [
> 'django.contrib.staticfiles.finders.FileSystemFinder',
> 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
> ]
>
> and I can get the user (company) from the request and I can
create a
> company subdir under 'company/static//' if that's where I
> should be putting the admin files from 1.8. But then how do I tweak
> the settings so the Admin uses the preferred company static
files for
> just that user?
>
> Maybe instead, there is a company specific preference I can
establish
> to provide '/static/admin_1.8' for that user?
>
> Maybe I need to have company-specific Admin templates which
override
> the block which reads the static files based on a company
preference?
>
> Any hints?
>
> Thanks
>
> Mike
>

--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a1d84a3a-049b-4ba4-9641-579dab3e5f53%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cc057d21-a868-5963-951d-5e44e64baf16%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.


Re: ANN: django-admin-tools 0.8.1 released

2017-05-30 Thread 'Abraham Varricatt' via Django users
By chance do you have any screenshots in your documentation?

-Abraham V.


On Tuesday, May 30, 2017 at 8:39:54 AM UTC-4, izi wrote:
>
> Hello, 
>
> We are happy to announce the availability of the version 0.8.1 of 
> django-admin-tools: 
> https://pypi.python.org/pypi/django-admin-tools/0.8.1 
>
> Django-admin-tools is a collection of extensions/tools for the default 
> django administration interface, it includes: 
> * a full featured and customizable dashboard, 
> * a customizable menu bar, 
> * tools to make admin theming easier. 
>
> This version fixes some issues and adds support for Django 1.11. 
>
> Thanks to all the people who contributed to this release. 
>
> The project is hosted on Github: 
> https://github.com/django-admin-tools/django-admin-tools 
>
> Django-admin-tools is generously documented, you can browse the 
> documentation online here: 
> https://django-admin-tools.readthedocs.org/ 
>
> Regards, 
>
> -- 
> The django-admin-tools team 
> https://github.com/django-admin-tools/ 
>
>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d8180d1e-301a-4c51-9040-7a5397f76b3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is it possible to swap 1.8 and 1.10/1.11 Admin static files

2017-05-30 Thread 'Abraham Varricatt' via Django users
How ... did you impose our will on this user? ;) I'd like to hear more ... 
for peaceful research purposes, of course.

-Abraham V.


On Monday, May 29, 2017 at 9:19:01 PM UTC-4, Mike Dewhirst wrote:
>
> Cancel this question. We will force the user to comply with our reality. 
>
> Cheers 
>
> Mike 
>
> On 16/05/2017 5:42 PM, Mike Dewhirst wrote: 
> > I have a user who is keen to revert to the "old" 1.8 look and feel for 
> > his company now that we have upgraded to 1.10. 
> > 
> > First question is it even possible? 
> > 
> > I have tested this using blunt force and at first glance it *seems* 
> > possible in both directions. However I have a suspicion there might be 
> > tie-ins I have not discovered. Also. I haven't yet tried 1.11. 
> > 
> > If it is feasible ... 
> > 
> > Second question is how to do it. 
> > 
> > I have stared long and hard at settings. I have this ... 
> > 
> > STATICFILES_DIRS = [ 
> > os.path.join(BASE_DIR, 'static/').replace('\\', '/'), 
> > os.path.join(BASE_DIR, 'company/static/').replace('\\', '/'), 
> > os.path.join(BASE_DIR, 'substance/static/').replace('\\', '/'), 
> > os.path.join(BASE_DIR, 'workplace/static/').replace('\\', '/'), 
> > ] 
> > 
> > and 
> > 
> > STATICFILES_FINDERS = [ 
> > 'django.contrib.staticfiles.finders.FileSystemFinder', 
> > 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 
> > ] 
> > 
> > and I can get the user (company) from the request and I can create a 
> > company subdir under 'company/static//' if that's where I 
> > should be putting the admin files from 1.8. But then how do I tweak 
> > the settings so the Admin uses the preferred company static files for 
> > just that user? 
> > 
> > Maybe instead, there is a company specific preference I can establish 
> > to provide '/static/admin_1.8' for that user? 
> > 
> > Maybe I need to have company-specific Admin templates which override 
> > the block which reads the static files based on a company preference? 
> > 
> > Any hints? 
> > 
> > Thanks 
> > 
> > Mike 
> > 
>
>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a1d84a3a-049b-4ba4-9641-579dab3e5f53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Session Variables

2017-05-30 Thread Russell Keith-Magee
Please stop spreading FUD like this. The Django Community Code of Conduct isn’t 
a blunt instrument attempting to stop all dissent or disagreement. It’s there 
to ensure that everyone treats everyone else with respect in all communications.

The fact that Daniel criticised Hungarian notation is in *no* way a violation 
of the CoC. It’s fine to have opinions about Hungarian notation (or any other 
technology or stylistic choice, for that matter). However, the dismissive and 
contemptuous tone he used to voice his disapproval *is* a likely violation of 
the CoC.

So - go right ahead and have opinions. Just choose your words when you voice 
them, and remember: we’re all humans; we can all have different opinions and 
preferences; and there may be situations and circumstances that affect those 
choices that aren’t always obvious on first inspection.

Yours,
Russ Magee %-)

On 31 May 2017, 4:08 AM +0800, ludovic coues , wrote:
> Pretty sure the django code of conduct is against criticizing the use
> of Hungarian notation.
>
> 2017-05-29 12:29 GMT+02:00 Daniel Roseman :
> > On Monday, 29 May 2017 06:04:02 UTC+1, James Schneider wrote:
> > >
> > >
> > > On May 28, 2017 9:35 AM,  wrote:
> > >
> > >
> > > tFetchData = users.objects.get(emailid = lEmailId)
> > >
> > > request.session['sPassword'] = tFetchData.userroles
> > > request.session['sCompanyId'] = tFetchData.companyid
> > >
> > > This code didn't appear to have anything to do with your question.
> >
> >
> > Also, Hungarian notation? Really?
> >
> >
> > --
> > 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 https://groups.google.com/group/django-users.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/django-users/5427f3fe-4345-41b4-9a46-c0b037ece73b%40googlegroups.com.
> >
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
>
> Cordialement, Ludovic Coues
> +33 6 14 87 43 42
>
> --
> 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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAEuG%2BTZWJo3kX3AjFR_Lkf7JRkkVVjwrTMTQo9KkKZjmMoFZxQ%40mail.gmail.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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/acb46478-8232-4154-ab65-b15563cecb12%40Spark.
For more options, visit https://groups.google.com/d/optout.


Re: Django db backend not FIPS compliant

2017-05-30 Thread Tim Graham
This usage generates a short, unique identifier for a database index name. 
The usage of md5 here isn't security sensitive. Changing it to some other 
hash could be backwards incompatible because Django would no longer know 
the names of indexes in existing projects. There are other usages of md5 in 
Django where a short, fast hash is needed. I'm not sure if prohibiting the 
usage of md5 in Django or adding a setting to allow selecting some other 
hash in all those places is worth the additional complexity but you could 
write to django-developers to get other opinions.

On Tuesday, May 30, 2017 at 4:21:24 PM UTC-4, Brandon Williams wrote:
>
> I'm running into issues when trying to migrate my models in an environment 
> that is running FIPS restrictions regarding MD5.  Here is the stack trace:
>
> Operations to perform:
>>   Apply all migrations: admin, auth, contenttypes, dashboard, 
>> kombu_transport_django, sessions
>> Running migrations:
>>   Applying contenttypes.0001_initial...Traceback (most recent call last):
>>   File "manage.py", line 10, in 
>> execute_from_command_line(sys.argv)
>>   File 
>> "/usr/lib64/python2.7/site-packages/django/core/management/__init__.py", 
>> line 367, in execute_from_command_line
>> utility.execute()
>>   File 
>> "/usr/lib64/python2.7/site-packages/django/core/management/__init__.py", 
>> line 359, in execute
>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>   File 
>> "/usr/lib64/python2.7/site-packages/django/core/management/base.py", line 
>> 294, in run_from_argv
>> self.execute(*args, **cmd_options)
>>   File 
>> "/usr/lib64/python2.7/site-packages/django/core/management/base.py", line 
>> 345, in execute
>> output = self.handle(*args, **options)
>>   File 
>> "/usr/lib64/python2.7/site-packages/django/core/management/commands/migrate.py",
>>  
>> line 204, in handle
>> fake_initial=fake_initial,
>>   File 
>> "/usr/lib64/python2.7/site-packages/django/db/migrations/executor.py", line 
>> 115, in migrate
>> state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, 
>> fake_initial=fake_initial)
>>   File 
>> "/usr/lib64/python2.7/site-packages/django/db/migrations/executor.py", line 
>> 145, in _migrate_all_forwards
>> state = self.apply_migration(state, migration, fake=fake, 
>> fake_initial=fake_initial)
>>   File 
>> "/usr/lib64/python2.7/site-packages/django/db/migrations/executor.py", line 
>> 244, in apply_migration
>> state = migration.apply(state, schema_editor)
>>   File 
>> "/usr/lib64/python2.7/site-packages/django/db/migrations/migration.py", 
>> line 129, in apply
>> operation.database_forwards(self.app_label, schema_editor, old_state, 
>> project_state)
>>   File 
>> "/usr/lib64/python2.7/site-packages/django/db/migrations/operations/models.py",
>>  
>> line 532, in database_forwards
>> getattr(new_model._meta, self.option_name, set()),
>>   File 
>> "/usr/lib64/python2.7/site-packages/django/db/backends/base/schema.py", 
>> line 333, in alter_unique_together
>> self.execute(self._create_unique_sql(model, columns))
>>   File 
>> "/usr/lib64/python2.7/site-packages/django/db/backends/base/schema.py", 
>> line 913, in _create_unique_sql
>> "name": self.quote_name(self._create_index_name(model, columns, 
>> suffix="_uniq")),
>>   File 
>> "/usr/lib64/python2.7/site-packages/django/db/backends/base/schema.py", 
>> line 819, in _create_index_name
>> index_unique_name = '_%s' % self._digest(table_name, *column_names)
>>   File 
>> "/usr/lib64/python2.7/site-packages/django/db/backends/base/schema.py", 
>> line 123, in _digest
>> h = hashlib.md5()
>> ValueError: error:060800A3:digital envelope 
>> routines:EVP_DigestInit_ex:disabled for fips
>
>
>
>  Is there a particular reason why MD5 is used here? Is there any harm in 
> changing it to sh512 or something similar?
>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7cea0860-3e9f-412c-8dec-2a4bb4766010%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: DJANGO 1.1 dynamic url on static javascript

2017-05-30 Thread ludovic coues
Everything looking like {% %} or {{ }} are template tag. Your js file
are not processed by the templating engine so they can be served
really fast directly by your web server and not by django which is a
lot slower.

One solution would be to but the url in your html file. Add a 

Django db backend not FIPS compliant

2017-05-30 Thread Brandon Williams
I'm running into issues when trying to migrate my models in an environment 
that is running FIPS restrictions regarding MD5.  Here is the stack trace:

Operations to perform:
>   Apply all migrations: admin, auth, contenttypes, dashboard, 
> kombu_transport_django, sessions
> Running migrations:
>   Applying contenttypes.0001_initial...Traceback (most recent call last):
>   File "manage.py", line 10, in 
> execute_from_command_line(sys.argv)
>   File 
> "/usr/lib64/python2.7/site-packages/django/core/management/__init__.py", 
> line 367, in execute_from_command_line
> utility.execute()
>   File 
> "/usr/lib64/python2.7/site-packages/django/core/management/__init__.py", 
> line 359, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File 
> "/usr/lib64/python2.7/site-packages/django/core/management/base.py", line 
> 294, in run_from_argv
> self.execute(*args, **cmd_options)
>   File 
> "/usr/lib64/python2.7/site-packages/django/core/management/base.py", line 
> 345, in execute
> output = self.handle(*args, **options)
>   File 
> "/usr/lib64/python2.7/site-packages/django/core/management/commands/migrate.py",
>  
> line 204, in handle
> fake_initial=fake_initial,
>   File 
> "/usr/lib64/python2.7/site-packages/django/db/migrations/executor.py", line 
> 115, in migrate
> state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, 
> fake_initial=fake_initial)
>   File 
> "/usr/lib64/python2.7/site-packages/django/db/migrations/executor.py", line 
> 145, in _migrate_all_forwards
> state = self.apply_migration(state, migration, fake=fake, 
> fake_initial=fake_initial)
>   File 
> "/usr/lib64/python2.7/site-packages/django/db/migrations/executor.py", line 
> 244, in apply_migration
> state = migration.apply(state, schema_editor)
>   File 
> "/usr/lib64/python2.7/site-packages/django/db/migrations/migration.py", 
> line 129, in apply
> operation.database_forwards(self.app_label, schema_editor, old_state, 
> project_state)
>   File 
> "/usr/lib64/python2.7/site-packages/django/db/migrations/operations/models.py",
>  
> line 532, in database_forwards
> getattr(new_model._meta, self.option_name, set()),
>   File 
> "/usr/lib64/python2.7/site-packages/django/db/backends/base/schema.py", 
> line 333, in alter_unique_together
> self.execute(self._create_unique_sql(model, columns))
>   File 
> "/usr/lib64/python2.7/site-packages/django/db/backends/base/schema.py", 
> line 913, in _create_unique_sql
> "name": self.quote_name(self._create_index_name(model, columns, 
> suffix="_uniq")),
>   File 
> "/usr/lib64/python2.7/site-packages/django/db/backends/base/schema.py", 
> line 819, in _create_index_name
> index_unique_name = '_%s' % self._digest(table_name, *column_names)
>   File 
> "/usr/lib64/python2.7/site-packages/django/db/backends/base/schema.py", 
> line 123, in _digest
> h = hashlib.md5()
> ValueError: error:060800A3:digital envelope 
> routines:EVP_DigestInit_ex:disabled for fips



 Is there a particular reason why MD5 is used here? Is there any harm in 
changing it to sh512 or something similar?

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6b2ec955-ed45-4490-9e9d-e6a8db67993b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Session Variables

2017-05-30 Thread ludovic coues
Pretty sure the django code of conduct is against criticizing the use
of Hungarian notation.

2017-05-29 12:29 GMT+02:00 Daniel Roseman :
> On Monday, 29 May 2017 06:04:02 UTC+1, James Schneider wrote:
>>
>>
>> On May 28, 2017 9:35 AM,  wrote:
>>
>>
>>  tFetchData = users.objects.get(emailid = lEmailId)
>>
>> request.session['sPassword'] = tFetchData.userroles
>> request.session['sCompanyId'] = tFetchData.companyid
>>
>> This code didn't appear to have anything to do with your question.
>
>
> Also, Hungarian notation? Really?
>
>
> --
> 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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5427f3fe-4345-41b4-9a46-c0b037ece73b%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 

Cordialement, Ludovic Coues
+33 6 14 87 43 42

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEuG%2BTZWJo3kX3AjFR_Lkf7JRkkVVjwrTMTQo9KkKZjmMoFZxQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Channels and Background Processes

2017-05-30 Thread Andrew Godwin
Hi Markus,

There is no plan to roll Channels up to and including the 2.0 release so
far - it's persisting as an external project for now with its own release
cycle.

Some of what you describe can be done with Channels - it gives you an
inter-process messaging framework for sending data between processes and
having background tasks acting on it - but it does not give the "pool with
state information", which should be done using a database, probably one
more designed for that kind of task like Redis. It also does not have
directly native timer support intermingled with other events - you have to
set up timer events and hook onto the client events (like sending a
message) and see if one happened recently enough to trigger what you want
to do.

At the end of the day, Channels and ASGI (which powers it) are a low-level
framework for letting you design a more event-driven system on top of
Django. They will help you do what you want, but you will have to implement
your own layer of features and customisation, much like sites on top of
Django itself.

Andrew

On Tue, May 30, 2017 at 5:19 AM, Markus Schaber 
wrote:

> Hi,
>
> We're currently working on a server application using Django as framework.
>
> Now, some advanced use cases appeared on the horizon, and we're evaluating
> how we'll be able to solve them in the future.
>
> We came across https://blog.heroku.com/in_deep_with_django_channels_the_
> future_of_real_time_apps_in_django which advises to use "Django Channels"
> for that.
>
> The linked article claims that "The plan is to roll Channels into Django
> for the 1.10 release" - but as far as I can see, it's not in 1.10 nor 1.11.
> Can anyone confirm my findings?
>
> Additionally, the linked article shows "background processes", which could
> fit nicely into our concept, as we need functionalities like:
>
> - Some pool with state information about certain clients (whether they're
> currently connected via web socket, which messages they sent etc...)
>
> - Based on some timers (scheduled jobs, or clients were not connecting for
> some time, etc...) we need to get active on the server side (e. G. send
> emails, or send messages via web socket to other clients, etc...)
>
> Can those background processes be used to implement such functionality? We
> did not find any documentation about them apart from the image yet, so
> pointers are welcome. :-)
>
> The pool information mentioned above needs also be available for clients
> using http messages, so we'll need to access that data from the "view
> functions".
>
> Is it possible and feasible to implement those features using Django?
>
> Thanks in advance,
> Markus Schaber
>
>
> --
> 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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/3eb9e492-c7bf-472e-81dd-5957df8ed3bd%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFwN1upNGBZ3GNU8MEVheeiFFLRGfyPOzeH5rWuhU9EQKX1Bzw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


DJANGO 1.1 dynamic url on static javascript

2017-05-30 Thread lenin david
*Context*

I am adding a static javascript file to my **ModelForm** on this way

forms.py

class SomeForm(forms.ModelForm):

class Media:
  js = ('some-javascript.js',)


*Problem*

On this javascript I need send a GET request to a rest endpoint hosted on 
same application using jquery, but i need the Server domain or a function 
to construct my url 

some-javascript.js,

django.jQuery.get('{% url "validate_username" %}')



*expect behavior*

If I could create my url with django I could send the request without 
problems, Thanks in advance


  

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/da93cb04-0310-4918-a810-045011853d34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


DJANGO 1.1 dynamic url on static javascript

2017-05-30 Thread lenin david
## Context
I am adding a static javascript file to my **ModelForm** on this way

forms.py



class SomeForm(forms.ModelForm):

class Media:
  js = ('some-javascript.js',)

## Problem

On this javascript I need send a GET request to a rest endpoint hosted on 
same application using jquery, but i need the Server domain or a function 
to construct my url 

some-javascript.js,



django.jQuery.get('{% url "validate_username" %}')


## expect behavior

If I could create my url with django I could send the request without 
problems, Thanks in advance


I posted this question on: https://stackoverflow.com/posts/44266904/edit

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/99b1a2e3-879e-4395-98b4-52ba8d286bbc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


ANN: django-admin-tools 0.8.1 released

2017-05-30 Thread David Jean Louis
Hello,

We are happy to announce the availability of the version 0.8.1 of
django-admin-tools:
https://pypi.python.org/pypi/django-admin-tools/0.8.1

Django-admin-tools is a collection of extensions/tools for the default
django administration interface, it includes:
* a full featured and customizable dashboard,
* a customizable menu bar,
* tools to make admin theming easier.

This version fixes some issues and adds support for Django 1.11.

Thanks to all the people who contributed to this release.

The project is hosted on Github:
https://github.com/django-admin-tools/django-admin-tools

Django-admin-tools is generously documented, you can browse the
documentation online here:
https://django-admin-tools.readthedocs.org/

Regards,

-- 
The django-admin-tools team
https://github.com/django-admin-tools/

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/18bcd59d-cc3a-8b63-f8d6-0ebb01a246a9%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django Channels and Background Processes

2017-05-30 Thread Markus Schaber
Hi,

We're currently working on a server application using Django as framework.

Now, some advanced use cases appeared on the horizon, and we're evaluating 
how we'll be able to solve them in the future.

We came across 
https://blog.heroku.com/in_deep_with_django_channels_the_future_of_real_time_apps_in_django
 
which advises to use "Django Channels" for that.

The linked article claims that "The plan is to roll Channels into Django 
for the 1.10 release" - but as far as I can see, it's not in 1.10 nor 1.11. 
Can anyone confirm my findings?

Additionally, the linked article shows "background processes", which could 
fit nicely into our concept, as we need functionalities like:

- Some pool with state information about certain clients (whether they're 
currently connected via web socket, which messages they sent etc...)

- Based on some timers (scheduled jobs, or clients were not connecting for 
some time, etc...) we need to get active on the server side (e. G. send 
emails, or send messages via web socket to other clients, etc...)

Can those background processes be used to implement such functionality? We 
did not find any documentation about them apart from the image yet, so 
pointers are welcome. :-)

The pool information mentioned above needs also be available for clients 
using http messages, so we'll need to access that data from the "view 
functions".

Is it possible and feasible to implement those features using Django?

Thanks in advance,
Markus Schaber
 

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3eb9e492-c7bf-472e-81dd-5957df8ed3bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.