django.core.exceptions.ImproperlyConfigured ,The included URLconf 'simplesocial.urls' does not appear - url-pattern

django.core.exceptions.ImproperlyConfigured: The included URLconf 'simplesocial.urls' does not appear to have any patterns in it. If you
see the 'urlpatterns' variable with valid patterns in the file then the issue is probably caused by a circular import.

Related

using require in layer.conf in yocto

Considering all freedom that yocto gives to the developer, I have a question.
I would like to make this my_file.inc available only for recipes in one particular meta-layer. I know, that, for instance, using INHERIT keyword inside the local.conf will make my_class.bbclass file available globally for each recipe.
Is it a good practice to add this:
require my_file.inc
inside layer.conf? Or should I change my_file.inc to the my_file.bbclass, and, add INHERIT = "my_file.bbclass" to the layer.conf?
Any other possibilities?
Even if it seems to work, neither of your approaches is technically completely correct. The key point is that all .conf files are parsed first and everything they contain is globally visible throughout the whole build process. So if you add something through the layer.conf file, itis not being pulled in through an unexpected place, it also is not being limited that layer only and might therefore cause breakage at other places.
While I do not have a really good and clean solution, maybe the following can help you:
You can make your custom recipes react on certain keywords in DISTRO_FEATURES or MACHINE_FEATURES. Then you can create a two-staged approach:
Add the desired keyword in local.conf (or your MACHINE, or DISTRO, or whatever configuration)
Make the recipes react to it. If you need the mechanism in several places, then it might be useful to pour it into a .bbclass that your layer brings along and that you pull in for the respective recipes.
This way the effect is properly contained.
Maybe part 5.1.3.2 from the Yocto Project answers your question:
Avoid duplicating include files. Use append files (.bbappend) for each recipe that uses an include file. Or, if you are introducing a new recipe that requires the included file, use the path relative to the original layer directory to refer to the file. For example, use require recipes-core/package/file.inc instead of require file.inc. If you're finding you have to overlay the include file, it could indicate a deficiency in the include file in the layer to which it originally belongs. If this is the case, you should try to address that deficiency instead of overlaying the include file. For example, you could address this by getting the maintainer of the include file to add a variable or variables to make it easy to override the parts needing to be overridden.
So to avoid duplicate inclusion later, it would be better not to include your .inc file(s) this way.

Sublime Text 3 cannot parse symbols from vuejs

In Sublime Text, I'm used to accessing function names through the # symbol list. However, when using a project established from vue-templates, all the function names and data attributes in .vue files do not appear in this list.
This makes navigating .vue files tedious. I have installed all vue-related Sublime packages but none of them seem to fix this.
How can I get symbol indexing working properly with Vue files? Or, do you have any experience with other text editors that do this properly?
The symbol list in Sublime (visible via Goto > Goto Symbol... or Goto > Goto Symbol in Project...) is controlled primarily by the syntax definition for the language in question and secondarily by configuration metadata that tells Sublime what parts of the syntax are actually symbols that should be displayed in the symbol list.
In general:
Sublime runs an indexer over all of the files that are currently in your project
The indexer uses the rules in the syntax definition to break up the text into various scopes that describe the purpose of each bit of text (e.g. "This is a string", "this is a method call", etc)
A preferences file contains rules that indicate what scopes are considered symbols, both for the current file as well as project wide
The two parts of this need to work hand in hand in order for the symbol lists to populate correctly (as Sublime can't guess on its own), and both parts should be provided by the package or packages that are providing Vue support to Sublime.
The best course of action would be to raise an issue with the developers for the Vue package that's providing the Syntax definition. It's possible that the simple inclusion of an appropriate Symbol List.tmPreferences file by the syntax author would be enough to fix the issue.
It's also possible that the symbol list is not fully populated because sublime is still indexing all of the files in the project and so the data is not available yet.
You can check the status of the indexer in recent builds of sublime by selecting Help > Indexing Status... from the menu to see if that's the issue. However unless you have an extremely large set of files this is likely not the issue.

GCC complaining about a duplicate definition (where only one exists)

I just seem to hit one error after another when dealing with larger projects in Xcode. This time, GCC is complaining of a duplicate definition for a struct-printing function - one where it is actually defined (in a different file), and one where it is used (in the driver).
The specific error I'm getting is this:
ld: duplicate symbol _fprintConfiguration in
/.../bits.build/Objects-normal/x86_64/Block.o and
/.../bits.build/Objects-normal/x86_64/bits.o
where Block.o contains the definition and bits.o contains the driver.
I've done some research on this already, but it seems that every problem exists with people actually defining it twice by virtue of #include, but in all my files I only use #import. Isn't the #import directive supposed to 'intelligently' include files? Are there any other reasons I could be getting this error? Are there any other solutions I can try?
Thanks for your help :)
The problem is that you're including the same definition in multiple translation units (both Block.o and bits.o). To fix this, declare the function inline or move the definition to a (single) source (non-header) file.
This is orthogonal to the question of #include vs. #import. That's about including the same code multiple times in the same translation unit.

Log4cxx and full file paths when used with CMake

I'm using Log4Cxx for logging and I'd like to use the %l directive in order to see where is the log trace (filename and line number). The problem I have is that I'm also using CMake that provides full path names to the compiler. This causes that log columns aren't aligned any more and they are now difficult to read since the log4cxx uses the __FILE__ preprocessor macro for determining that information.
Does anyone know any workaround? I'd like to specify for instance either of getting only the "filename.cpp" or better with a nesting parameter, for instance 2 nesting will be "module/submodule/filename.cpp". It seems that by design CMake works with the full path philosophy so I think that this could be solved either by using an unknown to me preprocessor directive or to trick Log4CXX some way.
Looks like you could try using a "ConversionPattern" to at least specify a maximum width for the filename output of log4cxx:
http://logging.apache.org/log4cxx/apidocs/classlog4cxx_1_1_pattern_layout.html
Or do a "find on page" of ConversionPattern here for a config file example:
http://logging.apache.org/log4cxx/index.html
According to the docs, you should get the rightmost characters when you specify a maximum width. Maybe that's a close enough approximation to what you're seeking here.
CMake always passes full path source file names to the compiler so that debug symbols reference the correct source files (for one thing). It's simply easier to guarantee that things work everywhere on all platforms using the full path names.

Stopping doxygen searching for (and assuming) non-existant variables in source code

Im using doxygen outside of its design, but well within its capability. I have a bunch of essentially text files, appended with some doxygen tags. I am successfully generating doxygen output. However, somehow doxygen occasionally discovers what it assumes to be a variable, and proceeds to document it using surrounding text, causing a lot of confusing documentation. I cant see any direct relationship between these anomalies, only that they're reproducing the same output on each run, and what I can see is at least some are next to a ';' or a '='.
I only want doxygen to document what I've manually tagged. I am hoping to remove any occurrence of these anomalies, however I cannot alter existing text. I can only add doxygen tags, or alter the configuration file. Any ideas?
Many thanks.
Because in my particular case, I do not need any automatically generated documentation, only that which I have tagged with doxygen tags, setting
EXCLUDE_SYMBOLS = *
removes any instance of doxygen "finding" and documenting variables. This however may remove any ability to find any class declarations, namespaces or functions, however this is acceptable for me.